usb_disable_autosuspend(9)
π usb_disable_autosuspend(9) β like, the Kernel API Manual page, bestie β¨
okay so you found the usb_disable_autosuspend page in the Kernel API Manual and you're like "what does this even do" β don't worry, I gotchu π«Ά. Short page, but it's lowkey iconic.
β¨ NAME β¨
usb_disable_autosuspend β this is the routine that prevents a USB device from being autosuspended, no cap π«π€
π¦ SYNOPSIS π¦
void usb_disable_autosuspend (struct usb_device *udev );
Like that's literally the whole signature. Void return, one arg, that's her π
π ARGUMENTS π
udevβ the USB device which may not be autosuspended π₯Ίππ that's the one you're protecting from the sleepy-time vibes.
πΈ DESCRIPTION πΈ
okay so here's the tea β β this routine prevents udev from being autosuspended, and it also wakes it up if it is already autosuspended π΄β‘οΈπ³. Like it's not just blocking future naps, it's shaking it awake if it's already napping. main character energy fr fr.
β οΈ but bestie, listen β the caller must hold udev's device lock. Like, that is not optional. The lock is mandatory, periodt. ππ
π SEE ALSO π
the whole squad π«Ά β and also the kernel file these live in, which is ./drivers/usb/core/driver.c. honestly the friend group is huge, I'm obsessed:
usb_driver_claim_interface(9)usb_driver_release_interface(9)usb_match_id(9)usb_register_device_driver(9)usb_deregister_device_driver(9)usb_register_driver(9)usb_deregister(9)usb_suspend_both(9)usb_resume_both(9)usb_enable_autosuspend(9)usb_autosuspend_device(9)usb_autoresume_device(9)usb_autopm_put_interface(9)usb_autopm_put_interface_async(9)usb_autopm_put_interface_no_suspend(9)usb_autopm_get_interface(9)usb_autopm_get_interface_async(9)usb_autopm_get_interface_no_resume(9)
and that's the whole page bestie β¨π go hold that device lock and slay π
sign-off szn πΈ: this one lives under ./drivers/usb/core, and the page is dated October 2026 ποΈπ k bye ily π«Άπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms