[ubuntu-us-nm] Boot script run as root

Eric Krieger unmlobo at gmail.com
Sat Apr 12 13:15:37 BST 2008


Leif,

I think the ability to fully disable APM is based on your hard drives
ability to support this function. I have a Dell D820 with an HITACHI
Travelstar 7K200 and mine reads the follow...

ericjk at ericjk-laptop:~/$ sudo hdparm -I /dev/sda | grep Advanced
Advanced Power Management level to disabled
Advanced power management level: unknown setting (0x8080)
Advanced Power Management feature set

Eric

Leif Gregory wrote:
> On Fri, 11 Apr 2008 15:00:39 -0600
> Eric Krieger <unmlobo at gmail.com> wrote:
>
> Sorry, my original response got sent directly to Eric rather than the
> list.
>
>
>   
>> 1) Edit your /etc/hdparm.conf file and add the following to it.
>>
>> /dev/sda {
>> apm = 255
>> spindown_time = 0
>> }
>>
>>
>> 2) Then run 'sudo update-rc.d hdparm defaults'  
>>     
>
> I didn't even think of trying that. Let me ask you though. Does 255
> really work for you? When I was trying out various things, doing an
> hdparm -B 255 only got me to 254. I did the below to show you what I
> mean:
>
> bishop at bishtop:~/scripts$ sudo hdparm -B 253 /dev/sda
>
> /dev/sda:
>  setting Advanced Power Management level to 0xfd (253)
>
>
> bishop at bishtop:~/scripts$ sudo hdparm -I /dev/sda | grep Advanced
>         Advanced power management level: 253 (0xfd)
>            *    Advanced Power Management feature set
>
>
> bishop at bishtop:~/scripts$ sudo hdparm -B 254 /dev/sda
>
> /dev/sda:
>  setting Advanced Power Management level to 0xfe (254)
>
>
> bishop at bishtop:~/scripts$ sudo hdparm -I /dev/sda | grep Advanced
>         Advanced power management level: 254 (0xfe)
>            *    Advanced Power Management feature set
>
>
> bishop at bishtop:~/scripts$ sudo hdparm -B 255 /dev/sda
>
> /dev/sda:
>  setting Advanced Power Management level to disabled
>
>
> bishop at bishtop:~/scripts$ sudo hdparm -I /dev/sda | grep Advanced
>         Advanced power management level: 254 (0xfe)
>                 Advanced Power Management feature set
>
>
> So while the response to setting to 255 says it's disabling, it
> appears to only be setting to 254. Just wondering if it's different
> for you. Could be a drive manufacturer thing. 
>
>
>   
>> You can also do the following if the above work around does not
>> work....
>>
>> 1) Make a file named "99-hdd-spin-fix.sh". The important thing is
>> starting with "99".
>>
>> 2) Make sure the file contains the following 2 lines (fix it if you
>> have PATA HDD):
>>
>> #!/bin/sh
>> hdparm -B 255 /dev/sda
>>
>> 3) Copy this file to 3 locations:
>>
>> /etc/acpi/suspend.d/
>> /etc/acpi/resume.d/
>> /etc/acpi/start.d/
>>
>> 4) Reboot and you are done.  
>>     
>
>
> Cool. Thanks. The first solution is the more ideal for me. I'll give it
> a shot and hope that one works. 
>
>   




More information about the ubuntu-us-nm mailing list