ublue-os / bazzite

Bazzite is a custom image built upon Fedora Atomic Desktops that brings the best of Linux gaming to all of your devices - including your favorite handheld.
https://bazzite.gg
Apache License 2.0
3.63k stars 212 forks source link

KDE power management not detecting when laptop is unplugged #1341

Open SnartFridge opened 2 months ago

SnartFridge commented 2 months ago

Describe the bug

Hi there, I have been using Bazzite for a while now on my ASUS TUF F15 laptop, and it has amazing for gaming, however I have been encountering an issue where KDE power management does not seem to update whenever I unplug my laptop from the AC power. Instead, the battery icon still shows that the laptop is plugged in and no custom power saving setting in KDE power management are enabled. I ran journalctl -f in the terminal and found that there are errors which occur when unplugging, which I do not know how to fix. I was wondering if anyone could help solve this issue? Here is the output of the command:

Jun 28 11:41:04 fedora (udev-worker)[15399]: BAT1: Process '/bin/chmod 666 /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1/charge_control_start_threshold' failed with exit code 1.
Jun 28 11:41:04 fedora (udev-worker)[15399]: BAT1: Process '/bin/chmod 666 /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1/charge_start_threshold' failed with exit code 1.
Jun 28 11:41:04 fedora (udev-worker)[15399]: BAT1: Process '/bin/chmod 666 /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1/charge_stop_threshold' failed with exit code 1.
Jun 28 11:41:19 fedora (udev-worker)[15409]: BAT1: Process '/bin/chmod 666 /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1/charge_control_start_threshold' failed with exit code 1.
Jun 28 11:41:19 fedora (udev-worker)[15409]: BAT1: Process '/bin/chmod 666 /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1/charge_start_threshold' failed with exit code 1.
Jun 28 11:41:19 fedora (udev-worker)[15409]: BAT1: Process '/bin/chmod 666 /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1/charge_stop_threshold' failed with exit code 1.

What did you expect to happen?

I expect KDE to detect when the device is unplugged so that KDE power management can apply power saving settings (Like changing power mode and refresh rate) to save battery life and for KDE to detect when the device is plugged in to AC power to change power mode for performance etc.

Output of rpm-ostree status

State: idle
Deployments:
  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-asus-nvidia:stable
                   Digest: sha256:d19f993fc16048b6f4e97556ff97d315e4a2c6b7a565603b24bdf15dbba99254
                  Version: 40.20240707.0 (2024-07-08T00:00:28Z)
                     Diff: 62 upgraded, 1 removed

● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-asus-nvidia:stable
                   Digest: sha256:986158f8bb0f6f4b03f54229770706bbb3e8e843df5fbafea67c102108467412
                  Version: 40.20240706.0 (2024-07-06T07:26:30Z)

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-asus-nvidia:stable
                   Digest: sha256:29f0a0d5178dac2a336e8ef40dc5dcda45b0dd13cd91329d31f63557ef1f50e4
                  Version: 40.20240702.0 (2024-07-02T23:26:34Z)

Hardware

ASUS TUF Gaming F15 FX506LH_FX506LH

Extra information or context

N.A.

AuriseGames commented 1 month ago

Same problem here.

jul 30 05:49:43 bazzite (udev-worker)[18192]: BAT1: Process '/bin/chmod 666 /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1/charge_control_start_threshold' failed with exit code 1.
jul 30 05:49:43 bazzite (udev-worker)[18192]: BAT1: Process '/bin/chmod 666 /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1/charge_start_threshold' failed with exit code 1.
jul 30 05:49:43 bazzite (udev-worker)[18192]: BAT1: Process '/bin/chmod 666 /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1/charge_stop_threshold' failed with exit code 1.
jul 30 05:49:44 bazzite kernel: asus_wmi: Unknown key code 0xcf
jul 30 05:49:46 bazzite (udev-worker)[18192]: BAT1: Process '/bin/chmod 666 /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1/charge_control_start_threshold' failed with exit code 1.
jul 30 05:49:46 bazzite (udev-worker)[18192]: BAT1: Process '/bin/chmod 666 /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1/charge_start_threshold' failed with exit code 1.
jul 30 05:49:46 bazzite (udev-worker)[18192]: BAT1: Process '/bin/chmod 666 /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT1/charge_stop_threshold' failed with exit code 1.

Output of rpm-ostree status

State: idle
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-asus-nvidia:stable
                   Digest: sha256:8d2f9e887bf71072a42d1685039dc2698b4e5141d69fd7121eca69e2165e84d5
                  Version: 40.20240729.0 (2024-07-30T02:56:24Z)
          LayeredPackages: sunshine

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-asus-nvidia:stable
                   Digest: sha256:76a5c7d5f4ab8fed63de18117b2b7ba4e3c0610bdd2ceb3a088b1b5e82a41ff2
                  Version: 40.20240728.0 (2024-07-28T21:45:56Z)
          LayeredPackages: sunshine

Hardware