Closed Adventure4Life closed 4 years ago
If stdbuf -oL libinput debug-events|grep switch
prints nothing when you convert your laptop, then most likely your device is not supported, and this script won't work for you. The script uses libinput debug-events
internally, with input_device
property being there to filter out irrelevant events, it just adds --device
argument to libinput debug-events
.
You may try to run sudo stdbuf -oL libinput debug-events|grep switch
and see if it shows anything. If it works, check permissions for those input devices. On my machine they belong to user root
and group input
, so to have access you'd add yourself to the input
group. This is distribution-dependent, so check it yourself. If running that command with sudo still doesn't show anything - you are out of luck here. You might try luck with the older version of this script, I put under old/
in the repository: https://github.com/alesguzik/linux_detect_tablet_mode/tree/master/old . It uses a pair of accelerometers instead of mode switch events.
ok thanks.. I see.. I still couldn't get it to work, but I appreciate you taking the time to respond.
I can not work out how to get this script working... like others posted the command stdbuf -oL libinput debug-events|grep switch seems to do nothing.. it just sort of goes to a new line and runs... I get no outputs of any kind and have to ctrl+c out. If I run it without the grep I get a ton of info, but nothing seems to happen when I fold the laptop. The LS command seemed to return results I could use?
I assume that pci-0000:00:1f.0-platform-VPC2004:00-event is the correct event... so I made the config file.... (I also tried pci-0000:00:15.1-platform-i2c_designware.1-event)
but whenever I run the script I get....
I tried copying it into /root/.config and then running the script with sudo... but I got the same erorr...
I'd appreciate any advise you may have on this.. thanks.