Disabling PineTab2 physical keyboard and touchpad?
#1
I'd like to keep the PT2 in the case, but sometimes fold the keyboard back and use only touch input. My first thought was to try to write a desktop launcher using xinput, but I see that xinput does not work with Wayland. Any advice for how to accomplish this?
  Reply
#2
I don't have my PineTab2 right now to test it, but how about this?
https://superuser.com/questions/1707773/...f-in-linux
  Reply
#3
Realized that disabling the touchpad is very easy, just use the Fn-F7 shortcut.

dmesg confirms the keyboard as usb 2-1.

From the link you gave, "echo '2-1' |sudo tee /sys/bus/usb/drivers/usb/unbind" and "echo '2-1' |sudo tee /sys/bus/usb/drivers/usb/bind" do work to disable and enable the keyboard+trackpad, thanks!

It would still be nice to have a solution that did not require root/sudo. Since this won't work easily as a desktop launcher, which is my goal.

Also learned about libinput list-devices and libinput list-kernel-devices which might be helpful for a different approach.
I read about one way of just starting evtest to grab all the input from the specified device, effectively disabling it, but that's very hacky and an unnecessary background process.

Thanks!

-john
  Reply
#4
Well, that was shortlived. Two things went wrong while trying to do this in practice.

1) Folding the case back after the usb device is unbound puts the device into suspend after only some seconds

2) Trying to rebind the device after a few minutes gives "usb 2-1: can't set config #1, error -62"

Further suggestions welcome..
  Reply
#5
I don't have experience in this area. But, it would be helpful to know what kind of sensor is detecting the magnet in the lid. For example, if it is a reed switch and is SPST, there is no way to detect whether the lid is closed or flipped back. But, if it is a hall effect of some sort, you might be able to detect the polarity of the magnetic field and determine whether the lid is flipped back or closed. If hardware can detect polarity, the rest is just software.
Pinephone Pro enthusiast and SUPER-HYPED for PineTab 2! PT2 is AWESOME!
Former electrical engineer. Current rancher.

I know a lot about a few things, a little about a lot of things and am ignorant of an unknown number of things.
  Reply
#6
On IRC, someone said it's a hall effect sensor, with magnet under the CTRL key.
  Reply
#7
I managed to "disable" the keyboard on my PineTab2 following the instructions here:
https://unix.stackexchange.com/questions...wer-382225

Not sure if the event number is the same for all PineTabs, but in mine the command is:
sudo evtest --grab /dev/input/event4

the problem with this is that you (1) either have to keep your terminal opened or (2) background the evtest job and it will be running on the background until you kill it. I also noticed that when I fold the keyboard backwards the tablet does want to go to suspend but I can get off it.

Let me know if this solutions works better for you.

Hey! Found out another possible solution based on this question here:
https://unix.stackexchange.com/questions...the-laptop

So, in my PineTab2, the command is
sudo sh -c 'echo 1 > /sys/devices/platform/fd840000.usb/usb/4/4-1/4-1\:1.0/0003\:1018\:1006.0003/input/input15/inhibited'

and do enable:
sudo sh -c 'echo 0 > /sys/devices/platform/fd840000.usb/usb/4/4-1/4-1\:1.0/0003\:1018\:1006.0003/input/input15/inhibited'

but make sure to check the correct input path on /proc/bus/input/devices
  Reply
#8
ok, one last thing. Have you seen this option on System Settings > Power Management > Energy Saving > When laptop lid closed? When I select "do nothing" the screen doesn't go to sleep if I fold back the keyboard.


Attached Files Thumbnail(s)
   
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PineTab2 corrupted EMMC explit 6 2,966 09-13-2024, 09:09 AM
Last Post: Evergreen
  OS Options for Pinetab2 Evergreen 2 735 09-07-2024, 07:35 AM
Last Post: moobythegoldensock
  Cannot get into Pinetab2 joespodie 1 472 09-02-2024, 11:52 AM
Last Post: KC9UDX
Video Pinetab2 camera drivers cringeops 9 3,173 03-18-2024, 11:40 AM
Last Post: cringeops
  eMMC backup - pinetab2 pinetar.gz 0 1,163 01-07-2024, 09:08 PM
Last Post: pinetar.gz
  [PineTab2] Issues with Mobian Networking Cornelia Xaos 7 4,866 12-30-2023, 10:02 PM
Last Post: Cornelia Xaos
  Arch Linux (danctnix) virtual keyboard layout change cudo 0 1,389 09-27-2023, 12:19 PM
Last Post: cudo
  Touch doesnt rotate on Sway in PineTab2 cgbarros 4 3,475 08-03-2023, 05:49 PM
Last Post: cgbarros
  Mouse moves without me touching the touchpad jbreese 1 1,403 07-29-2023, 08:42 PM
Last Post: cgbarros
  Will sudo pacman -Syu brick the PineTab2? cgbarros 10 4,615 07-24-2023, 01:15 PM
Last Post: rqkeating

Forum Jump:


Users browsing this thread: 1 Guest(s)