Skip to content

Conversation

okaestne
Copy link

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

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
@okaestne
Copy link
Author

okaestne commented Aug 20, 2025

@mtwebster in 789b2ee you stated that focal still needs to be supported, is that true? This version is just one minor version too old for my change.

Edit: I could add guards using the UP_CHECK_VERSION, if you really need to stay compatible with focal.

@mtwebster
Copy link
Member

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.

@okaestne
Copy link
Author

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?

@mtwebster
Copy link
Member

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).

@okaestne
Copy link
Author

okaestne commented Oct 18, 2025

I've been wanting to follow suit because there's definitely a lot that is unused (especially related to icons)

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.
Edit: okaestne@a07771d

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 csd-power?

@okaestne
Copy link
Author

@mtwebster See #422 as an alternative fix 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants