Log messages when the issue occurs:
```
nov 08 19:33:19 trillian kernel: usb 2-1.4.2: USB disconnect, device number 15
nov 08 19:33:19 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) config/udev: removing device Logitech Gaming Mouse G400
nov 08 19:33:19 trillian /usr/lib/gdm3/gdm-x-session[3785]: (**) Option "fd" "78"
nov 08 19:33:19 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) event2 - Logitech Gaming Mouse G400: device removed
nov 08 19:33:19 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) UnloadModule: "libinput"
nov 08 19:33:19 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) systemd-logind: releasing fd for 13:66
nov 08 19:33:19 trillian kernel: usb 2-1.4.2: new full-speed USB device number 16 using ehci-pci
nov 08 19:33:20 trillian kernel: usb 2-1.4.2: New USB device found, idVendor=046d, idProduct=c245, bcdDevice=69.00
nov 08 19:33:20 trillian kernel: usb 2-1.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
nov 08 19:33:20 trillian kernel: usb 2-1.4.2: Product: Gaming Mouse G400
nov 08 19:33:20 trillian kernel: usb 2-1.4.2: Manufacturer: Logitech
nov 08 19:33:20 trillian kernel: input: Logitech Gaming Mouse G400 as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4.2/2-1.4.2:1.0/0003:046D:C245.0016/input/input29
nov 08 19:33:20 trillian kernel: hid-generic 0003:046D:C245.0016: input,hidraw0: USB HID v1.10 Mouse [Logitech Gaming Mouse G400] on usb-0000:00:1d.0-1.4.2/input0
nov 08 19:33:20 trillian kernel: hid-generic 0003:046D:C245.0017: hiddev0,hidraw1: USB HID v1.10 Device [Logitech Gaming Mouse G400] on usb-0000:00:1d.0-1.4.2/input1
nov 08 19:33:20 trillian mtp-probe[7109]: checking bus 2, device 16: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4.2"
nov 08 19:33:20 trillian mtp-probe[7109]: bus: 2, device: 16 was not an MTP device
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/mouse0)
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) No input driver specified, ignoring this device.
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) This device may have been added with another device file.
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[2421]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/mouse0)
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[2421]: (II) No input driver specified, ignoring this device.
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[2421]: (II) This device may have been added with another device file.
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[2421]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/event2)
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/event2)
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (**) Logitech Gaming Mouse G400: Applying InputClass "libinput pointer catchall"
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) Using input driver 'libinput' for 'Logitech Gaming Mouse G400'
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[2421]: (**) Logitech Gaming Mouse G400: Applying InputClass "libinput pointer catchall"
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[2421]: (II) Using input driver 'libinput' for 'Logitech Gaming Mouse G400'
nov 08 19:33:20 trillian mtp-probe[7117]: checking bus 2, device 16: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4.2"
nov 08 19:33:20 trillian mtp-probe[7117]: bus: 2, device: 16 was not an MTP device
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[2421]: (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 27 paused 1
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[2421]: (II) systemd-logind: releasing fd for 13:66
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 78 paused 0
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (**) Logitech Gaming Mouse G400: always reports core events
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (**) Option "Device" "/dev/input/event2"
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (**) Option "_source" "server/udev"
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) event2 - Logitech Gaming Mouse G400: is tagged by udev as: Mouse
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) event2 - Logitech Gaming Mouse G400: device set to 800 DPI
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) event2 - Logitech Gaming Mouse G400: device is a pointer
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) event2 - Logitech Gaming Mouse G400: device removed
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4.2/2-1.4.2:1.0/0003:046D:C245.0016/input/input29/event2"
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) XINPUT: Adding extended input device "Logitech Gaming Mouse G400" (type: MOUSE, id 8)
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (**) Option "AccelerationScheme" "none"
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (**) Logitech Gaming Mouse G400: (accel) selected scheme none/0
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (**) Logitech Gaming Mouse G400: (accel) acceleration factor: 2.000
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (**) Logitech Gaming Mouse G400: (accel) acceleration threshold: 4
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) event2 - Logitech Gaming Mouse G400: is tagged by udev as: Mouse
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) event2 - Logitech Gaming Mouse G400: device set to 800 DPI
nov 08 19:33:20 trillian /usr/lib/gdm3/gdm-x-session[3785]: (II) event2 - Logitech Gaming Mouse G400: device is a pointer
```
This issue, especially comment #7 looks very much like the issues I've been having since I installed Ubuntu on my desktop for the first time.
I have described the issue in this askubuntu post more in detail: https:/ /askubuntu. com/questions/ 1286301/ ubuntu- 20-04-1- lts-mouse- removed- and-added- intermittently
Log messages when the issue occurs: gdm3/gdm- x-session[ 3785]: (II) config/udev: removing device Logitech Gaming Mouse G400 gdm3/gdm- x-session[ 3785]: (**) Option "fd" "78" gdm3/gdm- x-session[ 3785]: (II) event2 - Logitech Gaming Mouse G400: device removed gdm3/gdm- x-session[ 3785]: (II) UnloadModule: "libinput" gdm3/gdm- x-session[ 3785]: (II) systemd-logind: releasing fd for 13:66 pci0000: 00/0000: 00:1d.0/ usb2/2- 1/2-1.4/ 2-1.4.2/ 2-1.4.2: 1.0/0003: 046D:C245. 0016/input/ input29 C245.0016: input,hidraw0: USB HID v1.10 Mouse [Logitech Gaming Mouse G400] on usb-0000: 00:1d.0- 1.4.2/input0 C245.0017: hiddev0,hidraw1: USB HID v1.10 Device [Logitech Gaming Mouse G400] on usb-0000: 00:1d.0- 1.4.2/input1 pci0000: 00/0000: 00:1d.0/ usb2/2- 1/2-1.4/ 2-1.4.2" gdm3/gdm- x-session[ 3785]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/mouse0) gdm3/gdm- x-session[ 3785]: (II) No input driver specified, ignoring this device. gdm3/gdm- x-session[ 3785]: (II) This device may have been added with another device file. gdm3/gdm- x-session[ 2421]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/mouse0) gdm3/gdm- x-session[ 2421]: (II) No input driver specified, ignoring this device. gdm3/gdm- x-session[ 2421]: (II) This device may have been added with another device file. gdm3/gdm- x-session[ 2421]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/event2) gdm3/gdm- x-session[ 3785]: (II) config/udev: Adding input device Logitech Gaming Mouse G400 (/dev/input/event2) gdm3/gdm- x-session[ 3785]: (**) Logitech Gaming Mouse G400: Applying InputClass "libinput pointer catchall" gdm3/gdm- x-session[ 3785]: (II) Using input driver 'libinput' for 'Logitech Gaming Mouse G400' gdm3/gdm- x-session[ 2421]: (**) Logitech Gaming Mouse G400: Applying InputClass "libinput pointer catchall" gdm3/gdm- x-session[ 2421]: (II) Using input driver 'libinput' for 'Logitech Gaming Mouse G400' pci0000: 00/0000: 00:1d.0/ usb2/2- 1/2-1.4/ 2-1.4.2" gdm3/gdm- x-session[ 2421]: (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 27 paused 1 gdm3/gdm- x-session[ 2421]: (II) systemd-logind: releasing fd for 13:66 gdm3/gdm- x-session[ 3785]: (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 78 paused 0 gdm3/gdm- x-session[ 3785]: (**) Logitech Gaming Mouse G400: always reports core events gdm3/gdm- x-session[ 3785]: (**) Option "Device" "/dev/input/event2" gdm3/gdm- x-session[ 3785]: (**) Option "_source" "server/udev" gdm3/gdm- x-session[ 3785]: (II) event2 - Logitech Gaming Mouse G400: is tagged by udev as: Mouse gdm3/gdm- x-session[ 3785]: (II) event2 - Logitech Gaming Mouse G400: device set to 800 DPI gdm3/gdm- x-session[ 3785]: (II) event2 - Logitech Gaming Mouse G400: device is a pointer gdm3/gdm- x-session[ 3785]: (II) event2 - Logitech Gaming Mouse G400: device removed gdm3/gdm- x-session[ 3785]: (**) Option "config_info" "udev:/ sys/devices/ pci0000: 00/0000: 00:1d.0/ usb2/2- 1/2-1.4/ 2-1.4.2/ 2-1.4.2: 1.0/0003: 046D:C245. 0016/input/ input29/ event2" gdm3/gdm- x-session[ 3785]: (II) XINPUT: Adding extended input device "Logitech Gaming Mouse G400" (type: MOUSE, id 8) gdm3/gdm- x-session[ 3785]: (**) Option "AccelerationSc heme" "none" gdm3/gdm- x-session[ 3785]: (**) Logitech Gaming Mouse G400: (accel) selected scheme none/0 gdm3/gdm- x-session[ 3785]: (**) Logitech Gaming Mouse G400: (accel) acceleration factor: 2.000 gdm3/gdm- x-session[ 3785]: (**) Logitech Gaming Mouse G400: (accel) acceleration threshold: 4 gdm3/gdm- x-session[ 3785]: (II) event2 - Logitech Gaming Mouse G400: is tagged by udev as: Mouse gdm3/gdm- x-session[ 3785]: (II) event2 - Logitech Gaming Mouse G400: device set to 800 DPI gdm3/gdm- x-session[ 3785]: (II) event2 - Logitech Gaming Mouse G400: device is a pointer
```
nov 08 19:33:19 trillian kernel: usb 2-1.4.2: USB disconnect, device number 15
nov 08 19:33:19 trillian /usr/lib/
nov 08 19:33:19 trillian /usr/lib/
nov 08 19:33:19 trillian /usr/lib/
nov 08 19:33:19 trillian /usr/lib/
nov 08 19:33:19 trillian /usr/lib/
nov 08 19:33:19 trillian kernel: usb 2-1.4.2: new full-speed USB device number 16 using ehci-pci
nov 08 19:33:20 trillian kernel: usb 2-1.4.2: New USB device found, idVendor=046d, idProduct=c245, bcdDevice=69.00
nov 08 19:33:20 trillian kernel: usb 2-1.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
nov 08 19:33:20 trillian kernel: usb 2-1.4.2: Product: Gaming Mouse G400
nov 08 19:33:20 trillian kernel: usb 2-1.4.2: Manufacturer: Logitech
nov 08 19:33:20 trillian kernel: input: Logitech Gaming Mouse G400 as /devices/
nov 08 19:33:20 trillian kernel: hid-generic 0003:046D:
nov 08 19:33:20 trillian kernel: hid-generic 0003:046D:
nov 08 19:33:20 trillian mtp-probe[7109]: checking bus 2, device 16: "/sys/devices/
nov 08 19:33:20 trillian mtp-probe[7109]: bus: 2, device: 16 was not an MTP device
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian mtp-probe[7117]: checking bus 2, device 16: "/sys/devices/
nov 08 19:33:20 trillian mtp-probe[7117]: bus: 2, device: 16 was not an MTP device
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
nov 08 19:33:20 trillian /usr/lib/
```