EDIT: Jimmy gave me some great feedback, and I’ve updated the how-to to use the latest version of hd-idle from GIT. Thanks @Jahey! I’ve also included a link to download the hd-idle .deb package I created for OSMC V19/Matrix to save a few steps, for those that would rather skip the compilation bit.
Yesterday I got my Vero 4K+ (an upgrade from my old RP3 running OSMC) and quickly remembered that one of my two large external HDD’s (a Buffalo) does not obey the usual hdparm commands to spin down after a period of time. As the Vero is designed to be an “always on” box, this was going to be an issue as the drive is quite noisy and would burn unnecessary power (not to mention wear itself out)
When I originally setup my old RP3 with OSMC, I compiled and installed hd-idle to do the job for me and it worked really well. Despite searching the forums here, I was surprised there was no step by step guide for compiling and installing hd-idle on the Vero 4K+ so after spending some time yesterday, I got it working nicely.
I’ve put together the following guide in the hopes that somebody else may find this useful in the future (and save a bit of time). I assume basic knowledge (e.g. how to ssh to the Vero 4K+ and how to copy a file up to the Vero, as well as editing a text file using vi or nano).
The usual caveats apply to the below steps - follow them at your own risk/peril, etc. and whilst they worked perfectly for me, they may cause death, destruction or obliteration of your Vero 4K or HDD’s
The following steps worked for me on my Vero 4K+ running V19 (Matrix)
How to install hd-idle onto the Vero 4K+ to auto-spin down HDD’s (that don’t spin down under default conditions):
(Command are pre-formatted (remove the quotes!) and filenames/config parameters are bold.)
Note: If you’d like to shortcut some steps below, you can download a pre-compiled package of hd-idle that I created for OSMC V19/Matrix from here (SHA256 hash here). You then just need to then upload the file to your Vero (scp or sFTP, etc) and then install it as per Step 8 (replacing the file path with the path to the deb package you uploaded to your Vero).
Step by step:
- SSH to the media player as the OSMC user (eg.
"ssh osmc@osmc"- default password is osmc)
- Install git -
"sudo apt-get install git"
- Clone the hd-idle GIT Repository -
"git clone https://github.com/adelolmo/hd-idle.git"
- This will create a new directory “hd-idle”. CD into this folder -
- Install the required packages to build the source code -
"sudo apt-get install libc6-dev build-essential fakeroot debhelper dh-golang golang-go:native dh-virtualenv"
- Build the package
"dpkg-buildpackage -rfakeroot -us -uc -b"
- Check that the compilation has been successful and that the debian package has been created in the parent folder. Run
"ls -la .."and you should see a “.deb” file listed similar to “hd-idle_1.15_armhf.deb” (the “1.15” part of the filename may differ depending on the latest version of hd-idle)
- Install the newly created deb package (which will be in the /home/osmc folder)
"sudo dpkg -i ../hd-idle_X.XX_armhf.deb"(note: replace the “X” with the version from your filename in step 7 (e.g. 1.15 in this case).
- By default hd-idle is disabled. Edit the following file - /etc/default/hd-idle (e.g. using nano it would be
"sudo nano /etc/default/hd-idle"
- Change the first non-comment line to read “START_HD_IDLE=true”
- Type Ctrl-X to exit Nano and answer “Y” to save changes.
- Restart hd-idle -
"systemctl restart hd-idle"
"sudo systemctl enable hd-idle"to ensure hd-idle starts on next boot.
- You’re done!
You can check hd-idle is running using
"systemctl status hd-idle" and you should see something like:
* hd-idle.service - LSB: start hd-idle daemon (spin down idle hard disks) Loaded: loaded (/etc/init.d/hd-idle; generated) Active: active (running) since Sat 2021-08-14 19:01:51 BST; 13h ago Docs: man:systemd-sysv-generator(8) Process: 3193 ExecStart=/etc/init.d/hd-idle start (code=exited, status=0/SUCCESS) Tasks: 1 (limit: 1620) Memory: 960.0K CGroup: /system.slice/hd-idle.service `-3211 /usr/sbin/hd-idle -i 600 Aug 14 19:01:51 osmc systemd: Starting LSB: start hd-idle daemon (spin down idle hard disks)... Aug 14 19:01:51 osmc hd-idle: Starting the hd-idle daemon: hd-idle. Aug 14 19:01:51 osmc systemd: Started LSB: start hd-idle daemon (spin down idle hard disks).
By default, disks will be spun down after 10 minutes (600 seconds) but you can easily tweak this by editing the config file (see step 9) and adding the following line to the very end of the config file (replacing XXX with however many seconds you want hd-idle to wait before powering down your drives):
I hope somebody finds this guide useful!