Disable USB wakeup

hey folks :waving_hand:

i’m running into a weird “auto-power-on” issue with my Framework Desktop and could use some collective wisdom.

When my ThunderBay is connected and powered, the desktop turns back on a minute or two after a clean shutdown (looks like a reboot, but I confirmed with `last -x` that it was a clean shutdown).

If I export the pool and power off/unplug the ThunderBay first, the PC stays off.

I have tried so many things already. Disabled all /proc/acpi/wakeup, disabled all external wake-ups on the bios (including USB), cleared RTC wake alarms, wrote a shutdown script that unbinds/removes Thunderbolt PCI functions before the shutdown, and many other things. But at the end, the only thing that actually solves it is to remove the cable from the desktop.

Any suggestions? Thanks a lot

If you hold down the shift key while tapping ‘shutdown’ and with the Thunderbay still attached does it also restart afterward?

I have a similar issue with my custom build (128GB mainboard in Jonsbo t6 case with a bequiet 600w SFX-L powersupply). Regardless of USB it always starts up a moment after shutdown on both Windows and Ubuntu. Have checked all the BIOS settings I can think of but still have to shut off the PSU switch on the back to shut off the power. First time after turning on the PSU, the front panel switch works normally.

Any ideas?

Unfortunately, I wasn’t able to find a solution yet

These sound like your typical sleep wakeup issues at the OS level.

In Linux you can disable wakeup from all devices from all events except power button by running the following with sudo/root:

for dev in $(cat /proc/acpi/wakeup | grep enabled | cut -f1); do echo $dev > /proc/acpi/wakeup; done

In Windows cmd.exe (NOT POWERSHELL), likely as administrator, you can do the same with

for /F "tokens=*" %A in ('powercfg -devicequery wake_armed') do powercfg -devicedisablewake "%A"

The more basic forms to allow you to investigate in more detail with Windows:

powercfg -devicequery wake_armed
powercfg -devicedisablewake "Device Name"

And in Linux:

cat /proc/acpi/wakeup | grep enabled
2 Likes

Shutdown on Windows is more or less hybernation. Holding Shift while tapping shutdown (and holding it down for, say 20 sec) forces a proper shutdown. Which is why I asked earlier. Just something to try

Thanks for the answer. But Im using Linux

Hi, thanks for the answer.

But as I stated on the post, I have already disabled /proc/acpi/wakeup. I have also disabled the USB wakeup in BIOS

Ah, missed that.

Just to double-check, did you confirm with this?

Since it’s Thunderbolt you probably have done the whatever authorization thing to give it lower level access? Could be the device itself is doing something that doesn’t depend on the ACPI events to wake up the system.

Sorry, I completley missed that you were Linux

There should be a sysfs file representing wakeup for this device. Try disabling that.

Thanks for the suggestion but it didn’t help. I disabled device wake on all devices in Windows and it still immediately restarts every time I shut down. Any other suggestions?

Note my issue may be different than the OP’s - I don’t need to have anything plugged into USB to reproduce this. I wonder if it’s something about my PSU or the case switch?

So, for Windows, holding the Shift key when you tap shutdown might work and keep it held for about 10-15 seconds.