| Summary: | initial config creation is bogus | ||
|---|---|---|---|
| Product: | [Unmaintained] solid | Reporter: | Harald Sitter <sitter> |
| Component: | powermanagement-daemon | Assignee: | Dario Freddi <drf> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | afiestas |
| Priority: | NOR | ||
| Version First Reported In: | 4.9.2 | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
I fixed this, in 4.10 for sure and also in 4.9, perhaps in 4.9.4 Thanks for reporting ! |
In powerdevilprofilegenerator.cpp we can find the following QSet< Solid::PowerManagement::SleepState > methods = Solid::PowerManagement::supportedSleepStates(); //... KConfigGroup handleButtonEvents(&acProfile, "HandleButtonEvents"); handleButtonEvents.writeEntry< uint >("powerButtonAction", LogoutDialogMode); if (methods.contains(Solid::PowerManagement::SuspendState)) { handleButtonEvents.writeEntry< uint >("lidAction", ToRamMode); } else { handleButtonEvents.writeEntry< uint >("lidAction", TurnOffScreenMode); } Now on Kubuntu 12.10 the contains() query is always false thus the lidaction is turn off screen. However it should not be false because... me@novalis:~$ qdbus org.freedesktop.PowerManagement /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.CanSuspend true solid::powermanagement uses the same dbus interface to get its information, so one gets to wonder why it works for me and not for solid.... turns out that this interface is provided by the very same daemon that creates the config (why that does not sound dangerous at all :S). My assumption at present is that either the initialization order is wrong (i.e. the config is created before the interface) or the upower code is bogus (race condition in init or something). Reproducible: Always