User Tools

Site Tools


laptop_hacks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
laptop_hacks [2018/07/15 18:08]
admin [Power Disconnect/Connect events]
laptop_hacks [2018/10/25 15:52] (current)
admin [Power Disconnect/Connect events]
Line 46: Line 46:
 These events come through DBus, so I run this in my ''​.xsession''​. These events come through DBus, so I run this in my ''​.xsession''​.
  
-  # if there'​s a battery ​battery then listen on dbus for a/c connect/​disconnect:​+  # if there'​s a battery then listen on dbus for a/c connect/​disconnect:​
   upower -e |grep -q battery && {   upower -e |grep -q battery && {
       power-monitor &       power-monitor &
Line 223: Line 223:
   exit 0   exit 0
   ​   ​
 +To run stuff on '​resume',​ put this in ''/​etc/​systemd/​system/​bhepple-resume.service'':​
 +
 +  [Unit]
 +  Description=Run on '​resume'​
 +  After=suspend.target
 +  ​
 +  [Service]
 +  User=root
 +  Type=oneshot
 +  ExecStart=/​sbin/​hdparm -y /dev/sda # puts aux disc into standby - should test that it's not '/'​ !!
 +  ​
 +  [Install]
 +  WantedBy=suspend.target
 +
 +and run ''​systemctl enable bhepple-resume.service''​
 ====Disable nouveau==== ====Disable nouveau====
  
laptop_hacks.1531699691.txt.gz ยท Last modified: 2018/07/15 18:08 by admin