[energy kcm] Remove bogus Has power supply property from UI
ClosedPublic

Authored by meven on Aug 13 2019, 4:02 PM.

Details

Summary

In a laptop when the ac line is unplugged, kinfocenter wrongly display that the ac power supply is plugged.
See screenshot, "Batterie" section says it is discharging, yet "Système" section reports "Adapteur secteur connect" which translates to "AC power line plugged".

This is due to "Power Supply" solid property being wrongly interpreted.
This solid property is always true for devices that can deliver power supply, whether or not there active or plugged.
See https://upower.freedesktop.org/docs/Device.html#Device:PowerSupply

Diff Detail

Repository
R102 KInfoCenter
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
meven created this revision.Aug 13 2019, 4:02 PM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 13 2019, 4:02 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
meven requested review of this revision.Aug 13 2019, 4:02 PM
meven edited the summary of this revision. (Show Details)Aug 13 2019, 4:05 PM
ngraham accepted this revision.Aug 13 2019, 4:58 PM

Good catch!

This revision is now accepted and ready to land.Aug 13 2019, 4:58 PM

That property is whether the selected battery powers the computer or is just a peripheral. Perhaps just the label must be changed?

That property is whether the selected battery powers the computer or is just a peripheral. Perhaps just the label must be changed?

That might be a better solution, indeed.

But is this information valuable here ?
I mean for batteries that are not power supply, the user might already have this information pretty clear.
Something like "mouse battery" somewhere. Unfortunately I don't have such a peripheral that is supported to test this case in the UI.
And for users without peripheral batteries this would lessen the signal to information ratio, as this "not a peripheral battery" is pointless when you have no peripheral battery.

meven updated this revision to Diff 63717.Aug 14 2019, 12:05 PM

[kcm energy] Display vendor and battery model

meven updated this revision to Diff 63718.Aug 14 2019, 12:11 PM

Fix mismatched commit

meven added a comment.Sun, Aug 18, 9:17 AM

Given:

  1. this is buggy right now
  2. not very informative even with a proper label

I am in favor of landing this as is.

This revision was automatically updated to reflect the committed changes.