Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:howtos-tips [2011/12/27 04:08] cyril [Keep screen off when lid shut] |
linux:howtos-tips [2014/03/28 16:18] cyril |
||
---|---|---|---|
Line 427: | Line 427: | ||
Ensure that the file misc.start is executable. | Ensure that the file misc.start is executable. | ||
+ | ===== Fix laptop wakes up immediately after suspend ===== | ||
+ | |||
+ | May be due to some USB devices, even if not plugged. Look if some USB* or EHC* or XHC* are enabled in ''/ | ||
+ | echo EHC1 > / | ||
+ | </ | ||
+ | |||
+ | You can run it in a script at boot time right before suspending:< | ||
+ | for usb in " | ||
+ | state=`cat / | ||
+ | echo " | ||
+ | if [ " | ||
+ | done | ||
+ | </ | ||
===== Keep screen off when lid shut ===== | ===== Keep screen off when lid shut ===== | ||
Line 483: | Line 496: | ||
resume_nm() | resume_nm() | ||
{ | { | ||
- | su cyril -c " | + | |
} | } | ||
Line 500: | Line 513: | ||
A more complete one to automatically detect the user name is available here: | A more complete one to automatically detect the user name is available here: | ||
[[https:// | [[https:// | ||
+ | |||
+ | |||
+ | == With systemd == | ||
+ | |||
+ | Create service ''/ | ||
+ | [Unit] | ||
+ | Description=Lock X session using slimlock | ||
+ | |||
+ | [Service] | ||
+ | User=cyril | ||
+ | ExecStart=/ | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=sleep.target | ||
+ | </ | ||
+ | |||
+ | Ensure right permissions and enable it:< | ||
+ | chmod a+r / | ||
+ | systemctl enable slimlock | ||
+ | </ | ||
+ | |||
+ | Now when you suspend the system with '' | ||
+ | |||
===== Hard Drive power management ===== | ===== Hard Drive power management ===== | ||
Line 528: | Line 564: | ||
+gvalue = gclient.get('/ | +gvalue = gclient.get('/ | ||
</ | </ | ||
+ | |||
+ | ===== Automatically enable/ | ||
+ | |||
+ | disper -s | ||
+ | disper -e | ||
+ | |||
+ | autodisper | ||
+ | |||
+ | for completely automatic with dock: | ||
+ | http:// |