All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 210269] New: Tablet mode not correctly reported after wake-up from hibernate
@ 2020-11-19 15:39 bugzilla-daemon
  2020-11-19 16:46 ` [Bug 210269] " bugzilla-daemon
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: bugzilla-daemon @ 2020-11-19 15:39 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=210269

            Bug ID: 210269
           Summary: Tablet mode not correctly reported after wake-up from
                    hibernate
           Product: Drivers
           Version: 2.5
    Kernel Version: 5.9.9
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Platform_x86
          Assignee: drivers_platform_x86@kernel-bugs.osdl.org
          Reporter: j.r@jugendhacker.de
        Regression: No

I'm currently using a Lenovo Thinkpad X1 Yoga 2nd Gen which is a convertible.
If I fold it into tablet mode, go to hibernate / suspend, fold it back to
laptop mode (while powered off) and resume the system the tablet mode on/off is
not reported anymore until I fold it into tablet mode and back one time.

I debugged this via evemu-record which does not show 0 for SW_TABLET_MODE when
I resume in laptop mode.

I also tested if normal sleep / suspend to RAM is affected but there
SW_TABLET_MODE was correctly reported after resuming.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 210269] Tablet mode not correctly reported after wake-up from hibernate
  2020-11-19 15:39 [Bug 210269] New: Tablet mode not correctly reported after wake-up from hibernate bugzilla-daemon
@ 2020-11-19 16:46 ` bugzilla-daemon
  2020-11-19 17:06 ` bugzilla-daemon
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2020-11-19 16:46 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=210269

Benjamin Berg (benjamin@sipsolutions.net) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |benjamin@sipsolutions.net

--- Comment #1 from Benjamin Berg (benjamin@sipsolutions.net) ---
Yeah, the only thing that is missing here should be a call to
dytc_lapmode_refresh at resume time.

i.e. should be as simple as:
 * Adding a resume handler into dytc_driver_data
 * Add a call to dytc_lapmode_refresh there

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 210269] Tablet mode not correctly reported after wake-up from hibernate
  2020-11-19 15:39 [Bug 210269] New: Tablet mode not correctly reported after wake-up from hibernate bugzilla-daemon
  2020-11-19 16:46 ` [Bug 210269] " bugzilla-daemon
@ 2020-11-19 17:06 ` bugzilla-daemon
  2020-11-19 18:09 ` bugzilla-daemon
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2020-11-19 17:06 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=210269

--- Comment #2 from Benjamin Berg (benjamin@sipsolutions.net) ---
Er, sorry, this is tablet mode, not lapmode …

So, it looks like we already have a call to
  hotkey_tablet_mode_notify_change
in the resume handler. So I suspect that the sysfs file "hotkey_tablet_mode"
has the correct value. If that is the case, we'll need to add a call to
tpacpi_input_send_tabletsw into hotkey_resume.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 210269] Tablet mode not correctly reported after wake-up from hibernate
  2020-11-19 15:39 [Bug 210269] New: Tablet mode not correctly reported after wake-up from hibernate bugzilla-daemon
  2020-11-19 16:46 ` [Bug 210269] " bugzilla-daemon
  2020-11-19 17:06 ` bugzilla-daemon
@ 2020-11-19 18:09 ` bugzilla-daemon
  2020-11-19 18:14 ` bugzilla-daemon
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2020-11-19 18:09 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=210269

--- Comment #3 from Julian (j.r@jugendhacker.de) ---
Is there a way I could find out if this sysfs file has the correct value? I'm
not very experienced with Kernel internals so I don't really know how to find
out such stuff.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 210269] Tablet mode not correctly reported after wake-up from hibernate
  2020-11-19 15:39 [Bug 210269] New: Tablet mode not correctly reported after wake-up from hibernate bugzilla-daemon
                   ` (2 preceding siblings ...)
  2020-11-19 18:09 ` bugzilla-daemon
@ 2020-11-19 18:14 ` bugzilla-daemon
  2020-11-19 19:42 ` bugzilla-daemon
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2020-11-19 18:14 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=210269

Barnabás Pőcze (pobrn@protonmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pobrn@protonmail.com

--- Comment #4 from Barnabás Pőcze (pobrn@protonmail.com) ---
If I see it correctly

  cat /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode

should be the value you're looking for.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 210269] Tablet mode not correctly reported after wake-up from hibernate
  2020-11-19 15:39 [Bug 210269] New: Tablet mode not correctly reported after wake-up from hibernate bugzilla-daemon
                   ` (3 preceding siblings ...)
  2020-11-19 18:14 ` bugzilla-daemon
@ 2020-11-19 19:42 ` bugzilla-daemon
  2020-11-19 19:59 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2020-11-19 19:42 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=210269

--- Comment #5 from Benjamin Berg (benjamin@sipsolutions.net) ---
Yup, that should be the file (which will actually query ACPI for the status
each time you read it).

Julian, would you be able to test a patch for the thinkpad module?

I could create a kernel scratch build for Fedora, not sure about other distros.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 210269] Tablet mode not correctly reported after wake-up from hibernate
  2020-11-19 15:39 [Bug 210269] New: Tablet mode not correctly reported after wake-up from hibernate bugzilla-daemon
                   ` (4 preceding siblings ...)
  2020-11-19 19:42 ` bugzilla-daemon
@ 2020-11-19 19:59 ` bugzilla-daemon
  2020-11-19 20:03 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2020-11-19 19:59 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=210269

--- Comment #6 from Julian (j.r@jugendhacker.de) ---
Yeah Benjamin I could test a patch

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 210269] Tablet mode not correctly reported after wake-up from hibernate
  2020-11-19 15:39 [Bug 210269] New: Tablet mode not correctly reported after wake-up from hibernate bugzilla-daemon
                   ` (5 preceding siblings ...)
  2020-11-19 19:59 ` bugzilla-daemon
@ 2020-11-19 20:03 ` bugzilla-daemon
  2020-11-19 20:11 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2020-11-19 20:03 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=210269

--- Comment #7 from Julian (j.r@jugendhacker.de) ---
Just checked it and the sysfs file does contain a 0 after wakeup as you said
Benjamin.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 210269] Tablet mode not correctly reported after wake-up from hibernate
  2020-11-19 15:39 [Bug 210269] New: Tablet mode not correctly reported after wake-up from hibernate bugzilla-daemon
                   ` (6 preceding siblings ...)
  2020-11-19 20:03 ` bugzilla-daemon
@ 2020-11-19 20:11 ` bugzilla-daemon
  2020-11-21 13:40 ` bugzilla-daemon
  2020-11-21 14:17 ` bugzilla-daemon
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2020-11-19 20:11 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=210269

--- Comment #8 from Benjamin Berg (benjamin@sipsolutions.net) ---
Created attachment 293737
  --> https://bugzilla.kernel.org/attachment.cgi?id=293737&action=edit
Trivial patch to send the switch key event

I wonder if we should only do this if the switch actually changed. But I
suspect the input layer will already take care of that case.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 210269] Tablet mode not correctly reported after wake-up from hibernate
  2020-11-19 15:39 [Bug 210269] New: Tablet mode not correctly reported after wake-up from hibernate bugzilla-daemon
                   ` (7 preceding siblings ...)
  2020-11-19 20:11 ` bugzilla-daemon
@ 2020-11-21 13:40 ` bugzilla-daemon
  2020-11-21 14:17 ` bugzilla-daemon
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2020-11-21 13:40 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=210269

--- Comment #9 from Julian (j.r@jugendhacker.de) ---
Your patch seems to fix the problem Benjamin, thanks.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 210269] Tablet mode not correctly reported after wake-up from hibernate
  2020-11-19 15:39 [Bug 210269] New: Tablet mode not correctly reported after wake-up from hibernate bugzilla-daemon
                   ` (8 preceding siblings ...)
  2020-11-21 13:40 ` bugzilla-daemon
@ 2020-11-21 14:17 ` bugzilla-daemon
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2020-11-21 14:17 UTC (permalink / raw)
  To: platform-driver-x86

https://bugzilla.kernel.org/show_bug.cgi?id=210269

Hans de Goede (jwrdegoede@fedoraproject.org) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jwrdegoede@fedoraproject.or
                   |                            |g

--- Comment #10 from Hans de Goede (jwrdegoede@fedoraproject.org) ---
(In reply to Benjamin Berg from comment #8)
> I wonder if we should only do this if the switch actually changed. But I
> suspect the input layer will already take care of that case.

There is no need to check if the switch actually changed, as you already
presumed the input layer will filter out the event if there is no change.

(In reply to Julian from comment #9)
> Your patch seems to fix the problem Benjamin, thanks.

Awesome, thank you for testing.

Benjamin, can you submit the fix for this upstream please ? Then I'll pick it
up and merge it for the 5.11 cycle.

Note please add the following tags to the commit msg:

Fixes: dda3ec0aa631 ("platform/x86: thinkpad_acpi: Implement tablet mode using
GMMS method")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210269

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-11-21 14:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 15:39 [Bug 210269] New: Tablet mode not correctly reported after wake-up from hibernate bugzilla-daemon
2020-11-19 16:46 ` [Bug 210269] " bugzilla-daemon
2020-11-19 17:06 ` bugzilla-daemon
2020-11-19 18:09 ` bugzilla-daemon
2020-11-19 18:14 ` bugzilla-daemon
2020-11-19 19:42 ` bugzilla-daemon
2020-11-19 19:59 ` bugzilla-daemon
2020-11-19 20:03 ` bugzilla-daemon
2020-11-19 20:11 ` bugzilla-daemon
2020-11-21 13:40 ` bugzilla-daemon
2020-11-21 14:17 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.