[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-12-05 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=474982

--- Comment #21 from Nate Graham  ---
Git commit afdd04821febd8c2b6ad983977721b34db112db7 by Nate Graham, on behalf
of Natalie Clarius.
Committed on 05/12/2023 at 16:55.
Pushed by ngraham into branch 'master'.

applets/battery: show app inhibitions even when manually inhibited too

It doesn't hurt to inform the user what other apps additionally hold
inhibitions, we don't hide the others when there are multiple app inhibitions
either, and it just adds complexity to the logic, so let's simply always show
all active inhibitions.

M  +3-8   
applets/batterymonitor/package/contents/ui/PowerManagementItem.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/afdd04821febd8c2b6ad983977721b34db112db7

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-12-05 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=474982

Nate Graham  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Latest Commit||https://invent.kde.org/plas
   ||ma/plasma-workspace/-/commi
   ||t/feaa8903e809c86473dc329bb
   ||58feddb82962ce1
 Resolution|--- |FIXED
   Version Fixed In|Qt 6.6  |6.0

--- Comment #20 from Nate Graham  ---
Git commit feaa8903e809c86473dc329bb58feddb82962ce1 by Nate Graham, on behalf
of Natalie Clarius.
Committed on 05/12/2023 at 16:53.
Pushed by ngraham into branch 'master'.

applets/battery: fix switch for manual inhibition falsely checked when
inhibited by some other app
FIXED-IN: 6.0

M  +1-0applets/batterymonitor/package/contents/ui/PopupDialog.qml
M  +2-1   
applets/batterymonitor/package/contents/ui/PowerManagementItem.qml
M  +6-4applets/batterymonitor/package/contents/ui/logic.js
M  +3-0applets/batterymonitor/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/feaa8903e809c86473dc329bb58feddb82962ce1

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-12-04 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=474982

--- Comment #19 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3655

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-12-04 Thread Jin Liu
https://bugs.kde.org/show_bug.cgi?id=474982

--- Comment #18 from Jin Liu  ---
(In reply to Natalie Clarius from comment #17)
> (In reply to Jin Liu from comment #14)
> 
> > BTW, I don't see why the applet hides inhibitors when the manual switch is
> > on.
> 
> I think the idea was that the information is redundant since when the manual
> inhibition is on, it won't go to sleep anyway. But the same applies to
> having more than one app inhibition, and it just makes the logic more
> complicated, so I would be fine with changing it to simply always showing
> all active inhibition sources.

Yeah. And also it would be consistent with the kscreen applet in that way.

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-12-04 Thread Natalie Clarius
https://bugs.kde.org/show_bug.cgi?id=474982

--- Comment #17 from Natalie Clarius  ---
(In reply to Jin Liu from comment #14)

> BTW, I don't see why the applet hides inhibitors when the manual switch is
> on.

I think the idea was that the information is redundant since when the manual
inhibition is on, it won't go to sleep anyway. But the same applies to having
more than one app inhibition, and it just makes the logic more complicated, so
I would be fine with changing it to simply always showing all active inhibition
sources.

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-12-04 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=474982

--- Comment #16 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3654

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-12-04 Thread Natalie Clarius
https://bugs.kde.org/show_bug.cgi?id=474982

Natalie Clarius  changed:

   What|Removed |Added

 Status|REOPENED|ASSIGNED

--- Comment #15 from Natalie Clarius  ---
Now it shows the inhibition after setting the manual inhibition switch to off
again, but it still incorrectly turns the manual inhibition switch on the first
time.

(In reply to Jin Liu from comment #14)
> The current implementation doesn't make sense at all...
> 
> The manual switch is bound to the data engine "PowerManagement" "Has
> Inhibition":
> https://github.com/KDE/plasma-workspace/blob/
> e254bf301a560b9d6d70968ac43a587edab7fe19/applets/batterymonitor/package/
> contents/ui/PowerManagementItem.qml#L41
> 
> Which bounds to org.freedesktop.PowerManagement.Inhibit.HasInhibitChanged:
> https://github.com/KDE/plasma-workspace/blob/
> de5a5dbf63c5d1fb91c1cf3a3f45553b9cca417b/dataengines/powermanagement/
> powermanagementengine.cpp#L219
> 
> The problem is the FDO service returns HasInhibit=true for *any* inhibitors.
> So this code would treat any inhibitor as manually enabled in the applet.
> 
> The correct implementation would be that Powerdevil manages a special "KDE
> manual inhibitor" whose state can be queried individually.
> 
> BTW, I don't see why the applet hides inhibitors when the manual switch is
> on.

That's correct, my mentioned drafted fix addresses this, will test again.

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-11-30 Thread Jin Liu
https://bugs.kde.org/show_bug.cgi?id=474982

Jin Liu  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|UPSTREAM|---

--- Comment #14 from Jin Liu  ---
The current implementation doesn't make sense at all...

The manual switch is bound to the data engine "PowerManagement" "Has
Inhibition":
https://github.com/KDE/plasma-workspace/blob/e254bf301a560b9d6d70968ac43a587edab7fe19/applets/batterymonitor/package/contents/ui/PowerManagementItem.qml#L41

Which bounds to org.freedesktop.PowerManagement.Inhibit.HasInhibitChanged:
https://github.com/KDE/plasma-workspace/blob/de5a5dbf63c5d1fb91c1cf3a3f45553b9cca417b/dataengines/powermanagement/powermanagementengine.cpp#L219

The problem is the FDO service returns HasInhibit=true for *any* inhibitors. So
this code would treat any inhibitor as manually enabled in the applet.

The correct implementation would be that Powerdevil manages a special "KDE
manual inhibitor" whose state can be queried individually.

BTW, I don't see why the applet hides inhibitors when the manual switch is on.

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-11-30 Thread Jin Liu
https://bugs.kde.org/show_bug.cgi?id=474982

--- Comment #13 from Jin Liu  ---
(In reply to Nate Graham from comment #12)
> Created attachment 163670 [details]
> Works for me

I'm on Arch, and have the same problem. It only shows inhibitors present when
the applet is loaded, not anything afterwards.

1. Ensure no inhibitor is present.
2. `systemd-inhibit bash`
3. In another konsole: `plasmoidviewer --applet org.kde.plasma.battery`
4. Click on the icon. It shows `bash` as the inhibitor.
5. Quit `bash`, then run `systemd-inhibit bash` again.
6. The bug.

Also notice that the kscreen applet shows the same info correctly, with roughly
the same code. And I added some logging in the battery applet's
DataSource.onDataChanged to verify that it indeed received the inhibitor list
correctly. The bug probably is not in dbus, but in the applet's own logic.

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-11-30 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=474982

--- Comment #12 from Nate Graham  ---
Created attachment 163670
  --> https://bugs.kde.org/attachment.cgi?id=163670=edit
Works for me

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-11-30 Thread Patrick Silva
https://bugs.kde.org/show_bug.cgi?id=474982

--- Comment #11 from Patrick Silva  ---
The bug persists on Arch Linux running Plasma 6 beta.

Operating System: Arch Linux 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Graphics Platform: Wayland

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-11-29 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=474982

--- Comment #10 from Nate Graham  ---
The bug itself. I now see explanations again.

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-11-29 Thread Natalie Clarius
https://bugs.kde.org/show_bug.cgi?id=474982

--- Comment #9 from Natalie Clarius  ---
(In reply to Nate Graham from comment #8)
> Can confirm it's fixed in Qt 6.6 for me.

Just the DBus connection failure or this bug?

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-11-29 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=474982

Nate Graham  changed:

   What|Removed |Added

   Version Fixed In||Qt 6.6

--- Comment #8 from Nate Graham  ---
Can confirm it's fixed in Qt 6.6 for me.

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-11-22 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=474982

David Edmundson  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |UPSTREAM
 CC||k...@davidedmundson.co.uk

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-11-17 Thread Pedro V
https://bugs.kde.org/show_bug.cgi?id=474982

Pedro V  changed:

   What|Removed |Added

 CC||voidpointertonull+bugskdeor
   ||g...@gmail.com

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-11-16 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=474982

Nate Graham  changed:

   What|Removed |Added

 CC||ad.liu@gmail.com

--- Comment #7 from Nate Graham  ---
*** Bug 477120 has been marked as a duplicate of this bug. ***

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-10-28 Thread Natalie Clarius
https://bugs.kde.org/show_bug.cgi?id=474982

--- Comment #6 from Natalie Clarius  ---
Apparently the dbus connection error is a bug in Qt that will be fixed in the
next release: https://codereview.qt-project.org/c/qt/qtbase/+/513362.

It may need another patch in the battery applet on top of it that I have a
draft for and will revisit once the upstream fix is out.

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-10-27 Thread Natalie Clarius
https://bugs.kde.org/show_bug.cgi?id=474982

--- Comment #5 from Natalie Clarius  ---
I'm getting that signal fine with dbus-monitor so currently out of ideas why
the applet's data engine fails to connect to it.

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-10-27 Thread Natalie Clarius
https://bugs.kde.org/show_bug.cgi?id=474982

--- Comment #4 from Natalie Clarius  ---
> Ah, quite possibly my fault with the recent sync manusl inhibition state fix

Nope, reverting it doesn't fix the bug. And that DBus error sounds not directly
related to that change anyway, so I'll look into that.

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-09-29 Thread Natalie Clarius
https://bugs.kde.org/show_bug.cgi?id=474982

Natalie Clarius  changed:

   What|Removed |Added

   Assignee|plasma-b...@kde.org |natalie_clar...@yahoo.de

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-09-29 Thread Natalie Clarius
https://bugs.kde.org/show_bug.cgi?id=474982

Natalie Clarius  changed:

   What|Removed |Added

 Status|CONFIRMED   |ASSIGNED

--- Comment #3 from Natalie Clarius  ---
(In reply to Nicolas Fella from comment #2)
> > qt.dbus.integration: Could not connect 
> > "org.kde.Solid.PowerManagement.PolicyAgent" to 
> > inhibitionsChanged(QList, QStringList) : Unregistered input 
> > type in parameter list: QList
> error connecting to inhibition changes via dbus
> 
> sounds related

Ah, quite possibly my fault with the recent sync manusl inhibition state fix,
I'll look into it

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-09-29 Thread Nicolas Fella
https://bugs.kde.org/show_bug.cgi?id=474982

Nicolas Fella  changed:

   What|Removed |Added

 CC||nicolas.fe...@gmx.de

--- Comment #2 from Nicolas Fella  ---
> qt.dbus.integration: Could not connect 
> "org.kde.Solid.PowerManagement.PolicyAgent" to 
> inhibitionsChanged(QList, QStringList) : Unregistered input 
> type in parameter list: QList
error connecting to inhibition changes via dbus

sounds related

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-09-28 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=474982

Nate Graham  changed:

   What|Removed |Added

   Severity|normal  |major

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-09-28 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=474982

Nate Graham  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Keywords||regression
 CC||natalie_clar...@yahoo.de,
   ||n...@kde.org
 Status|REPORTED|CONFIRMED

--- Comment #1 from Nate Graham  ---
Can reproduce. Seems like a recent regression, as I recall this working just a
week or two ago.

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

[plasmashell] [Bug 474982] Battery applet no longer tells why the power management is inhibited

2023-09-28 Thread Patrick Silva
https://bugs.kde.org/show_bug.cgi?id=474982

Patrick Silva  changed:

   What|Removed |Added

   Keywords||qt6

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