Normally, if you connect a Nintendo Switch Pro Controller (hid-nintendo) via USB, it is automatically connected when turning the computer on. If however the computer is suspended, when resuming the computer, the controller won't reconnect, even if you press a button. The ways to reconnect it are either: Press the sync button on the controller; Unplug and plug the USB cable; Reboot the computer. Relevant logs from journalctl when suspending: lug 11 00:39:44 nixos kernel: nintendo 0003:057E:2009.000F: compensating for 37 dropped IMU reports lug 11 00:39:44 nixos kernel: nintendo 0003:057E:2009.000F: delta=504 avg_delta=13 When resuming: lug 11 00:39:44 nixos kernel: leds 0003:057E:2009.000F:green:player-1: Setting an LED's brightness failed (-110) lug 11 00:39:45 nixos kernel: leds 0003:057E:2009.000F:green:player-2: Setting an LED's brightness failed (-110) lug 11 00:39:45 nixos kernel: leds 0003:057E:2009.000F:green:player-3: Setting an LED's brightness failed (-110) lug 11 00:39:46 nixos kernel: leds 0003:057E:2009.000F:green:player-4: Setting an LED's brightness failed (-110) lug 11 00:39:46 nixos kernel: leds 0003:057E:2009.000F:blue:player-5: Setting an LED's brightness failed (-110) After pressing the sync button on the controller (still plugged in via USB): lug 11 00:49:21 nixos kernel: usb 3-2: USB disconnect, device number 17 lug 11 00:49:22 nixos kernel: usb 3-2: new full-speed USB device number 18 using xhci_hcd lug 11 00:49:22 nixos kernel: usb 3-2: New USB device found, idVendor=057e, idProduct=2009, bcdDevice= 2.10 lug 11 00:49:22 nixos kernel: usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 lug 11 00:49:22 nixos kernel: usb 3-2: Product: Pro Controller ...etcetera.
Well, I tried it myself. After trying to compile the Linux kernel to load a module (first time), I finally did it. I didn't test it much, but it seems to work well. If no one has anything against it, I'll send it after a week. (My first kernel contribution)
Created attachment 304579 [details] Patch to reinitialize the controller after resuming from suspend
Created attachment 304612 [details] Patch to reinitialize the controller after resuming from suspend
Fixed in Linux 6.6.