2

I have two hard drives - ssd and hdd. I don't use hdd a lot, so I have set hdd spin down time for 5 minutes (in Disks app). And it's working quite fine if Ubuntu was started from completely turned off state, however when I start my PC from suspend mode, hdd never stops spinning until I do it manually (then it remains silent). What can cause this problem?

Ubuntu 15.04

1 Answers1

3

Problem also exist on my desktop with 16.04. After some research I realized that I can force HDD to go sleep by hdparm -Y , but hdparm -S doesn't work.

My solution is:

  1. Disable spin down time in gnome-disk-utility and other tools like hdparm.conf
  2. Install hd-idle. You can use this link for instructions on install and configure
  3. Create new file at /lib/systemd/system-sleep e.g. hdidle with executable bit
  4. Add following code:

    #!/bin/sh
    if [ "$2" = "suspend" ] || [ "$2" = "hybrid-sleep" ]; then
        case "$1" in
            post) hd-idle -i 0 -a sdb -i 60 -a sdc -i 60 ;;
        esac
    fi
    

This will spin down the disk after 60s (edit it as you need). Change sdb and sdc accordingly.

Mat
  • 61
  • 6
  • This seems to provide relevant information, but not useful as an answer. Consider to include essential steps and explain how to set up the solution. In particular, explain whether "disable spin down time in gnome-disk-utility" and "install hd-idle" are two different solutions or must be done together. –  Apr 08 '17 at 10:37
  • Thanks for an advice. Edited the post since previously provided info was not complete/not work as expected. Hope it's more comprehensive now. – Mat Apr 08 '17 at 10:42