Summary: | Cant change power profiles with widget despite power-profiles-daemon being enabled and working | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Zoey Ahmed <bruhzakahmed420666> |
Component: | Battery Monitor | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jpetso, justin, kde, kde, natalie_clarius, nate, salvatore.c, sprit152009, tandiv15.bansal |
Priority: | NOR | ||
Version: | 6.1.0 | ||
Target Milestone: | 1.0 | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/-/commit/43ca4f3bf083651c2ac8b803596e3827ed8d5e76 | Version Fixed In: | 6.2.0 |
Sentry Crash Report: |
Description
Zoey Ahmed
2024-06-22 19:40:39 UTC
FWIW, I just checked and in the power management panel in the system tray it does report all the information correctly. https://imgur.com/gallery/squeak-squeak-r3NTw6j Let me confirm: You added a Power and Battery widget to your desktop, and displays different (incorrect) values there compared with the version in your system tray? But also in the original imgur album, the second image shows "No Batteries Available" when hovering over the system tray icon... so it's not just the stand-alone widget that's showing wrong values? (In reply to Jakob Petsovits from comment #2) > Let me confirm: You added a Power and Battery widget to your desktop, and > displays different (incorrect) values there compared with the version in > your system tray? That is correct. The system tray version is fine, but the standalone power widget is broken. > > But also in the original imgur album, the second image shows "No Batteries > Available" when hovering over the system tray icon... so it's not just the > stand-alone widget that's showing wrong values? Nope thats the standalone widget, the system tray power widget does show my battery, sorry for the confusion I'm also having that issue. I can look at battery level and infos in "Infos about System" in KDE Control Center but not in the Plasma Applet. Operating System: Arch Linux KDE Plasma Version: 6.1.0 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.1 Kernel Version: 6.9.6-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 5800HS with Radeon Graphics Memory: 22.9 GiB of RAM Graphics Processor: AMD Radeon Graphics Manufacturer: ASUSTeK COMPUTER INC. Product Name: ROG Zephyrus G14 GA401QH_GA401QH System Version: 1.0 systemctl status power-profiles-daemon.service ● power-profiles-daemon.service - Power Profiles daemon Loaded: loaded (/usr/lib/systemd/system/power-profiles-daemon.service; enabled; preset: disabled) Active: active (running) since Mon 2024-06-24 08:26:54 CEST; 45min ago Invocation: c8a43d5bc6864af6a60dc5cd506f3973 Main PID: 737 (power-profiles-) Tasks: 4 (limit: 28086) Memory: 1.5M (peak: 2.4M) CPU: 74ms CGroup: /system.slice/power-profiles-daemon.service └─737 /usr/lib/power-profiles-daemon giu 24 08:26:54 esseci-arch systemd[1]: Starting Power Profiles daemon... giu 24 08:26:54 esseci-arch systemd[1]: Started Power Profiles daemon. Can confirm same behavior, from a fresh install of KDE Plasma on Fedora 40, I added the "Power and Battery" widget to the panel, and it displays no batteries, as well as the power-profiles not supported message, relevant terminal outputs (https://pastebin.com/t75TdtHc). Additional information: Removing the widget and adding it again fixes the issue, but it will appear again on next boot. SPECS Operating System: Fedora Linux 40 KDE Plasma Version: 6.1.0 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.1 Kernel Version: 6.9.5-200.fc40.x86_64 (64-bit) Graphics Platform: Wayland Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz Memory: 31.1 GiB of RAM Graphics Processor: Mesa Intel® Xe Graphics Manufacturer: HP Product Name: HP Pavilion Laptop 15-eg0xxx System Version: Type1ProductConfigId I have the same issue. Operating System: Fedora Linux 40 KDE Plasma Version: 6.1.1 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.1 Kernel Version: 6.9.6-cb1.0.fc40.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 9 PRO 7940HS w/ Radeon 780M Graphics Memory: 58.6 ГиБ of RAM Graphics Processor: AMD Radeon 780M Manufacturer: HP Product Name: HP EliteBook 845 14 inch G10 Notebook PC System Version: SBKPF That widget does not work: https://i.imgur.com/UTY6H9W.png And this works as expected: https://i.imgur.com/rCqVYDU.png I'm using tuned: tuned-2.23.0-5.fc40.noarch tuned-ppd-2.23.0-5.fc40.noarch I am also experiencing the same issue. This happens every time I boot up linux. I am using an empty panel and I have added the battery as a widget in that. I have to manually remove and re-add the widget for it work properly. Linux/KDE Plasma: Arch Linux - 6.6.36-1-lts (64-bit) (available in About System) KDE Plasma Version: 6.1.1 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.2 Graphics Platform: Wayland Processors: Intel Core i7-1165G7 Memory: 16 GiB of RAM Graphics Processor: Intelgrated Intel Iris Xe Manufacturer: Lenovo Product Name: Lenovo Ideapad Slim 5i Pro I found something interesting about this bug, it would be useful if the others can confirm the behavior: This issue only appears if you boot WITH the charger connected, when booting the laptop without the charger connected (a.k.a. using battery) the issue is not reproducible. Fascinating. I can reproduce that with my Lenovo ThinkPad X1 Yoga (gen 4) laptop. Zoey, can you reproduce it as well? (In reply to César Montoya from comment #8) > I found something interesting about this bug, it would be useful if the > others can confirm the behavior: > > This issue only appears if you boot WITH the charger connected, when booting > the laptop without the charger connected (a.k.a. using battery) the issue is > not reproducible. I tried two times without the charger connected, I can't confirm what you saying, still the issue persist. Operating System: Arch Linux KDE Plasma Version: 6.1.3 KDE Frameworks Version: 6.4.0 Qt Version: 6.7.2 Kernel Version: 6.10.2-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 5800HS with Radeon Graphics Memory: 22.9 GiB of RAM Graphics Processor: AMD Radeon Graphics Manufacturer: ASUSTeK COMPUTER INC. Product Name: ROG Zephyrus G14 GA401QH_GA401QH System Version: 1.0 (In reply to Totore from comment #10) > (In reply to César Montoya from comment #8) > > I found something interesting about this bug, it would be useful if the > > others can confirm the behavior: > > > > This issue only appears if you boot WITH the charger connected, when booting > > the laptop without the charger connected (a.k.a. using battery) the issue is > > not reproducible. > > I tried two times without the charger connected, I can't confirm what you > saying, still the issue persist. > > > Operating System: Arch Linux > KDE Plasma Version: 6.1.3 > KDE Frameworks Version: 6.4.0 > Qt Version: 6.7.2 > Kernel Version: 6.10.2-arch1-1 (64-bit) > Graphics Platform: Wayland > Processors: 16 × AMD Ryzen 7 5800HS with Radeon Graphics > Memory: 22.9 GiB of RAM > Graphics Processor: AMD Radeon Graphics > Manufacturer: ASUSTeK COMPUTER INC. > Product Name: ROG Zephyrus G14 GA401QH_GA401QH > System Version: 1.0 And that is indeed my fault, forgot to add some details :P While trying to fix the issue I added "acpi_osi=Linux" to the kernel parameters, that's what mitigated the issue and made everything ok when booting without the charger connected, for reference. Give it a try and tell me if there's any difference. (In reply to César Montoya from comment #11) > (In reply to Totore from comment #10) > > (In reply to César Montoya from comment #8) > > > I found something interesting about this bug, it would be useful if the > > > others can confirm the behavior: > > > > > > This issue only appears if you boot WITH the charger connected, when booting > > > the laptop without the charger connected (a.k.a. using battery) the issue is > > > not reproducible. > > > > I tried two times without the charger connected, I can't confirm what you > > saying, still the issue persist. > > > > > > Operating System: Arch Linux > > KDE Plasma Version: 6.1.3 > > KDE Frameworks Version: 6.4.0 > > Qt Version: 6.7.2 > > Kernel Version: 6.10.2-arch1-1 (64-bit) > > Graphics Platform: Wayland > > Processors: 16 × AMD Ryzen 7 5800HS with Radeon Graphics > > Memory: 22.9 GiB of RAM > > Graphics Processor: AMD Radeon Graphics > > Manufacturer: ASUSTeK COMPUTER INC. > > Product Name: ROG Zephyrus G14 GA401QH_GA401QH > > System Version: 1.0 > > And that is indeed my fault, forgot to add some details :P > > While trying to fix the issue I added "acpi_osi=Linux" to the kernel > parameters, that's what mitigated the issue and made everything ok when > booting without the charger connected, for reference. > > Give it a try and tell me if there's any difference. Tried but nothing changed, the only workaround it's the one you mentioned before. Adding again the widget in the panel resolve the issue, but that has to be done every restart of the system. (In reply to Totore from comment #12) > Tried but nothing changed, the only workaround it's the one you mentioned > before. Adding again the widget in the panel resolve the issue, but that has > to be done every restart of the system. Sorry for the previous noise, I don't know how it solved consistently that time, but it is in fact not a solution, only workaround is what we already agreed upon I'm going to assume that the issue is in the way that the applet [1] initializes its values. When it is started, it sends a query to D-Bus once per D-Bus service ("org.kde.Solid.PowerManagement", "org.freedesktop.PowerManagement", "net.hadess.PowerProfiles") to see if the interface is present. If the D-Bus service does not exist at initialization time, the applet will stay empty forever. If any of the queried interfaces isn't online yet, e.g. because plasmashell and its wallpaper desktop area with widget were faster at starting up, then the widget will remain empty. I think it's likely that this is what we're seeing here. The applet should change its code to observe when an interface gets registered or unregistered, probably with a QDBusServiceWatcher. Once the interface is found or disappears, update the values for use by the applet's QML. [1] https://invent.kde.org/plasma/powerdevil/-/blob/0f8e6dabc0623305a449a3592ed7bbdf76f5548c/applets/batterymonitor/plugin/powermanagementcontrol.cpp (on master branch between 6.1 and 6.2) (In reply to Jakob Petsovits from comment #14) > I'm going to assume that the issue is in the way that the applet [1] > initializes its values. When it is started, it sends a query to D-Bus once > per D-Bus service ("org.kde.Solid.PowerManagement", > "org.freedesktop.PowerManagement", "net.hadess.PowerProfiles") to see if the > interface is present. If the D-Bus service does not exist at initialization > time, the applet will stay empty forever. > > If any of the queried interfaces isn't online yet, e.g. because plasmashell > and its wallpaper desktop area with widget were faster at starting up, then > the widget will remain empty. I think it's likely that this is what we're > seeing here. > > The applet should change its code to observe when an interface gets > registered or unregistered, probably with a QDBusServiceWatcher. Once the > interface is found or disappears, update the values for use by the applet's > QML. > > [1] > https://invent.kde.org/plasma/powerdevil/-/blob/ > 0f8e6dabc0623305a449a3592ed7bbdf76f5548c/applets/batterymonitor/plugin/ > powermanagementcontrol.cpp (on master branch between 6.1 and 6.2) Is this something you could start a merge request for? (In reply to Justin Zobel from comment #15) > Is this something you could start a merge request for? I can, but I have a few higher-priority tasks on my list that I'd like to land before 6.2 beta gets released. I'll add the "junior-jobs" label in the meantime, in case someone else is looking for a relatively easy fix to contribute :) A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/425 Git commit 8e698dbcdc9ce95095ea2739713fde05ca4822f5 by Jakob Petsovits. Committed on 19/09/2024 at 18:06. Pushed by jpetso into branch 'master'. applets/batterymonitor: React to D-Bus service (un)register events Previously, the "Power and Battery" applet only checked for the presence of PowerDevil's D-Bus services once when it starts up. This appears to (mostly?) work for applets embedded in a panel, but does not work for applets on the desktop itself. Likely there's a timing issue and applets on the desktop start sooner than PowerDevil will advertise its services. A better way to work is for the applet to monitor the bus for when the relevant services appear or disappear. When observing a service registered or unregistered event, the applet gets set up accordingly. This fixes the race condition for two out of three applet parts (power profiles, inhibitions) but does not fix battery status; the data for that is coming from `BatteryControlModel` in plasma-workspace. A similar fix will have to be implemented there. Related: bug 488915, bug 492859, bug 492945 M +88 -12 applets/batterymonitor/plugin/powermanagementcontrol.cpp M +10 -2 applets/batterymonitor/plugin/powermanagementcontrol.h M +77 -1 applets/batterymonitor/plugin/powerprofilescontrol.cpp M +10 -1 applets/batterymonitor/plugin/powerprofilescontrol.h https://invent.kde.org/plasma/powerdevil/-/commit/8e698dbcdc9ce95095ea2739713fde05ca4822f5 A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4729 Git commit 0979a34248efa8eac087e418a4cf4419549ece0c by Jakob Petsovits. Committed on 20/09/2024 at 12:26. Pushed by jpetso into branch 'master'. components/batterycontrol: React to D-Bus service (un)register events Previously, the "Power and Battery" applet only checked for the presence of PowerDevil's D-Bus services once when it starts up. This appears to (mostly?) work for applets embedded in a panel, but does not work for applets on the desktop itself. Likely there's a timing issue and applets on the desktop start sooner than PowerDevil will advertise its services. A better way to work is for the applet to monitor the bus for when the relevant services appear or disappear. When observing a service registered or unregistered event, the applet gets set up accordingly. This fixes the race condition for one out of three applet parts (battery state) but does not fix power profiles & inhibitions; these were fixed separately in the powerdevil repository via commit 8e698dbc. Related: bug 488915, bug 492859, bug 492945 M +82 -15 components/batterycontrol/batterycontrol.cpp M +6 -1 components/batterycontrol/batterycontrol.h https://invent.kde.org/plasma/plasma-workspace/-/commit/0979a34248efa8eac087e418a4cf4419549ece0c A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/428 Git commit 5e8cd380806da20d0b12bf97a3629ac70aa2b77c by Jakob Petsovits. Committed on 23/09/2024 at 21:41. Pushed by jpetso into branch 'Plasma/6.2'. applets/batterymonitor: React to D-Bus service (un)register events Previously, the "Power and Battery" applet only checked for the presence of PowerDevil's D-Bus services once when it starts up. This appears to (mostly?) work for applets embedded in a panel, but does not work for applets on the desktop itself. Likely there's a timing issue and applets on the desktop start sooner than PowerDevil will advertise its services. A better way to work is for the applet to monitor the bus for when the relevant services appear or disappear. When observing a service registered or unregistered event, the applet gets set up accordingly. This fixes the race condition for two out of three applet parts (power profiles, inhibitions) but does not fix battery status; the data for that is coming from `BatteryControlModel` in plasma-workspace. A similar fix will have to be implemented there. Related: bug 488915, bug 492859, bug 492945 M +88 -12 applets/batterymonitor/plugin/powermanagementcontrol.cpp M +10 -2 applets/batterymonitor/plugin/powermanagementcontrol.h M +77 -1 applets/batterymonitor/plugin/powerprofilescontrol.cpp M +10 -1 applets/batterymonitor/plugin/powerprofilescontrol.h https://invent.kde.org/plasma/powerdevil/-/commit/5e8cd380806da20d0b12bf97a3629ac70aa2b77c Git commit 43ca4f3bf083651c2ac8b803596e3827ed8d5e76 by Jakob Petsovits. Committed on 23/09/2024 at 21:48. Pushed by jpetso into branch 'Plasma/6.2'. components/batterycontrol: React to D-Bus service (un)register events Previously, the "Power and Battery" applet only checked for the presence of PowerDevil's D-Bus services once when it starts up. This appears to (mostly?) work for applets embedded in a panel, but does not work for applets on the desktop itself. Likely there's a timing issue and applets on the desktop start sooner than PowerDevil will advertise its services. A better way to work is for the applet to monitor the bus for when the relevant services appear or disappear. When observing a service registered or unregistered event, the applet gets set up accordingly. This fixes the race condition for one out of three applet parts (battery state) but does not fix power profiles & inhibitions; these were fixed separately in the powerdevil repository via commit 8e698dbc (master branch) / commit 5e8cd380 (Plasma/6.2). Related: bug 488915, bug 492859, bug 492945 M +82 -15 components/batterycontrol/batterycontrol.cpp M +6 -1 components/batterycontrol/batterycontrol.h https://invent.kde.org/plasma/plasma-workspace/-/commit/43ca4f3bf083651c2ac8b803596e3827ed8d5e76 |