Bug 502110 - Power profile widget does not reflect actual profile at login unless plasmashell is restarted
Summary: Power profile widget does not reflect actual profile at login unless plasmash...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Power and Battery widget (show other bugs)
Version: 5.27.12
Platform: Kubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-28 07:22 UTC by alexandre.martin
Modified: 2025-03-31 13:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alexandre.martin 2025-03-28 07:22:23 UTC
When logging in as a domain user (e.g. alexandre.martin@domain.local), the power profile plasmoid in the KDE system tray always shows "Balanced" at login, even though the actual profile may be different.

Clicking to change the profile causes the UI slider to immediately snap back to "Balanced", but the change is correctly applied in the system — as confirmed by:

    powerprofilesctl

After manually restarting plasmashell using:

    kquitapp5 plasmashell && kstart5 plasmashell

…the power profile widget then shows the correct profile and allows changes as expected.

This issue does NOT happen with local users, and only seems to affect domain users (possibly due to special characters like `.` or `@` in usernames, or timing delays at session startup).

---

🧪 Steps to reproduce:
1. Log in as a domain user (e.g. alexandre.martin@domain.local).
2. Open the battery widget.
3. Try changing the power profile.
4. Observe that the slider reverts visually, but `powerprofilesctl` confirms the change.
5. Restart plasmashell manually → the UI syncs correctly from that point on.

---

✅ Workaround:
Automatically restart plasmashell with a delay after login:
    sleep 10 && kquitapp5 plasmashell && kstart5 plasmashell

---

💡 Suggested cause:
Race condition between plasmashell and powerdevil/power-profiles-daemon at session start. The widget doesn’t resync once powerdevil becomes fully ready.

---

🛠️ System info:
- OS: Kubuntu 22.04 / 23.10
- KDE Plasma: [tu versión]
- Session: X11
- Login: domain user (via SSSD)
Comment 1 Nate Graham 2025-03-28 23:22:50 UTC
It sounds like this might be in some kind of large deployment; would you be able to tell us some of the details of how it was set up? You may be the first person to test this use case.

It would also be helpful if you could try with Plasma 6.3 somehow; Plasma 5.27 is very old and out of support from KDE at this point.
Comment 2 alexandre.martin 2025-03-31 09:07:57 UTC
I had version 5 because I'm using Kubuntu 24.04 (since it's LTS). When upgrading to 24.10, the issue was resolved, but these are corporate domain computers, so that's not really a solution. I don't understand why it works fine with a local user but fails with a domain user. I suspect it's because the domain user has a format like name.lastname@aimen — with dots and an at symbol in the username — and something about that probably causes issues.
Comment 3 Nate Graham 2025-03-31 13:53:33 UTC
> When upgrading to 24.10, the issue was resolved

That's good to hear! Since you're using an older version of Plasma, I would suggest you talk to the distro providing it; they're typically the ones who bear the responsibility of maintaining the older software they deliberately ship. Unfortunately KDE itself cannot provide support for very old Plasma versions anymore.