After updating from 14.04 to 16.04 LTS Ubuntu I started experiencing strange issues with USB peripherals (logitech keyboard and mouse). The mouse randomly freezes and so does the keyboard. For mouse, after being left idle the pointer usually stops moving and only right click remains working. Rightclicking unfreezes the mouse again for normal operation, and the next freeze happens when it's left untouched for several seconds. Keyboard has a similar pattern where after a moment of not being used the next several letters won't be registered. Once it gets going it will remain working until the next pause. The freezes between the mouse and the keyboard do not appear to be in a correlation. Replugging the device temporarily gets it working as well. Since this is a laptop I can tell the built-in pointer and keyboard work fine.
There are three relevant topics I found while googling, but none of them seems to apply:
USB peripherals cutting in and out
The suggested source of the problem is the power supply. However I had this setup running flawlessly for over 2 years on 14.04 and the issues appeared immediately after upgrade to 16.04.
USB Mouse not working after installing Ubuntu 16.04 - Persistent Fix?
The rmmod/modprobe trick doesn't do it for me, nor did disabling EnableOptionROM. Also it is not that the mouse stops working completely. Right click remains working and "awakens" the rest of functionality.
Problem with USB mouse in Ubuntu 16.04
The mouse doesn't change its status in xsetpointer.
Because of symptoms I would expect this to be a strange device driver issue, however with the issue affecting both keyboard and mouse it seems to be connected with USB functionality instead.
/etc/laptop-mode
isn't there – metame Sep 15 '17 at 14:44