Results 1 to 2 of 2

Thread: /etc/hdparm.conf is ignored after wake from suspend

  1. #1
    Join Date
    Mar 2006
    Location
    europe/germany
    Beans
    230
    Distro
    Ubuntu 12.04 Precise Pangolin

    /etc/hdparm.conf is ignored after resume from suspend

    Hello,

    I want to spin down my external USB drive /dev/sdc as fast as possible:
    /etc/hdparm.conf:
    Code:
    ...
    /dev/sdc {
    	spindown_time = 1
    }
    that works, although I get
    Code:
    $ sudo hdparm -C /dev/sdc
    
    /dev/sdc:
    SG_IO: bad/missing sense data, sb[]:  f0 00 01 00 50 40 00 0a 00 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     drive state is:  unknown

    The problem is after a suspend (system, not disc) and resume again, /dev/sdc doesn't spin down automatically anymore.

    Any ideas?
    Last edited by Bazon; September 30th, 2012 at 06:28 AM. Reason: "reume" is a better word than "wake"

  2. #2
    Join Date
    Mar 2006
    Location
    europe/germany
    Beans
    230
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: /etc/hdparm.conf is ignored after wake from suspend

    OK, got it. In a terminal:
    Code:
    cd /etc/pm/sleep.d/
    sudo touch 20-hdparm
    sudo chmod +x 20-hdparm 
    sudo gedit 20-hdparm
    and there:
    Code:
    #!/bin/bash
    case "$1" in
    	thaw|resume)
    		hdparm -S 1 /dev/sdc
    		;;
    
    esac

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •