hdparm acoustic management: Reduce hard drive’s noise level

Most of the non-SSD hard drives allow for a noise reduction by decreasing head movement speed while accessing data. This ability is called Automatic Acoustic Management or AAM. In this tutorial, you will see how to install the hdparm software package on all major Linux distros and use it to manipulate AAM values to reduce or increase head movement, thus directly affect hard drive’s noise level.

In this tutorial you will learn:

  • How to install hdparm on major Linux distros
  • How to use hdparm to adjust head speed movement of hard drive
hdparm acoustic management: Reduce hard drive's noise level
hdparm acoustic management: Reduce hard drive’s noise level
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Any Linux distro
Software hdparm
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to install hdparm on Linux




The first thing we will need to do is install hdparm, in case it is not already on your system.

You can use the appropriate command below to install hdparm with your system’s package manager.

To install hdparm on Ubuntu, Debian, and Linux Mint:

$ sudo apt install hdparm

To install hdparm on Fedora, CentOS, AlmaLinux, and Red Hat:

$ sudo dnf install hdparm

To install hdparm on Arch Linux and Manjaro:

$ sudo pacman -S hdparm

Use hdparm to adjust head speed movement of hard drive

  1. First find a correct block device for a hard drive you would like to work with. This can be done via the lsscsi command.
    $ lsscsi -g
    [2:0:0:0]    disk    ATA      HTS721060G9SA00  MC3I  /dev/sda   /dev/sg0
    
  2. Next, we use hdparm to determine current head speed movement:
    # hdparm -M /dev/sdX
    
    /dev/sda:
     acoustic      = 254 (128=quiet ... 254=fast)
    

    If your drive does not support AAM you will get message: acoustic = not supported. Our current drive is set to maximum speed thus no noise reduction is applied. From the above output we can see that any values between 128 … 254 are accepted. Not all hard drives accept all multiple values. For older drives your options may shrink to on 0-(OFF), 128-(quiet) or 254-(fast).The option 0-(OFF) will turn AAM off and thus setting it to maximum value of 254.

  3. It needs to be pointed out that any head speed reduction also comes with a price of slower hard disk’s access time. Let’s reduce the noise level of our drive to minimum that is AAM value 128:


    # hdparm -M 128 /dev/sdX
    
    /dev/sda:
     setting acoustic management to 128
     acoustic      = 128 (128=quiet ... 254=fast)
    
  4. Feel free to fine tune the balance between noise and speed by setting values between 128 .. 254 ( if available ).
    # hdparm -M 150 /dev/sdX
    
    /dev/sda:
     setting acoustic management to 150
     acoustic      = 150 (128=quiet ... 254=fast)
     
    # hdparm -M /dev/sdX
    
    /dev/sda:
     acoustic      = 150 (128=quiet ... 254=fast)
    
  5. To turn off Automatic Acoustic Management set AAM value to 0:
    # hdparm -M 0 /dev/sdX
    
    /dev/sda:
     setting acoustic management to 0
     acoustic      = 254 (128=quiet ... 254=fast)
     
    # hdparm -M /dev/sdX
    
    /dev/sda:
     acoustic      = 254 (128=quiet ... 254=fast)
    

Closing Thoughts




In this tutorial, we saw how to reduce the acoustic noise of a hard drive on a Linux system. This is done by lowering the speed of a hard drive by using the hdparm utility. This program can be installed on all major Linux distros and often comes installed by default. Feel free to experiment with different values to strike a nice balance between noise level and read/write speed for your hard drive(s).



Comments and Discussions
Linux Forum