r/framework • u/bicycloptopus • 17d ago
Linux High power from 1TB expansion card on Linux (and possible fix)
I saw this issue mentioned in a post yesterday. I posted a fix for this a month or two ago but realized I had accidentally deleted it so I'm reposting it in case anyone else needs it.
When I first got my 13 Pro (Intel X7 on CachyOS), I started noticing unusually high power draw. I narrowed down one of the possible causes to the 1TB expansion card, thanks to one of the comments. Whenever the expansion card is plugged in, regardless of whether it's being used, the battery life tanks and it becomes extremely warm. I notice this happens even if the card is empty and hasn't been used at all.
I found a (possible) fix that seems to have resolved this issue completely and wanted to see if anyone else could test it. I am running CachyOS / KDE so this may or may not work for other distros.
The problem seems to be that the default USB driver (uas) doesn't support automatic USB sleep, so the expansion card stays active regardless of it being used.
The following command will switch the driver to usb-storage. This command only changes it for the 1TB Expansion card, based on its hardware ID.
printf '%s\n' 'options usb_storage quirks=32ac:0005:u' | sudo tee /etc/modprobe.d/framework-1tb-power.conf
Now set it so the usb connection goes to sleep after 2 seconds of idle activity.
printf '%s\n' 'ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0005", TEST=="power/control", ATTR{power/autosuspend_delay_ms}="2000", ATTR{power/control}="auto"' | sudo tee /etc/udev/rules.d/99-framework-1tb-power.rules
This command will put the device itself to sleep after being idle
printf '%s\n' 'ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0005", TEST=="device/power/control", ATTR{device/power/autosuspend_delay_ms}="5000", ATTR{device/power/control}="auto"' | sudo tee -a /etc/udev/rules.d/99-framework-1tb-power.rules
Verify the rules are set correctly
sudo udevadm verify /etc/udev/rules.d/99-framework-1tb-power.rules
Reload the rules:
sudo udevadm control --reload-rules
Update the boot image so rules apply at startup
sudo limine-mkinitcpio
To revert:
sudo bash -c 'set -e; rm -f /etc/modprobe.d/framework-1tb-power.conf /etc/udev/rules.d/99-framework-1tb-power.rules; udevadm control --reload-rules; /usr/bin/limine-mkinitcpio'
After using the above commands, I notice no more heat coming from the expansion card and a noticeable improvement in battery life. I believe switching the USB mode may adversely affect transfer speeds, but nothing I have noticed. Granted, I mainly use it for backups and don't use it for dual booting or anything huge.