Showing posts with label hdparm. Show all posts
Showing posts with label hdparm. Show all posts

Saturday, January 23, 2016

Archlinux on HP 6510b

Install packages: rfkill, hdparm

rfkill to enable wifi

Custom systemd unit for hdparm via systemd After=sleep.target:

/etc/systemd/system/myhdparm.service
[Unit]
Description=set hdparm for sda
After=default.target sleep.target

[Service]
type=oneshot
ExecStart=/etc/systemd/system/sethdparm.sh

[Install]
WantedBy=default.target sleep.target


/etc/systemd/system/sethdparm.sh
#!/bin/bash
sleep 2
hdparm -B 253 /dev/sda

Friday, June 12, 2015

hdparm fix for ubuntu 15.04

https://www.linux.org.ru/forum/general/8726915

> cat /etc/systemd/system/fix-hdparm@.service 
[Unit]
Description=Fix some hdparm settings after suspend/restore
After=dev-%i.device suspend.target hibernate.target sysinit.target hybrid-sleep.target
Requires=dev-%i.device

[Service]
Type=oneshot
ExecStart=/sbin/hdparm -B 254 /dev/%i

[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
WantedBy=sysinit.target
# systemctl enable fix-hdparm@sda
ln -s '/etc/systemd/system/fix-hdparm@.service' '/etc/systemd/system/suspend.target.wants/fix-hdparm@sda.service'
ln -s '/etc/systemd/system/fix-hdparm@.service' '/etc/systemd/system/hibernate.target.wants/fix-hdparm@sda.service'
ln -s '/etc/systemd/system/fix-hdparm@.service' '/etc/systemd/system/hybrid-sleep.target.wants/fix-hdparm@sda.service'
ln -s '/etc/systemd/system/fix-hdparm@.service' '/etc/systemd/system/sysinit.target.wants/fix-hdparm@sda.service'
vasily_pupkin ★★★★★ ()