[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
I received a Yoga 260 and verified the patches in #15 (now in 4.10rc7). As I flipped the screen, acpi_listen indicated it received an event as below: ~$ acpi_listen PNP0C14:00 00a1 video/tabletmode TBLT 008A 0001 This is from HKEY event 0x60c0. However, this system can only generate 0x60c0 once after powering up or resuming from S3, and I cannot verified whether it provides correct tablet states on both flip and fold. You seem to get the events on both flip and fold and it should not be a problem for Yoga 460. The kernel is available @ http://people.canonical.com/~alexhung/LP1644670/ for your references. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
** Attachment added: "acpi.log" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+attachment/4788375/+files/acpi.log -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
Still do not see any events, other than in acpi_listen -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
It seems two upstream patches as below are addressing tablet mode. From their description, I believe it receives 0x60c0 and generates tablet mode event. https://patchwork.kernel.org/patch/9423615/ https://patchwork.kernel.org/patch/9423621/ I applied them to thinkpad_acpi.c to ubuntu-yakkety (but it is the same as current upstream) and attached it here. Please also try it as well. ** Attachment added: "thinkpad_acpi.c" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+attachment/4788289/+files/thinkpad_acpi.c -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
It seems two upstream patches as below are addressing tablet mode. From their description, I believe it receives 0x60c0 and generates tablet mode event. https://patchwork.kernel.org/patch/9423615/ https://patchwork.kernel.org/patch/9423621/ I applied them to thinkpad_acpi.c to ubuntu-yakkety (but it is the same as current upstream) and attached it here. Please also try it as well. ** Attachment added: "thinkpad_acpi.c" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+attachment/4788288/+files/thinkpad_acpi.c -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
Could you please attach the output of acpidump (sudo apt install acpidump && sudo acpidump > acpi.log). SW_TABLET_MODE seems to rely on couple ACPI control methods, ex. MHKG and DHKN. I'd like to check them from acpidump. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
Please try the attached thinkpad_acpi.c with comment #8 for KEY_ROTATE_DISPLAY again. ** Attachment added: "thinkpad_acpi.c" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+attachment/4788266/+files/thinkpad_acpi.c -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
KEY_ROTATE_DISPLAY does not get generated up to user level in that patch. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
The patch indeed skips acpi event. Can you also try "sudo showkey". In theory, event KEY_ROTATE_DISPLAY (153) should be generated with the key press. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
Digging around the thinkpad_acpi.c code, I see there is some code already for tablet and laptop modes, but for X41t, X60 and others. Namely tpacpi_input_send_tabletsw(void) that seems to send SW_TABLET_MODE (which makes more sense to me than KEY_ROTATE_DISPLAY) Not sure of this has to do with this , but I see two entries in the 'ThinkPad Extra Buttons" event node (as reported by evtest) Event code 582 (?) Event code 592 (?) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
without that thinkpad_acpi patch: ~ $> $sudo acpi_listen [sudo] password for lorn-potter: ibm/hotkey LEN0068:00 0080 60c0 PNP0C14:04 00b0 ibm/hotkey LEN0068:00 0080 60c0 PNP0C14:04 00b0 ibm/hotkey LEN0068:00 0080 60c0 with the patch: ~ $> $sudo acpi_listen [sudo] password for lorn-potter: PNP0C14:04 00b0 PNP0C14:04 00b0 The patch does quiet the message to syslog. Cannot seem to find any input event though. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
Alternatively, you can do it without install new kernel + load the updated kernel driver. This is useful if you wanna run on stock kernel or we want to test different version of thinkpad_acpi.c 1. download "thinkpad_acpi.tar" 2. run "tar -xvf thinkpad_acpi.tar" 3. run "cd thinkpad_acpi" 4. compile, unload and load thinkpad_acpi by "make && sudo make install" ** Attachment added: "thinkpad_acpi.tar" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+attachment/4784953/+files/thinkpad_acpi.tar -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
The deb package can be found @ http://people.canonical.com/~alexhung/LP1644670/ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
nevermind. I managed to build kernel package. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
** Changed in: linux (Ubuntu) Importance: Undecided => Medium ** Changed in: linux (Ubuntu) Status: Confirmed => Incomplete ** Changed in: linux (Ubuntu) Status: Incomplete => Triaged -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
don't suppose you have a kernel package you would share? :) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
The attached is a proof-of-concept solution - it adds an event generation (KEY_ROTATE_DISPLAY) in addition to http://comments.gmane.org/gmane.linux.kernel/2058487. Let's try whether this event is generated for userspace and whether it meets the need. If it does, I will work with upstream on a proper solution. ** Attachment added: "thinkpad_acpi.c" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+attachment/4784461/+files/thinkpad_acpi.c -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
The patch in http://comments.gmane.org/gmane.linux.kernel/2058487 is not in upstream yet, and it ignores HKEY event 0x60c0, but userspace will not know it occurs. It is not clear what is preferred for your needs, but it is possible to translate this HKEY event to a pre-defined scancode as below (kernel: include/uapi/linux/input-event-codes.h). That's how thinkpad-acpi does for many other events. #define KEY_ROTATE_DISPLAY 153 /* Display orientation for e.g. tablets */ I do not have a thinkpad with me, and I will modify thinkpad-acpi.c for you to test. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460
log files are linked to another similar bug in the description. ** Changed in: linux (Ubuntu) Status: Incomplete => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1644670 Title: cannot use tablet mode lid sensor on yoga 460 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1644670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs