Announcement

Collapse
No announcement yet.

Why is it impossible to spin down my hard disks?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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!

    Comment


    • #3
      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?

      Comment


      • #4
        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.

        Comment


        • #5
          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."

          Comment


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

            Comment


            • #7
              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 :-/

              Comment

              Working...
              X