Bug 499896

Summary: Power Management doesn't work on a system using tuned
Product: [Plasma] plasmashell Reporter: Pavel Dobiáš <pavel23dob>
Component: Power management & brightnessAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: nicolas.fella
Priority: NOR    
Version First Reported In: 6.3.0   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Power management page crash info

Description Pavel Dobiáš 2025-02-12 16:46:16 UTC
Created attachment 178197 [details]
Power management page crash info

SUMMARY
Power Management seems entirely broken on Fedora 41 after the 6.3.0 update. Fedora uses tuned for handling power profiles and its logs show clear problems:
Log file at /var/log/tuned/tuned.log shows an error when plasma components attempt to query battery and power profile information.

Here is a small snippet of the log:
```
2025-02-12 17:02:06,484 INFO     tuned.exports.dbus_exporter: action 'org.freedesktop.UPower.PowerProfiles.switch-profile' requested by caller ':1.69' wasn't authorized, ignoring the request
2025-02-12 17:02:08,698 INFO     tuned.exports.dbus_exporter: action 'org.freedesktop.UPower.PowerProfiles.switch-profile' requested by caller ':1.94' wasn't authorized, ignoring the request
2025-02-12 17:02:15,659 INFO     tuned.exports.dbus_exporter: action 'org.freedesktop.UPower.PowerProfiles.switch-profile' requested by caller ':1.111' wasn't authorized, ignoring the request
2025-02-12 17:02:22,123 INFO     tuned.exports.dbus_exporter: action 'org.freedesktop.UPower.PowerProfiles.switch-profile' requested by caller ':1.121' wasn't authorized, ignoring the request
```

Power management page in system settings crashes the whole app. The crash info has been added as an attachment.
Plasmashell battery widgets doesn't show battery percentage or anything else related to power profiles or battery and claims its not supported.

STEPS TO REPRODUCE
1. Get KDE Plasma on Fedora 41 with tuned in use on a device with battery and power profiles support
2. Try interacting with power management features in plasma
3.  Observe broken behavior

OBSERVED RESULT
Nothing related to power management works on the laptop

EXPECTED RESULT
Power management allows me switch profiles, set up automatic behaviors, see battery percentages and else

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.12.11-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × 11th Gen Intel® Core™ i7-11800H @ 2.30GHz
Memory: 31.0 GiB of RAM
Graphics Processor 1: Intel® UHD Graphics
Graphics Processor 2: NVIDIA GeForce RTX 3060 Laptop GPU
Comment 1 Nicolas Fella 2025-02-12 17:41:20 UTC
The systemsettings crash you attached doesn't look related to tuned at all.

Can you please show the output of "systemctl --user status plasma-powerdevil.service"?
Comment 2 Pavel Dobiáš 2025-02-12 18:06:11 UTC
(In reply to Nicolas Fella from comment #1)
> The systemsettings crash you attached doesn't look related to tuned at all.
> 
> Can you please show the output of "systemctl --user status
> plasma-powerdevil.service"?
Here's the output:
```
× plasma-powerdevil.service - Powerdevil
     Loaded: loaded (/usr/lib/systemd/user/plasma-powerdevil.service; static)
    Drop-In: /usr/lib/systemd/user/service.d
             └─10-timeout-abort.conf
     Active: failed (Result: exit-code) since Wed 2025-02-12 18:05:25 CET; 57min ago
   Duration: 27ms
 Invocation: 616da5c09beb405baaf574dca4f681da
    Process: 6646 ExecStart=/usr/libexec/org_kde_powerdevil (code=exited, status=255/EXCEPTION)
   Main PID: 6646 (code=exited, status=255/EXCEPTION)

Feb 12 18:05:25 fedora systemd[2669]: plasma-powerdevil.service: Scheduled restart job, restart counter is at 25.
Feb 12 18:05:25 fedora systemd[2669]: plasma-powerdevil.service: Start request repeated too quickly.
Feb 12 18:05:25 fedora systemd[2669]: plasma-powerdevil.service: Failed with result 'exit-code'.
Feb 12 18:05:25 fedora systemd[2669]: Failed to start plasma-powerdevil.service - Powerdevil.
```
Just to clarify idk how much this is a tuned issue or anything, I've only specified it so it's clear what the stack is.
Comment 3 Nicolas Fella 2025-02-12 18:14:21 UTC
Thanks. For powerdevil not running see https://bugs.kde.org/show_bug.cgi?id=499879

The systemsettings crash looks unrelated and not new, we have similar crash reports in https://crash-reports.kde.org/organizations/kde/issues/131886
Comment 4 Nicolas Fella 2025-02-12 18:22:58 UTC
Please see https://bugs.kde.org/show_bug.cgi?id=499879#c6
Comment 5 Nicolas Fella 2025-02-12 19:16:16 UTC
The root cause is the same as in 499879, so I'm marking it as duplicate

*** This bug has been marked as a duplicate of bug 499879 ***