Yoga Laptop - Autodisable Keyboard when screen folded back to use as tablet?
BodhiThis forum is for the discussion of Bodhi Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Than I copied the two files form the page... the settings file and the script.
The instructions say...
Code:
Install ruby and stdbuf (most likely you already have them preinstalled)
Clone it somewhere, and optionally symlink watch_tablet into any directory in your $PATH
Copy a config file into ~/.config/watch_tablet.yml
Adjust the config (see below)
Add watch_tablet & to your ~/.xinitrc
Restart your desktop session and enjoy
I did everything but (2).. I do not know what that means.
The config instructions say...
Code:
input_device is a path to the device that provides the tablet mode switch. To find it you may run stdbuf -oL libinput debug-events|grep switch and notice something like event4 in the leftmost column. That would correspond to /dev/input/event4. Device numbers may be unstable across reboots, so you may consider doing ls -lh /dev/input/by-path and finding a symlink to that device. For X1 Yoga Gen2 it's /dev/input/by-path/platform-thinkpad_acpi-event.
modes.laptop, modes.tablet - this contain commands that will be executed when mode changes. Most likely this will contain xinput enable and xinput disable commands to enable/disable kb/touchpad/trackpoint (just run xinput to look them up). You may use any other commands to adjust your desktop environment (e.g. hide or show additional panels, increase button size, hide/show onscreen keyboard etc.)
But the command "stdbuf -oL libinput debug-events|grep switch" dose not work?
Code:
:~$ stdbuf -oL libinput debug-events|grep switch
stdbuf: failed to run command ‘libinput’: No such file or directory
I'll just say that my Yoga did this automatically in any OS that I put on it (Yoga 710 & Yoga 3 Pro), I thought it was a low-level (efi firmware) function, not software.
I'll just say that my Yoga did this automatically in any OS that I put on it (Yoga 710 & Yoga 3 Pro), I thought it was a low-level (efi firmware) function, not software.
well it works in Windows 10... just not in Ubuntu 18.04 LTS (BodHi).
To be clear the touchscreen is working, it is just that the keyboard dose not disable when it is folded backward.
I'll just say that my Yoga did this automatically in any OS that I put on it (Yoga 710 & Yoga 3 Pro), I thought it was a low-level (efi firmware) function, not software.
Well... I tried a number of Live Dstros... and none of them worked...
AntiX
LinuxLite
Lubuntu
Kubuntu
Ubuntu
LxLe
Manjaro-Xfce
BunsenLabs
LinuxMint
KDENeon
What was strange though is that in Kubuntu when I folded it backwards it said "touchpad disabled" as a popup. So while the keyboard still tryped and made the tablet mode unusable, it did recognize that it was folded and disabled the touchpad.
I tried a few of the distros and all of them had the touchpad disable, even if it didn't say so.
Kubuntu
LinuxLite
BodHi
Yes BodHi.. so the BodHi Live Boot did recognize the fold and used that to disable to touchpad... but like all of them, that did not disable the actual keyboard
Quote:
Originally Posted by Timothy Miller
I thought it was a low-level (efi firmware) function, not software.
I looked through the Bios.. did not see any options to control this. I'm going to go to the website and see if there is an updated bio / firmware or something I can install on the device.
By default the icons are placed in /usr/share/icons but you can place it wherever you want. If in home folder just add that path in desktop file. It is up to you
Last edited by the_waiter; 07-06-2020 at 05:44 AM.
Is there a way to monitor all the events going off?
Basically BodHi can "tell" when the screen is folded back, as it automatically disables the touch pad when I fold the screen back... so is there a way to monitor all the events so I can see what event is triggering to do that and then somehow "monitor" for that event and add my on-off_Keyboard script to trigger when it happens?
I think that is what this script I was looking at does, but I can not work out how to get it working.
sounds like trying to write a udev rule for the event that occurs when your screen is folded. i don't know if there will be info for the exact event that you are describing, but if you run journactl -f when you do something like disable wifi or insert a usb you can see all kinds of identifying information about the process (possibly dmesg output?) that may help to figure out how your system identifies that event as well as the mechanism (switch/input device) behind it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.