On my desktop computer (recently changed to Xubuntu and kept up-to-date), the keyboard and mouse stop working apparently only after resuming from suspend and a delay of several minutes. The mouse pointer continues to move, but no mouse clicks have any effect. W/o the keyboard working, I cannot open terminals/consoles.
I enabled sshd so that I can log into the frozen GUI system, and top shows a 'normal' system (e.g., very low CPU use, low memory use, no swapping, etc.). Based on some research, I set /sys/module/usbcore/parameters/autosuspend to -1 (i.e., disabled autosuspend on every USB port), but that did not help matters.
No particular program seems to trigger the issue ... often I'm in google-chrome because that's how I mostly use the system, but I can be in PyCharm, an image viewer, or anything else I might happen to be using.
Except for the random GUI freezing, I have not seen any other issues with peripherals (including the scanner, monitors, mouse, keyboard, etc). Also, this same hardware ran for several years under Windows 10 w/o any problems in this arena; so the hardware is fine.
Here is some system info:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"
$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 045e:00dd Microsoft Corp. Comfort Curve Keyboard 2000 V1.0
Bus 001 Device 003: ID 062a:4102 MosArt Semiconductor Corp. 2.4G Wireless Mouse
Bus 001 Device 007: ID 04a9:190f Canon, Inc. CanoScan LiDE 220
Bus 001 Device 006: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 004: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth
Bus 001 Device 002: ID 2109:2812 VIA Labs, Inc. VL812 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07)
00:02.0 Display controller: Intel Corporation HD Graphics 530 (rev 06)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
00:14.0 USB controller: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation 100 Series/C230 Series Chipset Family Thermal Subsystem (rev 31)
00:16.0 Communication controller: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 (rev 31)
00:17.0 SATA controller: Intel Corporation Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller [AHCI Mode] (rev 31)
00:1b.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #17 (rev f1)
00:1c.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #1 (rev f1)
00:1c.2 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #3 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Z170 Chipset LPC/eSPI Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller (rev 31)
00:1f.3 Audio device: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller (rev 31)
00:1f.4 SMBus: Intel Corporation 100 Series/C230 Series Chipset Family SMBus (rev 31)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V (rev 31)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde PRO / Venus LE / Tropo PRO-L [Radeon HD 8830M / R7 250 / R7 M465X] (rev 87)
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series]
02:00.0 Non-Volatile memory controller: ADATA Technology Co., Ltd. XPG SX8200 Pro PCIe Gen3x4 M.2 2280 Solid State Drive (rev 03)
04:00.0 USB controller: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller
$ cat /proc/meminfo | head -3
MemTotal: 32774636 kB
MemFree: 27201232 kB
MemAvailable: 28870780 kB
So, there is lots of memory ... much more than I could exhaust in practice. top always show zero used swap. I have complicated monitor situation, four monitors with two off the onboard Intel HD Graphics 530 and two from the add-on AMD Radeon R7 250 card.
Any suggestions on how to best isolate the problem?