You are not logged in.

#1 2022-03-24 00:45:36

samhildanach
Member
Registered: 2022-03-23
Posts: 3

No events when power button is pressed.

Hello everybody, I'm a newbie here and just started using Arch Linux.
There is a very weird problem after installing Arch -- power button of my laptop is not working at all. I tried to get power button event id using evtest and used od -x /dev/input/event0 looking for events, but there were no events while pressing power button.
My laptop is Honor Magicbook 15, and I am using XMonad as my window manager.

sudo evtest output is:

[root@zrcadlo /]# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:	Power Button
/dev/input/event1:	Lid Switch
/dev/input/event2:	AT Translated Set 2 keyboard
/dev/input/event3:	Video Bus
/dev/input/event4:	PC Speaker
/dev/input/event5:	Huawei WMI hotkeys
/dev/input/event6:	GXTP7863:00 27C6:01E0 Mouse
/dev/input/event7:	HD Camera: HD Camera
/dev/input/event8:	GXTP7863:00 27C6:01E0 Touchpad
/dev/input/event9:	HD-Audio Generic HDMI/DP,pcm=3
/dev/input/event10:	HD-Audio Generic Mic
/dev/input/event11:	HD-Audio Generic Headphone
Select the device event number [0-11]: ^C

Strange lines were found in the Xorg log files:

[   975.163] (II) event3  - Video Bus: is tagged by udev as: Keyboard
[   975.164] (II) event3  - Video Bus: device is a keyboard
[   975.165] (II) event0  - Power Button: is tagged by udev as: Keyboard
[   975.165] (II) event0  - Power Button: device is a keyboard
[   975.167] (II) event7  - HD Camera: HD Camera: is tagged by udev as: Keyboard
[   975.167] (II) event7  - HD Camera: HD Camera: device is a keyboard
[   975.169] (II) event6  - GXTP7863:00 27C6:01E0 Mouse: is tagged by udev as: Mouse Pointingstick
[   975.169] (II) event6  - GXTP7863:00 27C6:01E0 Mouse: device is a pointer
[   975.171] (II) event8  - GXTP7863:00 27C6:01E0 Touchpad: is tagged by udev as: Touchpad
[   975.174] (II) event8  - GXTP7863:00 27C6:01E0 Touchpad: device is a touchpad
[   975.175] (II) event5  - Huawei WMI hotkeys: is tagged by udev as: Keyboard
[   975.176] (II) event5  - Huawei WMI hotkeys: device is a keyboard
[   975.177] (II) event2  - AT Translated Set 2 keyboard: is tagged by udev as: Keyboard
[   975.177] (II) event2  - AT Translated Set 2 keyboard: device is a keyboard

Not sure, the power button should be tagged as keyboard. I also noticed that pressing the power button brings the laptop out of suspend but after waking up the power button still does not trigger any events.
I tried to find answers in similar topics here and using Google, but found nothing. Has someone came across the situation similar to this one? I will be glad for any help.
Thanks

Last edited by samhildanach (2022-03-24 09:22:26)

Offline

#2 2022-03-24 07:49:28

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: No events when power button is pressed.

https://man.archlinux.org/man/core/syst … .conf.5.en

Sanity check: how do you start the session and if it's startx/xinit, see the last link below.

Offline

#3 2022-03-24 10:58:18

samhildanach
Member
Registered: 2022-03-23
Posts: 3

Re: No events when power button is pressed.

Thank you for answer.

Yes, I edited /etc/systemd/logind.conf to control suspend on lid switch and also tried to set HandlePowerKey=poweroff, but power button is still not working.
Here is current  /etc/systemd/logind.conf file content:

[Login]
HandlePowerKey=poweroff
HandleLidSwitch=suspend
HandleLidSwitchDocked=ignore

I also tried to use acpid and edited /etc/acpi/handler.sh to handle power button pressing event, but there are no events when the button is pressed to be handled.

seth wrote:

Sanity check: how do you start the session and if it's startx/xinit, see the last link below.

I just installed lightdm and then systemctl enable lightdm to run it on startup. I also edited ~/.xprofile to add some options for keyboard layouts, run picom etc. So I did not use startx or xinit directly.

Offline

#4 2022-03-24 14:16:22

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Re: No events when power button is pressed.

Does it cause events in "/dev/input/event5:    Huawei WMI hotkeys" / "libinput debug-events"?
What if you blacklist huawei_wmi?
What if you pass "acpi_osi= " (nb. the blank space!) to the kernel?

Offline

#5 2022-03-24 15:03:18

samhildanach
Member
Registered: 2022-03-23
Posts: 3

Re: No events when power button is pressed.

No, I check every event listed in evtest output -- power button doesn't trigger anything.
There is no blacklist file in /etc/modprobe.d/ directory.
How do i pass "acpi = " parameter to the kernel? How this parameter can solve the problem?

Offline

#6 2022-03-24 15:49:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,705

Offline

Board footer

Powered by FluxBB