I currently have pm-utils on hold at version 1.3.0-3. Looking ahead in
the changelog, I saw:
Current hooks when switching to battery:
[...]
- [harddrive] More aggressive harddrive spindown times
[...]
- [journal-commit, xfs_buffer] Delay ext[34]/ext journal/metadata
writeback
- [laptop-mode] Delay hard disk writeback times of dirty caches, to avoid
spin ups
In general, this seems like a bad idea to do automatically without the
user's knowledge; it makes the system far less robust against sudden
failures. I haven't worried about losing data due to a system crash
(usually self-inflicted due to kernel hacking) in a long time. I don't
want to have to start now.
But in any case, none of these hooks need to run on a non-rotational
device such as an SSD. SSDs can idle very effectively the moment they
have no work to do, without a long spin-up/spin-down transition. So,
you don't need to make the system less safe to minimize writebacks on
such systems.
You can detect non-rotational devices by looking at
/sys/block/$device/queue/rotational , which will contain a 1
(rotational) or 0 (non-rotational such as an SSD). For instance, on my
system:
~$ cat /sys/block/sda/queue/rotational
0
(Note that these files only exist for the top-level devices like sda,
not partition devices like sda1.)
So, if you see rotational -eq 0 on a device, you shouldn't run the
harddrive, journal-commit, xfs_buffer, or laptop-mode hooks for the
filesystems on that device.
(I'd argue more generally against running those hooks on *any* device,
but this seems like the right place to start, and it solves my immediate
problem. :) )
Thanks,
Josh Triplett
Hi Josh
and stability. But we try hard to do so.
Have you read further in the changelog:
...
* debian/rules: Remove harddrive power hook, this causes excessive hard disk
spindown on a lot of machines. The hdparm package already ships
...
* Add 14-disable-sata-alpm.patch: Disable SATA link power management by
default, as it still causes disk errors and corruptions on many hardware.
(LP: #539467)
So, we already disabled those hooks where we know it can cause problems.
Regarding laptop-mode: Does it cause any problems / does it have negative side
effects on SSD?
Michael
I did see both of those, but both just work around hardware bugginess. The other hooks I mentioned have the much more serious issue of delaying writeback of user data, risking data loss if the system never gets a chance to write it. tries to avoid spinning up the disk, but when the disk doesn't spin that no longer matters. SSDs idle very effectively when they don't have work to do, and don't need a spin-up and spin-down period; they sleep when idle much like CPUs do. So, delaying spin-up doesn't actually lead to any significant power savings (unlike with a spinning disk), but still incurs the same risk. - Josh Triplett
Control: notforwarded -1 Control: tag -1 -wontfix Was marked such by bts-link, wontfixed not because of the bug's value, but because of upstream having switched to systemd. But Debian is not Red Hat, and carries inits that are not <insert opinion here>, and needs pm-utils or an equivalent. I have no real opinion about this bug, though, all three of my laptops using eMMC not SSD. But it needs to be decided on its merits. Meow!
Dear submitter, as the package pm-utils has just been removed from the Debian archive unstable we hereby close the associated bug reports. We are sorry that we couldn't deal with your issue properly. For details on the removal, please see https://bugs.debian.org/1058701 The version of this package that was in Debian prior to this removal can still be found using https://snapshot.debian.org/. Please note that the changes have been done on the master archive and will not propagate to any mirrors until the next dinstall run at the earliest. This message was generated automatically; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org. Debian distribution maintenance software pp. Thorsten Alteholz (the ftpmaster behind the curtain)