initial power profiles do not use suspend support
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KDE Base Workspace |
Fix Released
|
High
|
|||
Kubuntu PPA |
Fix Released
|
Low
|
Harald Sitter | ||
kde-workspace (Ubuntu) |
Fix Released
|
Critical
|
Harald Sitter | ||
Precise |
Fix Released
|
Critical
|
Harald Sitter | ||
Quantal |
Fix Released
|
Critical
|
Harald Sitter | ||
Raring |
Fix Released
|
Critical
|
Harald Sitter |
Bug Description
Currently when the initial power management profiles are generated the support of suspend and hibernate is not detected properly due to an init order problem. In particular powerdevil will ask libsolid for support, which in turn asks powerdevil though powerdevil at that point does not provide the daemon to deliver the information yet.
This makes fallback code active which for example on laptop lid closing will instead of going to suspend will turn off the screen. Since this is not expectable behavior and different from other OSes/DEs the user might not realize this assuming the suspend takes a bit longer and since they are in a rush put it in their backpack (while the laptop is still running!) this can cause excessive overheating and potential damage the hardware.
[Test Case]
* Create new user
* Go to systemsettings -> power management
* Check that the on battery profile will suspend on lid closing (assuming suspend is supported, which can be confirmed by looking at the application menu's "Leave" tab)
[Regression Potential]
The issue was addressed by not querying libsolid but pass the internally available information directly to the profile creator. Hence there is next to no potential for regression as in case the patch is not working properly it would simply cause the same broken behavior of not taking suspend into account when creating the profiles.
Changed in kdebase-workspace: | |
importance: | Unknown → High |
status: | Unknown → Confirmed |
Changed in kde-workspace (Ubuntu Precise): | |
status: | New → Triaged |
importance: | Undecided → Critical |
assignee: | nobody → Harald Sitter (apachelogger) |
Changed in kubuntu-ppa: | |
status: | New → Triaged |
importance: | Undecided → Low |
assignee: | nobody → Harald Sitter (apachelogger) |
Changed in kubuntu-ppa: | |
status: | Triaged → Fix Released |
Changed in kde-workspace (Ubuntu Quantal): | |
status: | Triaged → In Progress |
Changed in kdebase-workspace: | |
status: | Confirmed → Fix Released |
In powerdevilprofi legenerator. cpp we can find the following
QSet< Solid:: PowerManagement ::SleepState > methods = Solid:: PowerManagement ::supportedSlee pStates( );
//...
if (methods.
} else {
}
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 .PowerManagemen t /org/freedeskto p/PowerManageme nt org.freedesktop .PowerManagemen t.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