csd-power: add more device kinds#416
Conversation
Add more device types added in upower 0.99.12 for bluetooth classes. This prevents log spam in .xsession-errors, like: (csd-power:5461): csd-power-WARNING **: 18:38:13.719: enum unrecognised: 17
|
@mtwebster in 789b2ee you stated that Edit: I could add guards using the |
|
Nope, done with Focal as of May (I should have checked this when I did that other commit!) I see a small number of possibly active distros that still use that version: https://repology.org/project/upower/versions, but honestly at this point they could do their own patch if they need to. Maybe have a look, see what you think. |
|
I'll just add version check guards later. I also found more places where the device kinds should be handled as well. I'm not quite sure which code paths are really needed. There seems to be a lot of legacy code (in csd in general), which seems to have no visible effects in the Cinnamon DE. Is that intentional so that fixes from gsd can be backported more easily? Or should we clean it up? |
Gnome's power daemon is basically just a wrapper around upower now - I've been wanting to follow suit because there's definitely a lot that is unused (especially related to icons). The only user here is Cinnamon's power applet and cs_power.py - as long as that functionality isn't impacted I'm open to doing something similar. I haven't looked at the rest overall recently, but some will eventually go away or simplified as we adapt more to Wayland (this already has happened in some plugins). |
I've looked a bit more into it today. We could drop a lot of code if we could require upower >=1.0, because it features the "Display Device" which is currently implemented as the "composite device". I could create a PR for this separately. In general, would you agree that it would be best to base more of cinnamon's power applet's display logic directly onto UPower instead of going through |
|
@mtwebster See #422 as an alternative fix 😄 |
Add more device types added in upower 0.99.12 for bluetooth classes. This prevents log spam in .xsession-errors, like:
(csd-power:5461): csd-power-WARNING **: 18:38:13.719: enum unrecognised: 17