| Summary: | tdepowersave shows "Suspend to disk" option, but my system does not support hibernate | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Francois Andriot <albator78> |
| Component: | non-core programs | Assignee: | Francois Andriot <albator78> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | albator78, bugwatch, darrella, slavek.banko |
| Priority: | P5 | ||
| Version: | R14.0.0 [Trinity] | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Attachments: | tdepowersave 14.0.0 : fix "suspend to disk" option display | ||
|
Description
Francois Andriot
2013-07-24 05:23:34 CDT
Created attachment 1378 [details]
tdepowersave 14.0.0 : fix "suspend to disk" option display
It looks like a bad copy/paste was the culprit. See attached patch.
Francois, is there a way to test this on systems supporting suspend to disk? That is, a way to emulate no support for suspend to disk? Yes, just remove (comment) your swapfile from /etc/fstab and reboot. Without swap (my case), you cannot suspend to disk. Ok. Thanks. I have a laptop. I will build and test the patch. The patch does disable the Suspend to Disk option from the tdepowersave system tray popup menu. But only for non root users. The menu option still appears when logging into Trinity as root. Despite zealots freaking out about logging into a graphical desktop as root, we probably should fix that. Comment: should the CPU frequency policies submenu options match the names of the actual kernel scaling policy names? The actual scaling names are: performance powersave ondemand conservative tdepowersave uses the term "Dynamic" rather than "OnDemand." I think changing that from Dynamic to OnDemand would add consistency. I don't know why conservative is not supported in tdepowersave. Should this same patch be applied to kpowersave too (the HAL version)? Francois, do you have permissions to push patches to git? > But only for non root users. The menu option still appears when logging into > Trinity as root. Despite zealots freaking out about logging into a graphical > desktop as root, we probably should fix that. The original patch probably can pushed to git. We should not close the bug report until we resolve the "Suspend to Disk" menu option appearing when root uses the Trinity desktop. Even super user root can't do the impossible of saving to disk when the swap partition is disabled. :-) > tdepowersave uses the term "Dynamic" rather than "OnDemand." > I think changing that from Dynamic to OnDemand would add consistency. Never mind. I grepped the sources and there are too many occurences of dynamic/Dynamic/DYNAMIC. Too much testing. > Should this same patch be applied to kpowersave too (the HAL version)? I checked. Looks like the answer is no. Hello, I did not test with the root user, I will do it. In the new TDEPowerSave, the power capabilities of the computer are detected/used through the TDE HW Library, which is part of tdelibs. So if there is no problem in TDEPowerSave, it may in fact be a problem in 'tdelibs/tdecore/tdehardwaredevices.cpp'. And no I cannot push patches to GIT, so we'll have to wait here :) The original bug was obviously a typo (I bet a mistake in copy/paste). > Hello, I did not test with the root user, I will do it. Great! > And no I cannot push patches to GIT, so we'll have to wait here :) That's fine. I only wanted to know because if you can't then I'll push patches to git. :-) I don't know whether this is a separate bug, but I cannot invoke suspend to ram on my laptop when I'm non root. That tdepowersave option works as root. The non root user is a member of the power group. Anything else I can do to debug? (I do have the option to close the lid but I want to see Trinity software working as advertised.) Comment on attachment 1378 [details]
tdepowersave 14.0.0 : fix "suspend to disk" option display
Pushed to GIT in hash afcfc2e0.
(Odpověď na komentář #8)
> > Hello, I did not test with the root user, I will do it.
>
> Great!
>
> > And no I cannot push patches to GIT, so we'll have to wait here :)
>
> That's fine. I only wanted to know because if you can't then I'll push patches
> to git. :-)
>
> I don't know whether this is a separate bug, but I cannot invoke suspend to ram
> on my laptop when I'm non root. That tdepowersave option works as root. The non
> root user is a member of the power group. Anything else I can do to debug? (I
> do have the option to close the lid but I want to see Trinity software working
> as advertised.)
Do you have installed upower? TDE HW Library has two options to do suspend and hibernate - either the user has write access to /sys/power/state (ie, the root), or is possible to use upower. Try:
upower -d
Hmm. Running upower -d reveals root has permission to suspend but non-root user accounts do not. Permissions to /sys/power/state are 644, root:root. I found a solution. I had to add a new power group policy to /etc/polkit-1/localauthority/50-local.d. Now upower -d shows can-suspend: yes and I can suspend to ram using tdepowersave. Trying to suspend with klaptop is broken, refer to bug report 1603. As Francois's patch was pushed to git, I'll close this report as resolved. Thanks for the patch! |