It’s tlp.service responsible for this issue as it enables ALPM (AHCI link power management) and AHCI Runtime PM on BAT which causes this start / stop / start / stop of hdd/ssd.
SMART reports thousands of hardware resets for my MX500 caused by this!
To disable:
in /etc/tlp.conf (or /etc/default/tlp.conf for older versions):
Uncomment:
SATA_LINKPWR_DENYLIST="hostX"
Refer to the output of tlp-stat -d to determine the host, replace ‘X’ accordingly.
uncomment and set to ‘on’ (means ‘disable’)
AHCI_RUNTIME_PM_ON_BAT=on
You have to power cycle to make the settings take affect - not only reset!
Verify with powertop - tab ‘adjustable setting’ should show:
bad Runtime PM for disk sda
bad Runtime PM for port ata1 of PCI device: [your specific vendor device e.g. Intel Atom/Celeron/Pentium Processor N3XXX Series]
bad Runtime PM for port ata2 of PCI device: [your specific vendor device e.g. Intel Atom/Celeron/Pentium Processor N3XXX Series]
Watch ‘journalctl -f’ to monitor…
EDIT: Clearification and typo (it’s ALPM not APLM