Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#75866 - [thinkpad_acpi] X380 Yoga randomly boots in tablet mode, no integrated keyboard input

Attached to Project: Arch Linux
Opened by xa (xa) - Saturday, 10 September 2022, 11:10 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 26 October 2022, 20:10 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To No-one
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
On a Thinkpad X380 Yoga with LUKS on a partition I face the issue of, sometimes, not being able to enter the password upon booting. When this happens, I have to connect a USB keyboard to enter the password. After starting up, the integrated keyboard works again, with the keyboard lights turned on that were previously turned off at the encrypt stage. After reading journalctl, I discovered the following line:

kernel: thinkpad_acpi: Tablet mode switch found (type: GMMS), currently in tablet mode

Whenever I was able to enter the password, this was set to "laptop mode". Whenever I couldn't do that, it was set to "tablet mode". After reading the German ubuntuusers article on Thinkpad ACPI [0] and the docs of thinkpad-acpi [1], I created the following file:

$ cat /etc/modprobe.d/thinkpad_acpi.conf
options thinkpad_acpi hotkey_tablet_mode=0

However, I still sometimes can't use the integrated keyboard and later find out that it was tablet mode, again.

Note that the keyboard never works in the GRUB menu, neither the integrated nor a USB keyboard, in both the laptop and tablet mode.

When shutting down, I always put the laptop in laptop mode. From /etc/mkinitcpio.conf:

MODULES=(atkbd ext4)
[...]
HOOKS=(base udev keyboard modconf block encrypt filesystems fsck)

I removed the autodetect hook in hope that it improves the situation, but it does not.

Additional info:
linux: 5.19.7.arch1-1
ThinkPad ACPI Extras v0.26

Steps to reproduce:
Happens seemingly random.

[0] https://wiki.ubuntuusers.de/Thinkpad_ACPI/#Speichern
[1] https://www.kernel.org/doc/Documentation/laptops/thinkpad-acpi.txt
This task depends upon

Closed by  Toolybird (Toolybird)
Wednesday, 26 October 2022, 20:10 GMT
Reason for closing:  None
Additional comments about closing:  "See latest comment, I'm no longer using Arch."
Comment by xa (xa) - Saturday, 10 September 2022, 11:16 GMT
Searching the message from journalctl in thinkpad_acpi's code led me to this line of code:

pr_info("Tablet mode switch found (type: %s), currently in %s mode\n",

https://github.com/torvalds/linux/blob/master/drivers/platform/x86/thinkpad_acpi.c#L3140

Looking there, it seems like the hotkey_gmms_get_tablet_mode() function is responsible for detecting laptop/tablet mode:

https://github.com/torvalds/linux/blob/master/drivers/platform/x86/thinkpad_acpi.c#L1964
Comment by Toolybird (Toolybird) - Thursday, 15 September 2022, 23:05 GMT
Did this work previously and now it doesn't i.e. is it a regression? Is your firmware on the latest? Either way, it smells like an upstream problem so you might have better luck reporting it to some kernel folks who work on this stuff. I couldn't find much online after searching for a while. There's not much Arch can do about these "special" hardware problems.
Comment by xa (xa) - Friday, 16 September 2022, 07:19 GMT
Hey Toolybird,

thanks for responding! I got this laptop in March, and the pre-installed Windows worked fine, so I was installing Arch on it for the first time and it did not work since the beginning. I.e., it's not a regression. I think my firmware is the latest, because I installed the intel-ucode package and regenerated the GRUB configuration. But that's a good hint, there might be more firmware that I could update. iirc, I wanted to update the BIOS in March but it was already the newest.

I think I'll then report this upstream and keep you updated here. Thanks for your time!
Comment by Kevin (anonymous_user) - Sunday, 25 September 2022, 04:45 GMT
Looks like the latest BIOS update was in August so you can try that.
Comment by xa (xa) - Friday, 14 October 2022, 13:32 GMT
Thanks for the hint, Kevin! I updated to the newest BIOS version, but sadly still suffer from the same problem. Still didn't report upstream, though.
Comment by xa (xa) - Wednesday, 26 October 2022, 12:30 GMT
For some 2 weeks I'm now on Fedora and there everything is working fine. So this issue is related to Arch Linux/my setup, but since I don't use it anymore, I think this issue can be closed.

Loading...