Power Button No Longer Triggers Shutdown

Hoping someone can help… As of the other day—Monday, maybe—my power button doesn’t trigger a shutdown prompt despite being set to do so.

Any ideas where I can start troubleshooting?

1 Like

I would run journalctl -f and while it’s running, hit the power button and see if you get any helpful output there that you can share with us.

2 Likes

Thanks for the suggestion. While running journalctl -f and hitting the power button, nothing happens; that is, there are no new lines displayed. It seems the system isn’t even registering the key as pressed…

1 Like

could you check if the button is okay? It could be a mechanical failure.

Button’s good, as that’s how I turn on the laptop.

Any other cli things I can try? Anything systemd related?

1 Like

Does
journalctl | grep -i 'power button\|power key' | less
get you any information?

Well, I’m not sure… The output seems to suggest the button is being pressed even when it isn’t or I could be reading the results incorrectly; that is:

Sep 07 14:16:11 fedora kernel: ACPI: Power Button [PWRB]
Sep 07 14:16:16 fedora systemd-logind[892]: Watching system buttons on /dev/input/event1 (Power Button)
Sep 07 14:20:08 fedora systemd-logind[892]: Watching system buttons on /dev/input/event1 (Power Button)
Sep 07 15:13:36 fedora kernel: input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
Sep 07 15:13:36 fedora kernel: ACPI: button: Power Button [PWRB]
Sep 07 15:13:41 fedora systemd-logind[907]: Watching system buttons on /dev/input/event1 (Power Button)
Sep 07 21:06:48 fedora kernel: input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
Sep 07 21:06:48 fedora kernel: ACPI: button: Power Button [PWRB]
Sep 07 21:06:53 fedora systemd-logind[909]: Watching system buttons on /dev/input/event1 (Power Button)
Sep 08 05:04:07 fedora kernel: input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
Sep 08 05:04:07 fedora kernel: ACPI: button: Power Button [PWRB]
Sep 08 05:04:12 fedora systemd-logind[916]: Watching system buttons on /dev/input/event1 (Power Button)
Sep 08 05:42:06 fedora systemd-logind[916]: Power key pressed.
Sep 08 19:34:40 fedora kernel: input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
Sep 08 19:34:40 fedora kernel: ACPI: button: Power Button [PWRB]
Sep 08 19:34:45 fedora systemd-logind[895]: Watching system buttons on /dev/input/event1 (Power Button)
Sep 08 20:59:54 fedora systemd-logind[895]: Power key pressed.
Sep 09 04:07:26 fedora kernel: input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
Sep 09 04:07:26 fedora kernel: ACPI: button: Power Button [PWRB]
Sep 09 04:07:31 fedora systemd-logind[909]: Watching system buttons on /dev/input/event1 (Power Button)
Sep 09 16:32:18 fedora kernel: input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
Sep 09 16:32:18 fedora kernel: ACPI: button: Power Button [PWRB]

And that, basically, repeats endlessly.

Change it to some other options with that power button and try if that works or not.

Since the power button isn’t under the control of keyboard shortcuts, I’m not sure how I could do this; suggestions?

Can you take a look at:

sudo libinput debug-events --verbose --device /dev/input/event1
It should look something like the below when the power button is pressed while it is running.

libinput version: 1.20.1
event1 - Power Button: is tagged by udev as: Keyboard
event1 - Power Button: device is a keyboard
-event1 DEVICE_ADDED Power Button seat0 default group1 cap:k
event1 KEYBOARD_KEY +0.000s KEY_POWER (116) pressed
event1 KEYBOARD_KEY +0.000s KEY_POWER (116) released

You can also look at:
dbus-monitor

you’ll probably want to tee this out to a file as it’s noisy.

For shutdown and suspend I saw in the dbus monitor output the button press:

variant string “/dev/input/event1”

For shutdown I saw

method call time=1650713810.280054 sender=:1.51 → destination=:1.14 serial=81 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=Shutdown

For Suspend after /dev/input/event1 output I saw

method call time=1650715031.805593 sender=:1.49 → destination=:1.16 serial=131 path=/org/gnome/Mutter/DisplayConfig; interface=org.freedesktop.DBus.Properties; member=Set
string “org.gnome.Mutter.DisplayConfig”
string “PowerSaveMode”
variant int32 3

I think @frankjunior was referring to was switching between power off and suspend.

power off i get a prompt and it powers down
suspend it immediately suspends.

1 Like

Thanks for the suggestions…

There is no output, at all, for the libinput debug-events piece nor for dbus-monitor; essentially, it appears Fedora isn’t recognizing the button as pushed.

Changing the button action from “shutdown” to “suspend” does nothing, either.

Does it show up when you do:
sudo libinput list-devices

Yup:

Device:           Power Button
Kernel:           /dev/input/event1
Group:            3
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a
1 Like

So, in going back over the output from some of the commands above, I noticed something odd. Running sudo libinput debug-events --verbose --device /dev/input/event1 gives:

event1  - Power Button: is tagged by udev as: Keyboard
event1  - Power Button: device is a keyboard
-event1   DEVICE_ADDED            Power Button                      seat0 default group1  cap:k

I didn’t think anything about that was strange until I looked at the output of sudo libinput list-devices, which gives, in part:

Device:           Power Button
Kernel:           /dev/input/event1
Group:            3
Seat:             seat0, default
Capabilities:     keyboard 

What caught me off-guard was the “group” number; i.e., the debug-events command lists the power button as “Group 1,” but the list-devices seems to say it’s “Group 3.”

Does that even matter?

Can you run dnf info gnome-power-manager and see witch package is installed (from updates or fedora repos).If you have updated package then we can downgrade like sudo dnf downgrade gnome-power-manager and see if that fix problem

Name         : gnome-power-manager
Version      : 3.32.0
Release      : 7.fc35
Architecture : x86_64
Size         : 212 k
Source       : gnome-power-manager-3.32.0-7.fc35.src.rpm
Repository   : fedora

Is there a way to tell the last time it was upgraded?

Dnf history info

sudo dnf history info gnome-power-manager provides “No transaction which manipulates package ‘gnome-power-manager’ was found.”

fwiw, I just did today’s updates and nothing’s changed.

dnf history gnome-power-manager

Nooo
dnf history
Then pick the id that you want to know about.
Then try dnf history info id
Id means no.