Minimize your hard drive noise with hdparm

We have always looked for a way to maximize the performance of our equipment and in turn minimize the use of both resources and energy that they consume, and thanks to technological advances we can even reduce annoying noise what our old hard drives do.

HDD

Not all users have state-of-the-art equipment and not hard drives of this type in their computers, which is why for users who have to settle for a computer and a hard drive that make noise, they do not have to worry anymore, because thanks to our dear friend Gnu / Linux we got minimize noise that occurs in older computers.

idsco-hard

Disks that are inside classic hard drives produce noise when they spin. This noise from the discs can be reduced, but we need to know the rotation speed of the internal discs, so how can we know how fast the internal discs rotate? Well, it is easy to know if we use the hdparm command.

The command hdparm is within all distributions Gnu / Linux so it will not be necessary to do any extra installation. So, since we have hdparm, we can know how many revolutions the internal disks of our hard disk turn at, we open the terminal and we start by writing:
sudo hdparm -I /dev/sda |grep acoustic
After doing this it will show us the information of the recommended value and the current value that our hard drive has. Well, now we are going to have to determine the recommended value that we previously showed as current value. We go back to the terminal and write:
sudo hdparm -M (VALOR RECOMENDADO) /dev/sda

hdparm

As we have seen, it does not have major complications in its operation and the variations will be perceived both in noise reduction and in the management of the equipment. However, there are users who point out that these changes are not definitive and that they return to their original state, if this is your case and after using hdparm you discover that your computer returns to the way it was, a way to fix it would be to copy the last line that is in the terminal to the file rc.local if you are a user of distros that are based on Debian or in Slackware.

For those who use OpenSUSE they should add it to the file boot.local; and if they have a distro based on Fedora then they should add that line to the file rc.local.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   channels said

    very good article, thank you very much.

  2.   Peter086 said

    It is a pity that both Seagate and WD stopped allowing to modify power values ​​for more than 5 years (patents thing).

  3.   Jesus Perales said

    I will try it, it is weird but my laptop does not make so much noise, in the same way I think it should be at the recommended speed

    1.    robertucho said

      Thank you very much for stopping by and reading the article, I hope it is useful
      let us know how you did ...
      regards

  4.   maintained said

    Thank you very much, I will try it, since I mounted a server with a normal hard drive and a BananaPRO and as it weighs nothing it vibrates and makes excessive noise.

    1.    robertucho said

      Thanks to you, you will surely solve the noise problem, I hope you tell us how it turned out
      regards

      1.    maintained said

        Damn Seagate disk ... it does not support that management and it seems that it is a function not included with this brand, it gives this error:

        $ sudo hdparm -I / dev / sda | grep acoustic
        Recommended acoustic management value: 208, current value: 0
        $ sudo hdparm -M 208 / dev / sda
        / dev / sda:
        setting acoustic management to 208
        HDIO_DRIVE_CMD: ACOUSTIC failed: Input / output error
        acoustic = not supported

  5.   Tiles said

    LUL I made a timer in systemd, it is not very difficult and you can even make it apply every X time, by the way, I did not do it for noise management, I did it for the APM of the record, so that the needle does not fall on the landing strip all the time, especially because I have left the pc with torrent downloads all night for one reason or another, I share the content of my timer and the target so that if you want, you can do it:

    nano /usr/lib/systemd/system/apm.timer

    [Units]
    Description = Run apm.service every 3 minutes

    [timer]
    OnBootSec = 1min
    OnUnitActiveSec = 3m
    Unit = apm.service

    [Install]
    WantedBy = multi-user.target
    #End of file

    Then the file is saved and the .service is generated:

    nano /usr/lib/systemd/system/apm.service

    [Units]
    Description = Disable the APM of the hard disk

    [service]
    Type = simple
    ExecStart = / usr / bin / hdparm -B 255 / dev / sda

    [Install]
    WantedBy = multi-user.target

    #End of the file, now just touch save

    My understanding is that hard drives crash when the counter reaches a few hundred thousand cycles, the reason for my concern is that all the distros I have tested have a value of 128, which in 1 minute causes up to 2 or 3 cycles, my disk has about 80K cycles in its 6 months of life (it is an exaggerated amount).
    Having said the above, now it only remains to explain the operation, in the apm.timer the order is given that every minute after the system startup, apm.service is executed that turns off the apm (puts it in 255), then, every 3 minutes it executes again the order, if the laptop is suspended or hibernates the apm returns to 128, in this way the process is automated. Having already generated the two previous files, they are simply activated with the following command:

    systemctl enable apm.timer; systemctl enable apm.service

    And then they start the apm.service with
    #systemctl start apm.timer
    or they just reboot the system.
    I'm not sure this will help desktop PC users, but for laptop users it will help, I have only tested it in Arch and Fedora, if hdparm is not installed it will not work, you can even add the line to minimize noise. If you want you can make a new entry with this info or update this, in both cases I have always wanted to share.

    1.    Wire said

      Thanks for the input, I'll test it on the laptop.

  6.   H3R3T1C said

    And they have never wondered why HDDs come with that, they have never realized that the vibrations are sometimes to cool the HDD (at least in its time the old MAXTOR that's what it did)….

  7.   BrunoEV said

    It is also possible to reduce noise graphically with gnome-disk-utility

  8.   Tiles said

    I just saw that in fedora you can't, but it's basically because of the hdparm folder. In arch is in / sur / bin
    and in fedora it is in / usr / sbin