You are not logged in.
Hi all,
I've got an HDD, which I don't use very often. As wiki suggests, I've added and enabled a service to put it on standby
$ cat /etc/systemd/system/hdparm.service
[Unit]
Description=hdparm sleep
[Service]
Type=oneshot
ExecStart=/usr/bin/hdparm -q -y /dev/sda
[Install]
WantedBy=multi-user.target
The service works fine and the disk is on standby until I type startx to start KDE. The disk is not automatically mounted and is commended out in fstab. I thought, it's related to the Disks and Devices applet, yet disabling it doesn't resolve the issue -- something still wakes the disk up. Baloo is also disabled BTW. lsof /dev/sda and lsof /dev/sda1 yield nothing. If I run hdparm -q -y /dev/sda manually after KDE has started, the disk doesn't get waked up later on.
When I switch to xterm, the disk doesn't get waked up, so it makes me believe, some part of KDE is to blame.
I don't get what exactly accesses the disk. Is there a way to check which processes have accessed the device since the boot?
Offline
Likely the udisks integration which is also used for removable drives and the like, see https://wiki.archlinux.org/index.php/Ud … partitions and https://wiki.archlinux.org/index.php/Ud … _(udisks2) for how to manipulate this
Offline
Thank you.
Setting ENV{UDISKS_IGNORE}="1" doesn't resolve the issue. Neither I've located an ATA setting equivalent to hdparm -y. I've tried editing my hdparm.service replacing WantedBy=multi-user.target with
[Install]
After=udisks2.service
WantedBy=udisks2.service
Yet, this doesn't help neither -- after kde starts, the disk is in idle. Maybe, smth else (not udisks2) wakes the disk up after hdparm.service puts it on standby? The workaround I'm currently employing is adding ExecStartPre=/bin/sleep 10, yet it doesn't strike me as the cleanest solution.
Offline