[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2017-02-09 Thread Alex Hung
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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-12-06 Thread Lorn Potter
** 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:

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-12-06 Thread Lorn Potter
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 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-12-06 Thread Alex Hung
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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-12-06 Thread Alex Hung
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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-12-06 Thread Alex Hung
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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-12-06 Thread Alex Hung
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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-12-05 Thread Lorn Potter
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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-11-30 Thread Alex Hung
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.

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-11-29 Thread Lorn Potter
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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-11-29 Thread Lorn Potter
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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-11-29 Thread Alex Hung
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.

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-11-29 Thread Alex Hung
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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-11-29 Thread Lorn Potter
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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-11-29 Thread Joseph Salisbury
** 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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-11-29 Thread Lorn Potter
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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-11-28 Thread Alex Hung
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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-11-28 Thread Alex Hung
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

[Bug 1644670] Re: cannot use tablet mode lid sensor on yoga 460

2016-11-27 Thread Lorn Potter
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: