Skip to content
View in the app

A better way to browse. Learn more.

Learn more

How to enable Permanent hdparm setting in Jessie?

Featured Replies

Hi.

I'm using CubieTruck with Armbian Jessie, attached with a Sata disk.

I have tried these method to run hdparm when the system reboots, but none of them was successful.

  • /etc/hdparm.conf
  • /etc/udev/rules.d/50-hdparm.rules
  • /usr/lib/systemd/system-sleep/hdparm_set

Finally, I chose the /etc/rc.local file, and add the hdparm command.

hdparm -B 127 -S 242 /dev/sda

However, it is not working always.

I rebooted several times, and check the APM status with 'hdparm -B /dev/sda', the results vary.

Sometimes it shows APM_level = not supported, but some other times APM_level = 127, as I specified.

I don't know what was wrong about the command.
 ** I've found out that hddtemp(which is used everytime I log on to Armbian, by /etc/update-motd.d/30-sysinfo) 'sometimes' resets the apm level.
 

Beside the other methods, I want to know why /etc/hdparm.conf does not work.

I added these lines in hdparm.conf.

/dev/disk/by-id/ata-SAMSUNG_HD103SJ_S246J1RZB00034 {
apm = 127
spindown_time = 242
}

However, it does not work at all.

 

Can anyone give a clue?

Hi,

I had the same problem, tryed everything but the disk "keeps forgetting" apm params.

The only solution (=patch) I could find is setting a cron job to re-record params every 10 minutes

 

#!/bin/bash
#hdparm -S starts disk, send only if already spinned up 
if /sbin/hdparm -C /dev/diskX | grep "active" > /dev/null; then
 /sbin/hdparm -S120 /dev/diskX
 touch /tmp/disksaving
fi
if /sbin/hdparm -C /dev/diskX | grep "standby" > /dev/null; then
 touch /tmp/disksaving
fi
/sbin/hdparm -B255 /dev/diskX
 
 
touch /tmp/disksaving is a quick&dirty way to check last run
Guest
This topic is now closed to further replies.

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.