https://bugs.kde.org/show_bug.cgi?id=529061

            Bug ID: 529061
           Summary: The power profile isn't switched after waking if the
                    charger was plugged in or unplugged during sleep
    Classification: Plasma
           Product: plasmashell
      Version First 6.7.5
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Power management & brightness
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: 1.0

DESCRIPTION
The PowerDevil for my laptop is set to use Performance on charging and Balanced
when running in battery. If the battery state is changed while the laptop is
asleep, the power profile stays wrong after waking up, with tuned-ppd logging
that PowerDevil's request as unauthorized. PowerDevil doesn't retry, so the
profile stays incorrect until the charger is plugged in or unplugged again
while awake. Once that meant performance mode was on battery for about an hour.

STEPS TO REPRODUCE
1. In System Settings → Power Management, set the AC profile to Performance and
the battery profile to Balanced.
2. While charger is plugged in, put the laptop to sleep 
3. Unplug the charger while it's asleep, then wake it up

OBSERVED RESULT
The profile stays on Performance while running on battery.
The log by tuned-ppd : 
"action 'org.freedesktop.UPower.PowerProfiles.switch-profile' requested by
caller ':1.50' wasn't authorized, ignoring the request"
The reverse scenario also happens (ie. plugging the charger in while asleep
leaves it on Balanced on AC)

EXPECTED RESULT
The profile matches the charger after waking

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 45 (KDE Plasma Desktop Edition)
KDE Plasma Version: 6.8.3
KDE Frameworks Version: 6.32.0
Qt Version: 6.11.2
Additional Versions: kernel 7.3.4, tuned-ppd 2.28.0 (Fedora's default profile
daemon), polkit 127, systemd 262.1, hybrid Intel with NVIDIA laptop.

ADDITIONAL INFORMATION:
A workaround would be a polkit rule allowing switch-profile for my user in any
session state, which fixed it. As PowerDevil runs as a user service outside of
login session, my guess would be that polkit doesn't see the session as active
yet at the point of wakeup

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to