Sample Header Ad - 728x90

Power button used for both suspend and wake up: device suspends again right after waking up

0 votes
0 answers
89 views
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 ------------
Asked by cidra (131 rep)
Feb 3, 2025, 10:52 PM