TL;DR
For solution, jump to How to fix it?

I have been using Ubuntu for more than 15 years. In the past, I would jump to the newest releases to get the latest features. However, since few years, there haven’t been many changes I’ve been eagerly waiting for. So, I became lazy and instead of upgrading the OS twice a year, I prefer to stay with the LTS version and upgrade when a new one arrives and is well supported. Stability is now more important to me than being on the cutting edge.

LTS versions are quite stable and well supported. Sometimes, when I need support for newer hardware, I upgrade to one of the latest variants. Fortunately, LTS Ubuntu provides something called the Hardware Enablement (HWE)1 stack, which includes:

  • A more recent kernel
  • Upgraded Mesa and graphics drivers

I never had issues with these until now.

I was on Ubuntu 24.04 with the 6.8 kernel, and everything was working fine. I configured HWE kernel upgrades a long time ago, so if something new pops up, I would automatically upgrade. A few weeks ago, a new kernel arrived2.

Example of errors I've been getting recently

Photo of errors I was getting

These errors appear during system boot and significantly increase the boot time. Previously, it took a maximum of 5 seconds, but now it hangs for 10-15 seconds. At first, it seemed like something serious had happened to my hard drives, but after checking:

ZFS zpool status
zpool status
  pool: storage
 state: ONLINE
  scan: scrub repaired 0B in 1 days 18:29:38 with 0 errors on Mon Dec  9 18:53:39 2024
config:

	NAME                                    STATE     READ WRITE CKSUM
	storage                                 ONLINE       0     0     0
	  raidz1-0                              ONLINE       0     0     0
	    ata-WDC_WD140EDGZ-11B1PA0_9MGJK4YK  ONLINE       0     0     0
	    ata-WDC_WD140EDGZ-11B1PA0_Y6GVH40C  ONLINE       0     0     0
	    ata-WDC_WD140EDGZ-11B1PA0_Y6GWHD3C  ONLINE       0     0     0

errors: No known data errors

I started googling and found a thread about similar issue and ZFSexternal link which I use. And following the thread, I found information about changes to the defaults of SATA Active Link Power Managementexternal link settings these Arch docs.

Summing it up, newer kernels try to add some power management tuning to save a few watts, but it might not work well with all drives and SATA controllers. It looks like I’m one of the unlucky ones experiencing this issue.

How to fix it?

The old default was max_performance, but potentially medium_power could save a few watts and still work. I tried it, and it worked for me. You might need to adjust it to your needs.

Update link power management policy with UDEV setting
cat << EOF | sudo tee -a /etc/udev/rules.d/hd_power_save.rules
ACTION=="add", SUBSYSTEM=="scsi_host", KERNEL=="host*", ATTR{link_power_management_policy}="medium_power"
EOF

Now reboot and check if it starts as fast as it should. It worked for me!


Enjoyed? Buy Me a Coffee at ko-fi.com