Results 1 to 7 of 7

Thread: Why is it impossible to spin down my hard disks?

  1. #1
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    3,801

    Default Why is it impossible to spin down my hard disks?

    It seems that Linux simply refuses to let my hard disks sleep. If I do:

    hdparm -Y /dev/sdb

    After a few minutes (5 or so), the disk wakes up again and dmesg says:

    Code:
    ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6
    ata5.00: waking up from sleep
    ata5: hard resetting link
    No partition of that disk is mounted anywhere. If I do "hdparm -Y" again, the same happens again after a few minutes.

    I suspected the polling from udisks is doing that, so I created "/etc/udev/rules.d/99-disable-hd-polling.rules" with:

    Code:
    KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="ata", ENV{DEVTYPE}=="disk", ENV{UDISKS_DISABLE_POLLING}="1"
    KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="scsi", ENV{DEVTYPE}=="disk", ENV{ID_VENDOR}=="ATA", ENV{UDISKS_DISABLE_POLLING}="1"
    But no go. It doesn't help.

    So the question is very simple: How do I do HD power management on Linux? (Using Gentoo with KDE 4.8.4, kernel 3.4.4.)

  2. #2
    Join Date
    Oct 2007
    Posts
    912

    Default

    Not really my area of expertise...but is it a sata controller power management event? Might be causing a drive reset & power on. Also try disabling hot swap (if enabled).
    That's all I can offer sadly!

  3. #3
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    3,801

    Default

    Hm. It turns out that "-y" works, but "-Y" doesn't. -Y is the lowest power mode (documented as "power off / sleep"), but causes udisks to wake up the disk. -y is the second lowest power mode ("spin down / standby"), but the disk doesn't wake up.

    Weird. Could be a bug in the drives themselves? Or the controller? If the drive is sleeping, checking whether it's sleeping shouldn't wake it up. But it seems it does?

  4. #4
    Join Date
    Oct 2007
    Posts
    912

    Default

    Actually that makes sense - in standby mode, the disk controller is probably still active and can respond to info events. In full sleep mode, the entire drive will reset, and disk spin up will occur as part of its normal power-on cycle.

  5. #5
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    3,801

    Default

    Quote Originally Posted by mirv View Post
    Actually that makes sense - in standby mode, the disk controller is probably still active and can respond to info events. In full sleep mode, the entire drive will reset, and disk spin up will occur as part of its normal power-on cycle.
    I guess that makes sense. What doesn't make sense however is waking up the drive when it's not mounted and no way to tell udisks not to query the drive. Perhaps I'm not getting the udev rules right, I don't know. What's needed is something like "forget about /dev/sdb and /dev/sdc. Don't poll, don't ask, don't do anything."

  6. #6
    Join Date
    Feb 2008
    Location
    Linuxland
    Posts
    5,286

    Default

    Remove udisks? The tried and true solution for issues with networkmanager, pulseaudio et cetera.

  7. #7
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    3,801

    Default

    Quote Originally Posted by curaga View Post
    Remove udisks? The tried and true solution for issues with networkmanager, pulseaudio et cetera.
    Automatic mounting (or offer to mount) of new devices (USB disks) and media (CDs/DVDs) and handling of them in Dolphin stops working if udisks is removed :-/

Posting Permissions

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