| Summary: | Systemd power features are not supported by TDE | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Francois Andriot <albator78> |
| Component: | tdelibs | Assignee: | Francois Andriot <albator78> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | albator78, bugwatch, slavek.banko |
| Priority: | P5 | ||
| Version: | R14.0.0 [Trinity] | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Bug Depends on: | |||
| Bug Blocks: | 1931 | ||
| Attachments: |
tdelibs: add the systemd/logind power features to tdehwlib
tdelibs: add the systemd/logind power features to tdehwlib (1) |
||
|
Description
Francois Andriot
2014-02-17 15:52:11 CST
Created attachment 1940 [details] tdelibs: add the systemd/logind power features to tdehwlib Here is a patch to implement the power features of Systems/LoginD in the TDE HW Library. Build tdelibs with flag -DWITH_LOGINDPOWER=ON to enable it. More documentation about this: http://www.freedesktop.org/wiki/Software/systemd/logind/ It works on Mageia 4, where upower can no more manager power features (obsolete). Please note that this patch is theorically incomplete. See (extract from official site): CanPowerOff(), CanReboot(), CanSuspend(), CanHibernate(), CanHybridSleep() tests whether the system supports the respective operation and whether the calling user is eligible for the desired operation. Returns one of "na", "yes", "no" or "challenge". If "na" is returned the operation is not available because hardware, kernel or drivers do not support it. If "yes" is returned the operation is supported and the user may execute the operation without further authentication. If "no" is returned the operation is available but the user is not allowed to execute the operation. If "challenge" is returned the operation is available, but only after authorization. In my patch, only the "yes" answer is taken into account. I looked into the patch. For state 'freeze' you used HybridSleep, which I think is not right. I examined the source code systemd - there does not distinguish between "standby" and "freeze". Therefore, do not allow the user to directly request "freeze". I make a few minor adjustments and then I will publish an updated patch. In any case, thank you - you saved me some time. Created attachment 1959 [details]
tdelibs: add the systemd/logind power features to tdehwlib (1)
I made the adjustments I suggested in a previous comment. I attach an updated patch. (So far, I have not tested it on my builder / in my environment.)
Comment on attachment 1959 [details]
tdelibs: add the systemd/logind power features to tdehwlib (1)
Pushed to GIT in hash 316893d4.
Because the standby / freeze / suspend / hibernation can be performed using tde-dbus-daemon the current solution seems to be sufficient. |