I’ve been really happy with my Intel NUC desktop, but one annoying thing is that when the displays go to sleep lots of things get messed up. The monitors lose resolution settings, windows get moved around, etc.
So hunting around today I wondered if the issue might have something with the kernel putting the USB hubs to sleep. The NUC has one HDMI port but it can support up to three monitors with the other two being over the USB-C connection. The simplest solution is one or more USB hubs.
It turns out though that the kernel does put them to sleep. And as usual, no one does sleep right. The joys of hardware. To disable it you can just do this as root:
|
|
To make that permanent on an Ubuntu system, change GRUB_CMDLINE_LINUX=""
in /etc/default/grub
to this:
|
|
Other linux distros might do it a different way. See how to add kernel
paramaters for your distro. Oh, and check the output of lsmod -a
and make sure usbcore
isn’t there. If it is you need to change
how the module is loaded. For that, add a file ending in .conf
to
/etc/modprobe.d
that has this line in it:
1
| options usbcore autosuspend=-1 |
So far it seems to have helped make things work better.
Later on it might be a good idea to tune individual devices to go to sleep. For instance my camera seems to handle sleep ok, so having it go to sleep when idle would be fine.