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/14 09:49] cyril [Hard Drive power management] |
linux:howtos-tips [2014/03/28 16:18] (current) cyril |
||
---|---|---|---|
Line 99: | Line 99: | ||
<code bash> | <code bash> | ||
xhost +localhost | xhost +localhost | ||
+ | </ | ||
+ | or/and maybe: | ||
+ | <code bash> | ||
+ | xhost local: | ||
</ | </ | ||
Line 421: | Line 425: | ||
</ | </ | ||
+ | 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 ===== | ||
+ | |||
+ | If your laptop don't physically switch off your screen when the lid is closed, it sends an ACPI event. Your system will probably switch off the screen by software (if it does not uncomment the " | ||
+ | |||
+ | Create / | ||
+ | <code sh> | ||
+ | #!/bin/sh | ||
+ | |||
+ | case `cat / | ||
+ | open) | ||
+ | #vbetool dpms on | ||
+ | DISPLAY=: | ||
+ | ;; | ||
+ | closed) | ||
+ | #xset dpms force off | ||
+ | #vbetool dpms off | ||
+ | DISPLAY=: | ||
+ | ;; | ||
+ | esac | ||
+ | </ | ||
+ | |||
+ | Edit / | ||
+ | <code sh> | ||
+ | case " | ||
+ | | ||
+ | case " | ||
+ | + lid) | ||
+ | + / | ||
+ | + ;; | ||
+ | </ | ||
===== Lock on wake up ===== | ===== Lock on wake up ===== | ||
+ | |||
+ | == With hibernate-scripts == | ||
+ | (hibernate-scripts are probably deprecated) | ||
Add to / | Add to / | ||
Line 430: | Line 482: | ||
See "man hibernate.conf" | See "man hibernate.conf" | ||
- | Or with pm: [[https:// | + | == With pm-utils == |
+ | |||
+ | When using the button or when it is automatic apparently gnome-power-manager and gnome-screensaver deals correctly | ||
+ | |||
+ | So you can add this script / | ||
+ | < | ||
+ | . " | ||
+ | |||
+ | suspend_nm() | ||
+ | { | ||
+ | } | ||
+ | |||
+ | resume_nm() | ||
+ | { | ||
+ | DISPLAY=: | ||
+ | } | ||
+ | |||
+ | case " | ||
+ | hibernate|suspend) | ||
+ | suspend_nm | ||
+ | ;; | ||
+ | thaw|resume) | ||
+ | resume_nm | ||
+ | ;; | ||
+ | *) exit $NA | ||
+ | ;; | ||
+ | esac | ||
+ | </ | ||
+ | |||
+ | A more complete one to automatically detect the user name is available here: | ||
+ | [[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 447: | Line 552: | ||
newaliases | newaliases | ||
</ | </ | ||
+ | |||
+ | ===== hddtemp ===== | ||
+ | |||
+ | Edit the file / | ||
+ | |||
+ | ===== Gnome Screensaver ===== | ||
+ | |||
+ | If you don't have gnome-session, | ||
+ | <code patch> | ||
+ | -gvalue = gclient.get('/ | ||
+ | +gvalue = gclient.get('/ | ||
+ | </ | ||
+ | |||
+ | ===== Automatically enable/ | ||
+ | |||
+ | disper -s | ||
+ | disper -e | ||
+ | |||
+ | autodisper | ||
+ | |||
+ | for completely automatic with dock: | ||
+ | http:// |