Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
0 answers
287 views
Tablet mode switching events are incorrect on Lenovo Yoga 7 2-in-1 laptop
I'm using a Lenovo Yoga 7 14ARP8. Currently on NixOS, but this issue seems to happen on other distros including Fedora. ## The issue This laptop has a 360 degree hinge that allows it to become a tablet of sorts. When flipped above 180 degrees on Windows the keyboard and touchpad are disabled (And th...
I'm using a Lenovo Yoga 7 14ARP8. Currently on NixOS, but this issue seems to happen on other distros including Fedora. ## The issue This laptop has a 360 degree hinge that allows it to become a tablet of sorts. When flipped above 180 degrees on Windows the keyboard and touchpad are disabled (And the backlight turns off). While completly flipping the keyboard around 360 degrees has a similar effect (without turning off backlight) and triggers the "Tablet mode" on KDE Plasma, the keyboard and touchpad continue to be enabled anywhere between 180 and 360 degrees, meaning if I set the keyboard to be facing the ground as a stand, random keys may be pressed. ## Debugging the events The first thing I tried was running a sudo libinput debug-events and flipping the keyboard while it's running. The result is this: As I flip it to 360:\ `-event12 SWITCH_TOGGLE +4294967.295s switch tablet-mode state 1` As I flip it away from 360:\ ` event12 SWITCH_TOGGLE +2.300s switch tablet-mode state 0` Going beyond 180 does not affect the "tablet-mode" state. ## The responsible modules It seems this switch is controlled by the lenovo_ymc module, but there's also a ymc_ec_trigger option in the ideapad_laptop module, however enabling that didn't fix the issue. ideapad_laptop seems to have fixes for the previous gen of this laptop (Yoga 7 14ARP7) but not this one. Within the lenovo_ymc module there is this code:
c
static const struct key_entry lenovo_ymc_keymap[] = {
	/* Laptop */
	{ KE_SW, 0x01, { .sw = { SW_TABLET_MODE, 0 } } },
	/* Tablet */
	{ KE_SW, 0x02, { .sw = { SW_TABLET_MODE, 1 } } },
	/* Drawing Board */
	{ KE_SW, 0x03, { .sw = { SW_TABLET_MODE, 1 } } },
	/* Tent */
	{ KE_SW, 0x04, { .sw = { SW_TABLET_MODE, 1 } } },
	{ KE_END },
};
I'm not sure how it determines when the laptop is in "Tablet" mode, but should be sending the event even in "Tent" mode or "Drawing Board" mode. It seems though those aren't getting triggered or are skipped. I am thinking of reporting this as a bug to the linux kernel, but I wanted to post it here in case anyone can help.
Iris Hormoviti (1 rep)
Sep 17, 2024, 05:41 PM • Last activity: Jun 23, 2025, 09:04 AM
0 votes
0 answers
89 views
Power button used for both suspend and wake up: device suspends again right after waking up
I have a Lenovo Duet 3 with PostmarketOS 24.12 aarch64, GNOME 47 and openRC. The tablet has a power button which suspends the tablet to RAM when pressed, but when the tablet is suspended it is also the only button to wake it up, if we ignore the detachable keyboard. The issue is that the press of th...
I have a Lenovo Duet 3 with PostmarketOS 24.12 aarch64, GNOME 47 and openRC. The tablet has a power button which suspends the tablet to RAM when pressed, but when the tablet is suspended it is also the only button to wake it up, if we ignore the detachable keyboard. The issue is that the press of the button during the sleep results in the keypress event being propagated to the system as soon as the tablet wakes up, which then goes to sleep again right after. This is the output of evtest right after I pressed the power button in order to suspend and then wake up right after:
~ $ evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0:	cros_ec_buttons
/dev/input/event1:	Whiskers Tablet Mode Switch
/dev/input/event10:	keyd virtual pointer
/dev/input/event2:	hid-over-i2c 0603:604A
/dev/input/event3:	hid-over-i2c 0603:604A Stylus
/dev/input/event5:	hid-over-i2c 0603:604A UNKNOWN
/dev/input/event7:	sc7180-rt5682-max98357a-1mic Headset Jack
/dev/input/event8:	sc7180-rt5682-max98357a-1mic HDMI Jack
/dev/input/event9:	keyd virtual keyboard
Select the device event number [0-10]: 
0
Input driver version is 1.0.1
Input device ID: bus 0x6 vendor 0x0 product 0x0 version 0x1
Input device name: "cros_ec_buttons"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 116 (KEY_POWER)
  Event type 5 (EV_SW)
    Event code 0 (SW_LID) state 0
Key repeat handling:
  Repeat type 20 (EV_REP)
    Repeat code 0 (REP_DELAY)
      Value    250
    Repeat code 1 (REP_PERIOD)
      Value     33
Properties:
Testing ... (interrupt to exit)


Event: time 1738621056.283673, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
Event: time 1738621056.283673, -------------- SYN_REPORT ------------
Event: time 1738621056.416707, type 1 (EV_KEY), code 116 (KEY_POWER), value 0
Event: time 1738621056.416707, -------------- SYN_REPORT ------------
Event: time 1738621063.098269, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
Event: time 1738621063.098269, -------------- SYN_REPORT ------------
Event: time 1738621063.197878, type 1 (EV_KEY), code 116 (KEY_POWER), value 0
Event: time 1738621063.197878, -------------- SYN_REPORT ------------
cidra (131 rep)
Feb 3, 2025, 10:52 PM
1 votes
0 answers
23 views
How can I tell if a tablet keyboard is detached?
I have a tablet that has a detachable keyboard. (CHUWI Hi10 Max) The tablet has a working accelerometer and can tell when it is rotated. ```cat /sys/class/dmi/id/chassis_type``` returns `32` which is the correct chassis_type for a "detachable". However, it doesn't seem to respond to the keyboard bei...
I have a tablet that has a detachable keyboard. (CHUWI Hi10 Max) The tablet has a working accelerometer and can tell when it is rotated.
/sys/class/dmi/id/chassis_type
returns 32 which is the correct chassis_type for a "detachable". However, it doesn't seem to respond to the keyboard being removed. Is there a utility or item is /dev or /sys that will give me the status of the keyboard being attached or not?
Gregory Arenius (277 rep)
Sep 12, 2024, 06:49 AM
2 votes
1 answers
337 views
Linux randomly enables and disables tablet mode on a Lenovo Thinkpad X1
I use a Lenovo Thinkpad X1 (Gen 6) laptop. Currently, I'm on Fedora. In the GRUB menu, the internal keyboard works as expected. While using the OS, the keyboard is mainly unresponsive, but sometimes gets enabled and directly after that disabled. This is what it looks like observed with `libinput deb...
I use a Lenovo Thinkpad X1 (Gen 6) laptop. Currently, I'm on Fedora. In the GRUB menu, the internal keyboard works as expected. While using the OS, the keyboard is mainly unresponsive, but sometimes gets enabled and directly after that disabled. This is what it looks like observed with libinput debug-events:
-event16  SWITCH_TOGGLE           +13.842s	switch tablet-mode state 0
-event15  SWITCH_TOGGLE           +13.843s	switch tablet-mode state 0
-event16  SWITCH_TOGGLE           +13.892s	switch tablet-mode state 1
-event15  SWITCH_TOGGLE           +13.892s	switch tablet-mode state 1
evtest shows what device those events are attached to:
/dev/input/event15:	ThinkPad Extra Buttons
/dev/input/event16:	Intel HID switches
libinput is on version 1.24.0. This problem occurs (at least) with the following distros: - OpenSUSE Tumbleweed - Vanilla OS Orchid - Arch - Fedora It would be best if I could make the tablet mode appear only when the laptop is "flipped", but completely disabling the tablet mode (or that the tablet mode disables the keyboard) is enough. --- I tried to disable it with:
export LIBINPUT_IGNORE_DEVICE="17 20"
I also tried disabling both events at the same time with:
evtest --grab /dev/input/event15
evtest --grab /dev/input/event16
Although libinput debug-events stopped reporting the tablet mode switching, it still occurred.
david-swift (21 rep)
Dec 2, 2023, 02:12 PM • Last activity: Feb 16, 2024, 09:05 AM
2 votes
1 answers
4288 views
Install LXLE on Lenovo Yoga tablet 2 1051L/F
I have pretty much tried everything I can find, but I haven't manged to get it to work. I have somehow managed to have [GRUB2][1] available with [WUBI][2], and have tried that way to start a live USB. Unfortunately, I have no idea how I've managed to get GRUB installed (I've tried for that long and...
I have pretty much tried everything I can find, but I haven't manged to get it to work. I have somehow managed to have GRUB2 available with WUBI , and have tried that way to start a live USB. Unfortunately, I have no idea how I've managed to get GRUB installed (I've tried for that long and I've forgotten to document things). In other words, how do I boot from a USB on a Lenovo Yoga tablet 2 1051L/F overview ? I do have a USB to micro USB and a USB hub with four ports, a keyboard, and a USB pen drive with LXLE on it, so I do have the hardware. Any help would be much appreciated.
Angus (123 rep)
Jun 28, 2019, 09:52 PM • Last activity: Oct 7, 2022, 03:21 PM
9 votes
1 answers
6340 views
Linux Tablet: Is there a way to enter a password with onscreen keyboard to unlock a LUKS crypto device during bootup?
I just installed Linux (Ubuntu, but it does not really matter) on an x86-based tablet. I also encrypted a partition which is mounted during bootup. Of course, one usually needs to enter the password to unlock the partition during bootup. **Is there a way to unlock (`cryptsetup luksOpen`) the partiti...
I just installed Linux (Ubuntu, but it does not really matter) on an x86-based tablet. I also encrypted a partition which is mounted during bootup. Of course, one usually needs to enter the password to unlock the partition during bootup. **Is there a way to unlock (cryptsetup luksOpen) the partition with onscreen keyboard (touchscreen only, no physical keyboard present!) *before* the first user logs in?** The onscreen keyboard (Onboard) works very well during login (in gdm or other display manager) and later on. I do realise X has not started at the normal time /etc/init.d/boot.crypto (or newer systemd) interactively requests passwords according to /etc/crypttab, so the question could mean, is there a way to defer unlocking until X has started (but before a user logs in). PS: The process usually showing the password prompt is plymouth which asks for a password using . It does use a graphical display mode but I think not X?! A lightdm integration would be the other alternative (with onscreen keyboard readily available).
Ned64 (9256 rep)
Aug 27, 2015, 01:02 PM • Last activity: May 30, 2021, 02:03 AM
2 votes
1 answers
735 views
Enabling coasting on a touchpad not recognised as such
I'm setting up a Linux (Devuan Beowulf) install for my Chuwi Hi10 Air tablet/hybrid PC. It's got a touchpad in the corresponding keyboard that's not a Synaptics but something else. Even MSWin doesn't have specific drivers for it; things like 2-finger scrolling and 2-finger-tap=right-click are done i...
I'm setting up a Linux (Devuan Beowulf) install for my Chuwi Hi10 Air tablet/hybrid PC. It's got a touchpad in the corresponding keyboard that's not a Synaptics but something else. Even MSWin doesn't have specific drivers for it; things like 2-finger scrolling and 2-finger-tap=right-click are done in the device itself. It does do coasting under MSWin, but I'm not seeing any option in the Linux psmouse kmod to do this in software. Any idea under which of the settings below the feature could be hidden, and how to activate it? (I'd tinker but have no idea how): > xinput list-props 13 Device 'HS-C109S-US-01-00- USB Keyboard Mouse': Device Enabled (172): 1 Coordinate Transformation Matrix (174): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Natural Scrolling Enabled (307): 0 libinput Natural Scrolling Enabled Default (308): 0 libinput Scroll Methods Available (311): 0, 0, 1 libinput Scroll Method Enabled (312): 0, 0, 0 libinput Scroll Method Enabled Default (313): 0, 0, 0 libinput Button Scrolling Button (314): 2 libinput Button Scrolling Button Default (315): 2 libinput Middle Emulation Enabled (316): 0 libinput Middle Emulation Enabled Default (317): 0 libinput Accel Speed (318): 0.000000 libinput Accel Speed Default (319): 0.000000 libinput Accel Profiles Available (320): 1, 1 libinput Accel Profile Enabled (321): 1, 0 libinput Accel Profile Enabled Default (322): 1, 0 libinput Left Handed Enabled (323): 0 libinput Left Handed Enabled Default (324): 0 libinput Send Events Modes Available (292): 1, 0 libinput Send Events Mode Enabled (293): 0, 0 libinput Send Events Mode Enabled Default (294): 0, 0 Device Node (295): "/dev/input/event8" Device Product ID (296): 7247, 99 libinput Drag Lock Buttons (309): libinput Horizontal Scroll Enabled (310): 1
RJVB (254 rep)
Aug 14, 2020, 11:36 AM • Last activity: Aug 15, 2020, 01:57 AM
2 votes
0 answers
1312 views
how can I remove an event from /dev/input/event*
some specs: os : kubuntu 18.04 driver : thinkapad_acpi 0.26 laptop : thinkpad x1 yoga gen4 I got a new laptop. It's a 2 in 1, I want to be able to use the keyboard in tablet as I'm plugged into an external monitor. In xinput there is a device called 'ThinkPad Extra Buttons' that is tied to the event...
some specs: os : kubuntu 18.04 driver : thinkapad_acpi 0.26 laptop : thinkpad x1 yoga gen4 I got a new laptop. It's a 2 in 1, I want to be able to use the keyboard in tablet as I'm plugged into an external monitor. In xinput there is a device called 'ThinkPad Extra Buttons' that is tied to the event /dev/input/event13 (this boot, it changes). I tracked that down using acpi_listen and libinput debug-events. Anyways I'm looking for a way to remove that event. Before I dug in this far I tried several things. 1. {en,dis}abling inputs via xinput 2. blocking the device with xorg.conf (it did prevent 'thinkpad extra buttons' from showing up but did not stop the behaviour of keyboard disable 3. disabling thinkpad_acpi and thinkpad_hwmon via sysfs(it's possible I did this wrong and it may be a valid solution) finding a way to remove that event is what I'm trying now. if that doesn't work I'll move on to trying to identify the actual tablet switch hardware device and somehow blacklisting it. So far I think the best way to do that is via sysfs but I could be wrong. when I did the above listed step 3. I ran
thinkpad_acpi > /sys/devices/platform/thinkpad_acpi/unbind
Is there somewhere some other driver I can try and unbind, I've tried a few but havn't gotten anything yet. I'm having trouble finding information about what all the paths and files mean. Is there some driver that is specifically responsible for tablet mode switch, if so how can I find it among the crazy circular sys tree and how can I verify that my unbind commands are going through? Most of this was derived from the commments on the first answer to this question: https://unix.stackexchange.com/questions/458486/how-to-completely-inhibit-lid-switch-events I have a better lead up to what I've done thus far here: https://www.reddit.com/r/linuxquestions/comments/fjh2zc/disable_tablet_mode_renable_inputs_on_thinkpad_x1/
gnarlyninja (378 rep)
Mar 17, 2020, 11:01 PM
2 votes
1 answers
339 views
Running GNU/Linux on a tablet, as of November 2018
There seems to be little information available about what distributions are able to operate tablets (tablet-computers). I'm specifically addressing 7in-10in "true" tablets, _not_ hybrid laptops with touchscreen and detachable keyboard. I've searched the web for several days (including this very site...
There seems to be little information available about what distributions are able to operate tablets (tablet-computers). I'm specifically addressing 7in-10in "true" tablets, _not_ hybrid laptops with touchscreen and detachable keyboard. I've searched the web for several days (including this very site). I found much information, but: - all of it is either obsolete, or so old that it's probably not relevant anymore. Example: the Ubuntu wiki still has pages about Ubuntu Touch, which has been abandoned by Canonical; I went to https://ubuntu-touch.io and https://ubports.com , but all pages are missing a date, and the FAQ refers to "16.04" as a future release whereas it seems to be released already. - I found contradicting evidence: some people say tablets are closer to smartphones than to laptops, especially as regards proprietary drivers for the tablet peripherals; others say that x86-powered tablets can run GNU/Linux just like laptops do. As an example I've skimmed through the openSUSE website and couldn't determine whether the current version is installable on a tablet, or under what conditions (regarding the tablet hardware). Ubuntu Touch promotes only 4 devices, among which only one is a tablet! (The other 3 are smartphones.) All this leads me to the conclusion that running GNU/Linux on a tablet is, at the time of this writing, either very delicate (but then, why so few up-to-date questions or pages on this subject?) or very straightforward (but then, why no mention at all of such an install on e.g. the openSUSE website?). I couldn't even find a relevant tag here. "tablet" refers to graphical tablets (digitizers), "tablet computer" didn't exist until I used it, "smartphone" isn't really relevant, "phablet" & "hybrid computer" wouldn't be if they existed... So the question is: can you point to GNU/Linux distributions that explicitly support (some) tablets? A link to an _up-to-date_ page stating the given distribution generally supports tablets, or listing supported models? (Something like https://wiki.ubuntu.com/Touch/Devices/Nexus , which is now both obsolete because Ubuntu doesn't support Touch anymore and outdated because the last tests date back to more than 4 years...)
L. Levrel (1523 rep)
Nov 18, 2018, 12:15 PM • Last activity: Dec 3, 2018, 07:32 PM
Showing page 1 of 9 total questions