scripts in /etc/acpi/resume.d don't run after resume from suspend-to-ram [hardy]

Bug #205005 reported by Ferdinand Hagethorn
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Confirmed
Undecided
Daniel Hahler

Bug Description

I've put a couple of scripts of my own in there and then i noticed they're not run when i resume my system from a suspend-from-ram.
I've got a script to speed up the fan in my macbook and one to limit the cpu's to 1Ghz. chown'ed to root and nicely 0755'ed also following the naming scheme.

uname -a:
Linux kanundra 2.6.24-12-generic #1 SMP Wed Mar 12 23:01:54 UTC 2008 i686 GNU/Linux

lspci:
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:07.0 Performance counters: Intel Corporation Unknown device 27a3 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
01:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 22)
02:00.0 Ethernet controller: Atheros Communications, Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)
03:03.0 FireWire (IEEE 1394): Agere Systems FW323 (rev 61)

pkg versions (just did an update/upgrade):
acpi 0.09-3ubuntu1
acpid 1.0.4-5ubuntu8
gnome-power-manager 2.22.0-0ubuntu2
hal 0.5.11~rc2-1ubuntu2
hal-device-manager 0.5.9.1-6ubuntu5
hal-info 20080317+git20080318-1ubuntu1

My scripts:

user@host:/etc/acpi/resume.d$ cat 95-fanspeed.sh
#!/bin/bash
cat /etc/fan_speed > /sys/devices/platform/applesmc.768/fan1_min

user@host:/etc/acpi/resume.d$ cat 96-cpuspeedmax.sh
#!/bin/bash
for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq;do
 cat /etc/cpu_max_speed > $i
done

$ ls -als 95-fanspeed.sh 96-cpuspeedmax.sh
4 -rwxr-xr-x 1 root root 78 2008-03-06 22:44 95-fanspeed.sh
4 -rwxr-xr-x 1 root root 116 2008-03-06 22:29 96-cpuspeedmax.sh

$ cat /etc/fan_speed
2900

$ cat /etc/cpu_max_speed
1000000

Revision history for this message
angel chen (angelchen1111) wrote :

confirmed, my scripts didn't run for me either after I make the script 99-hdparm.sh to the resume folder.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Thank you for your bug report.

Hardy uses pm-utils, so please try adding your scripts in /etc/pm/power.d

I'm closing this as invalid, please re-open in case I've missed anything.

Changed in acpi-support:
assignee: nobody → blueyed
status: New → Invalid
Revision history for this message
Andy Grover (andy-groveronline) wrote :

Actually it needs to go under /etc/pm/sleep.d, and the script should be based on one from /usr/lib/pm-utils/sleep.d, in order to take the correct suspend/hibernate or resume/thaw parameters.

Revision history for this message
DaveAbrahams (boostpro) wrote :

This should still be considered a bug. People put scripts on which they rely there. Does the upgrade process to Hardy alert them to the fact that they won't run? Thousands of pages of instruction are out there documenting the efficacy of /etc/default/acpi-support, and people have and will continue to rely on it. You can't just make a transition like this one without doing something for backward compatibility.

Changed in acpi-support:
status: Invalid → Confirmed
Revision history for this message
lcampagn (luke-campagnola) wrote :

I agree entirely! There's got to be some way to inform the user that such system-critical scripts must be moved. In my case, the script was intended to set the correct power management settings on my hard disk to prevent it damaging itself. See bug #59695--this is a critical bug that still has not been fixed and currently users are instructed to add scripts to resume.d as a workaround.

Revision history for this message
huiii (a00ps) wrote :

hello.
what a big mess... is billy behind all this, hahaha,
first of all: the pm-sleep and pm-hibernate do not work for me,
instead i use suspend scripts in /etc/acpi/ folder, they work perfect.
as a consequence i added the extra-scripts in the /etc/acpi/resume.d.
when i put laptop to hibernate, the extra-scripts are executed well on resume.
when i put laptop to sleep, they do not work... why?

also, i cannot switch of the login-prompt that appears after resume from sleep,
not in the old fashion way, change in the acpi-support not to prompt, does not work and also not by disabling it under gconf-editor. should i file a new bugreport?
also googling for hours and i still cannot find an answer as the whole net is spammed with millions of ubuntu sleep/hibernation bugs latelly... phew

Revision history for this message
huiii (a00ps) wrote :

edit:
i managed to get pm-sleep working by doing the following (tip from launchpad):
$ sudo su
$ echo "SUSPEND_MODULES=\"uvcvideo\"" >/etc/pm/config.d/unload_modules
$ chmod +x /etc/pm/config.d/unload_modules

now, after suspend with pm-suspend, the changes suggested above had effect.

thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.