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
hdparmon major Linux distros
- How to use
hdparmto adjust head speed movement of hard drive
|Requirements, Conventions or Software Version Used
|Any Linux distro
|Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – 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.
$ sudo apt install hdparm
$ sudo dnf install hdparm
$ sudo pacman -S hdparm
Use hdparm to adjust head speed movement of hard drive
- First find a correct block device for a hard drive you would like to work with. This can be done via the
$ lsscsi -g [2:0:0:0] disk ATA HTS721060G9SA00 MC3I /dev/sda /dev/sg0
- Next, we use
hdparmto 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.
- 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)
- 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)
- 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)
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).