Hi.
I have a little problem. Long time ago i've added hdparm -B 254 /dev/sda to rc.local (to extend lifetime of my laptop HDD).
But as far i know, this value from rc.local is reset to default after hibernation (from 254 to 128) and after every laptop resume i need to tap in the console hdparm -B 254 /dev/sda again and again.
I've read that good solution is add new script to /etc/pm/sleep.d and that script will be executed after resume from sleep or hibernation. But i've read that syntax of this script is a little bit more complicated than simple hdparm 254 and chmod+x on script. And in matter of fact - it does not worked.
It takes me 2 hours of testing scripts for /etc/pm/sleep.d but without sucess. I've copied one script from web and put hdparm command in it, but on every resume - hdparm is still reset to default 128 value.
Script:
I've named it 00hdparm254, chmod+x but it does not work.Code:case $1 in suspend|suspend_hybrid|hibernate) hdparm -B 254 /dev/sda ;; esac
The question is: what i need to execute hdparm -B 254 /dev/sda after wake laptop from sleep or hibernation? Script in /etc/pm/sleep.d - i know, but...
I will be grateful for every advice because i'm lack of idea.


Reply With Quote
I'm not up to date with changes in Fedora - i'm using Linux from 7 years but i'm not watching under the hood - only sometimes when i need something like in this topic
I this this is the answer why pm scripts was not working.
