How do I run a script on resume from suspend?

Forum rules
Before you post please read this

How do I run a script on resume from suspend?

Postby xircon on Wed Nov 23, 2011 4:37 pm

Created a script called 100resume:
Code: Select all
#!/bin/bash
case "$1" in
    thaw|resume)
    sh -c "echo low > /sys/class/drm/card0/device/power_profile"
    cpufreq-set -g powersave
        ;;
    *)
        ;;
esac
exit $?


I have placed it in /etc/pm/sleep.d & /usr/lib/pm-utils/sleep.d/ made executable, but it is not working.
Dell Inspiron N5010 / Core I5 / ATI Mobility Radeon HD5400, LMDE Tracking Sid & Cinnamon Desktop
"Ubuntu is an African word meaning 'I can't configure Debian'"
User avatar
xircon
Level 5
Level 5
 
Posts: 775
Joined: Sun Aug 01, 2010 7:59 am
Location: Sheffield, UK

Linux Mint is funded by ads and donations.
 

Re: How do I run a script on resume from suspend?

Postby xircon on Fri Nov 25, 2011 4:31 am

Still struggling with this, anybody any ideas? If I forget to run the echo command, the temperatures push up to the high 70 deg C.
Dell Inspiron N5010 / Core I5 / ATI Mobility Radeon HD5400, LMDE Tracking Sid & Cinnamon Desktop
"Ubuntu is an African word meaning 'I can't configure Debian'"
User avatar
xircon
Level 5
Level 5
 
Posts: 775
Joined: Sun Aug 01, 2010 7:59 am
Location: Sheffield, UK

Re: How do I run a script on resume from suspend?

Postby ej64 on Fri Nov 25, 2011 7:19 am

As I already wrote elsewhere:
- use a 2.6.39 kernel with "pcie_aspm=force"
- install the latest Catalyst driver (11.11)

That's the way to get best performance and best power savings. (And stay with that kernel until you like to mess up your system ...)
Thinkpad X220 with Samsung SSD running Xubuntu 13.04
I'm getting old gladly -- I don't like to die young ...
ej64
Level 4
Level 4
 
Posts: 326
Joined: Tue Nov 24, 2009 7:43 am
Location: somewhere in Germany


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 3 guests