USB Switcher Issue? - Unresponsive windows / keyboard after using device

Let me first say sorry that is such a vague question. This has been plaguing me for months and I’m just getting to this forum now.

I have this USB switching device that connects to two seperate computers, one being my work mac, and the other being my desktop running manjaro running

$ uname -a
Linux pc 5.14.21-2-MANJARO #1 SMP PREEMPT Sun Nov 21 22:43:47 UTC 2021 x86_64 GNU/Linux

Now the main issue. When I switch the USB from one computer to the desktop I run manjaro on, nearly every time the entire desktop environment freezes, and ONLY my mouse seems to work, My keyboard does have power (I can see via the keystroke RGB) but there is never any input from this keyboard. Normally at this point, I restart the computer and then the keyboard works fine.

I’m not sure how much detail you will need but I’ll drop a bit here

lspci

00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 0d)
00:01.0 PCI bridge: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) (rev 0d)
00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:17.0 SATA controller: Intel Corporation Cannon Lake PCH SATA AHCI Controller (rev 10)
00:1b.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #17 (rev f0)
00:1c.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #1 (rev f0)
00:1c.7 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #8 (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #9 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Z390 Chipset LPC/eSPI Controller (rev 10)
00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-V (rev 10)
01:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Upstream Port of PCI Express Switch (rev c1)
02:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT / 6800M] (rev c1)
03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 HDMI Audio [Radeon RX 6800/6800 XT / 6900 XT]
06:00.0 Network controller: Intel Corporation Wi-Fi 6 AX200 (rev 1a)
07:00.0 Non-Volatile memory controller: Sandisk Corp WD Black SN750 / PC SN730 NVMe SSD

lsusb

Bus 002 Device 002: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 0461:4002 Primax Electronics, Ltd GamaKay LK67 Keyboard
Bus 001 Device 004: ID 046d:c08b Logitech, Inc. G502 SE HERO Gaming Mouse
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 010: ID 046d:0a66 Logitech, Inc. [G533 Wireless Headset Dongle]
Bus 001 Device 009: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 007: ID 048d:8297 Integrated Technology Express, Inc. IT8297 RGB LED Controller
Bus 001 Device 008: ID 8087:0029 Intel Corp. AX200 Bluetooth
Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 003: ID 046d:0a67 Logitech, Inc. G533 Gaming Headset Battery Charger
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ sudo journalctl --follow | tee example.log

Dec 30 13:19:00 pc kernel: usb 1-5: USB disconnect, device number 11
Dec 30 13:19:00 pc kernel: usb 1-5.1: USB disconnect, device number 12
Dec 30 13:19:00 pc kernel: usb 1-5.4: USB disconnect, device number 13
Dec 30 13:19:00 pc kernel: usb 2-5: USB disconnect, device number 3
Dec 30 13:19:07 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 5374, resource id: 104857606, major code: 18 (ChangeProperty), minor code: 0
Dec 30 13:19:08 pc kernel: usb 2-5: new SuperSpeed USB device number 4 using xhci_hcd
Dec 30 13:19:08 pc kernel: usb 2-5: New USB device found, idVendor=05e3, idProduct=0626, bcdDevice= 6.63
Dec 30 13:19:08 pc kernel: usb 2-5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 30 13:19:08 pc kernel: usb 2-5: Product: USB3.1 Hub
Dec 30 13:19:08 pc kernel: usb 2-5: Manufacturer: GenesysLogic
Dec 30 13:19:08 pc kernel: hub 2-5:1.0: USB hub found
Dec 30 13:19:08 pc kernel: hub 2-5:1.0: 4 ports detected
Dec 30 13:19:08 pc kernel: usb 1-5: new high-speed USB device number 14 using xhci_hcd
Dec 30 13:19:08 pc kernel: usb 1-5: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice= 6.63
Dec 30 13:19:08 pc kernel: usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 30 13:19:08 pc kernel: usb 1-5: Product: USB2.1 Hub
Dec 30 13:19:08 pc kernel: usb 1-5: Manufacturer: GenesysLogic
Dec 30 13:19:08 pc kernel: hub 1-5:1.0: USB hub found
Dec 30 13:19:08 pc kernel: hub 1-5:1.0: 4 ports detected
Dec 30 13:19:08 pc upowerd[3700]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb2/2-5
Dec 30 13:19:08 pc kernel: usb 1-5.1: new full-speed USB device number 15 using xhci_hcd
Dec 30 13:19:08 pc kernel: usb 1-5.1: New USB device found, idVendor=046d, idProduct=c08b, bcdDevice=27.03
Dec 30 13:19:08 pc kernel: usb 1-5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Dec 30 13:19:08 pc kernel: usb 1-5.1: Product: G502 HERO SE
Dec 30 13:19:08 pc kernel: usb 1-5.1: Manufacturer: Logitech
Dec 30 13:19:08 pc kernel: usb 1-5.1: SerialNumber: 1879386D3231
Dec 30 13:19:08 pc kernel: input: Logitech G502 HERO SE as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1/1-5.1:1.0/0003:046D:C08B.000C/input/input41
Dec 30 13:19:08 pc kernel: hid-generic 0003:046D:C08B.000C: input,hidraw1: USB HID v1.11 Mouse [Logitech G502 HERO SE] on usb-0000:00:14.0-5.1/input0
Dec 30 13:19:08 pc kernel: input: Logitech G502 HERO SE Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1/1-5.1:1.1/0003:046D:C08B.000D/input/input42
Dec 30 13:19:08 pc kernel: hid-generic 0003:046D:C08B.000D: input,hiddev97,hidraw2: USB HID v1.11 Keyboard [Logitech G502 HERO SE] on usb-0000:00:14.0-5.1/input1
Dec 30 13:19:09 pc kernel: usb 1-5.4: new full-speed USB device number 16 using xhci_hcd
Dec 30 13:19:09 pc kernel: usb 1-5.4: New USB device found, idVendor=0461, idProduct=4002, bcdDevice= 2.01
Dec 30 13:19:09 pc kernel: usb 1-5.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 30 13:19:09 pc kernel: usb 1-5.4: Product: GamaKay LK67 Keyboard
Dec 30 13:19:09 pc kernel: usb 1-5.4: Manufacturer: ROYUAN
Dec 30 13:19:09 pc kernel: input: ROYUAN GamaKay LK67 Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4/1-5.4:1.0/0003:0461:4002.000E/input/input45
Dec 30 13:19:09 pc kernel: hid-generic 0003:0461:4002.000E: input,hidraw3: USB HID v1.11 Keyboard [ROYUAN GamaKay LK67 Keyboard] on usb-0000:00:14.0-5.4/input0
Dec 30 13:19:09 pc kernel: input: ROYUAN GamaKay LK67 Keyboard Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4/1-5.4:1.1/0003:0461:4002.000F/input/input46
Dec 30 13:19:09 pc upowerd[3700]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5
Dec 30 13:19:09 pc kernel: input: ROYUAN GamaKay LK67 Keyboard System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4/1-5.4:1.1/0003:0461:4002.000F/input/input47
Dec 30 13:19:09 pc kernel: input: ROYUAN GamaKay LK67 Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4/1-5.4:1.1/0003:0461:4002.000F/input/input48
Dec 30 13:19:09 pc kernel: input: ROYUAN GamaKay LK67 Keyboard Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4/1-5.4:1.1/0003:0461:4002.000F/input/input49
Dec 30 13:19:09 pc kernel: input: ROYUAN GamaKay LK67 Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4/1-5.4:1.1/0003:0461:4002.000F/input/input50
Dec 30 13:19:09 pc kernel: hid-generic 0003:0461:4002.000F: input,hiddev98,hidraw4: USB HID v1.11 Keyboard [ROYUAN GamaKay LK67 Keyboard] on usb-0000:00:14.0-5.4/input1
Dec 30 13:19:09 pc mtp-probe[9111]: checking bus 1, device 16: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4"
Dec 30 13:19:09 pc mtp-probe[9110]: checking bus 1, device 15: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1"
Dec 30 13:19:09 pc mtp-probe[9111]: bus: 1, device: 16 was not an MTP device
Dec 30 13:19:09 pc mtp-probe[9110]: bus: 1, device: 15 was not an MTP device
Dec 30 13:19:09 pc upowerd[3700]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4
Dec 30 13:19:09 pc upowerd[3700]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1
Dec 30 13:19:09 pc systemd-logind[369]: Watching system buttons on /dev/input/event20 (ROYUAN GamaKay LK67 Keyboard Consumer Control)
Dec 30 13:19:09 pc systemd-logind[369]: Watching system buttons on /dev/input/event18 (Logitech G502 HERO SE Keyboard)
Dec 30 13:19:09 pc systemd-logind[369]: Watching system buttons on /dev/input/event19 (ROYUAN GamaKay LK67 Keyboard)
Dec 30 13:19:09 pc systemd-logind[369]: Watching system buttons on /dev/input/event21 (ROYUAN GamaKay LK67 Keyboard System Control)
Dec 30 13:19:09 pc systemd-logind[369]: Watching system buttons on /dev/input/event22 (ROYUAN GamaKay LK67 Keyboard)
Dec 30 13:19:09 pc mtp-probe[9203]: checking bus 1, device 16: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.4"
Dec 30 13:19:09 pc mtp-probe[9203]: bus: 1, device: 16 was not an MTP device
Dec 30 13:19:09 pc mtp-probe[9205]: checking bus 1, device 15: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1"
Dec 30 13:19:09 pc mtp-probe[9205]: bus: 1, device: 15 was not an MTP device
Dec 30 13:19:24 pc kcminit[9214]: Initializing  "kcm_mouse" :  "kcminit_mouse"
Dec 30 13:19:24 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 8308, resource id: 104857605, major code: 18 (ChangeProperty), minor code: 0
Dec 30 13:19:25 pc kcminit[9220]: Initializing  "kcm_mouse" :  "kcminit_mouse"
Dec 30 13:19:29 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 9919, resource id: 106954757, major code: 18 (ChangeProperty), minor code: 0
Dec 30 13:19:35 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 14832, resource id: 14695706, major code: 3 (GetWindowAttributes), minor code: 0
Dec 30 13:19:35 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 14833, resource id: 14695706, major code: 14 (GetGeometry), minor code: 0
Dec 30 13:19:24 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 8308, resource id: 104857605, major code: 18 (ChangeProperty), minor code: 0
Dec 30 13:19:25 pc kcminit[9220]: Initializing  "kcm_mouse" :  "kcminit_mouse"
Dec 30 13:19:29 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 9919, resource id: 106954757, major code: 18 (ChangeProperty), minor code: 0
Dec 30 13:19:35 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 14832, resource id: 14695706, major code: 3 (GetWindowAttributes), minor code: 0
Dec 30 13:19:35 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 14833, resource id: 14695706, major code: 14 (GetGeometry), minor code: 0
Dec 30 13:19:43 pc sudo[9000]: pam_unix(sudo:session): session closed for user root
Dec 30 13:19:43 pc audit[9000]: USER_END pid=9000 uid=1000 auid=1000 ses=2 subj==unconfined msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Dec 30 13:19:43 pc kernel: audit: type=1106 audit(1640891983.004:502): pid=9000 uid=1000 auid=1000 ses=2 subj==unconfined msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev>
Dec 30 13:19:43 pc kernel: audit: type=1104 audit(1640891983.004:503): pid=9000 uid=1000 auid=1000 ses=2 subj==unconfined msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? termi>
Dec 30 13:19:43 pc audit[9000]: CRED_DISP pid=9000 uid=1000 auid=1000 ses=2 subj==unconfined msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Dec 30 13:20:43 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 38294, resource id: 104857606, major code: 18 (ChangeProperty), minor code: 0
Dec 30 13:20:44 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 39808, resource id: 14696463, major code: 3 (GetWindowAttributes), minor code: 0
Dec 30 13:20:44 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 39809, resource id: 14696463, major code: 14 (GetGeometry), minor code: 0
Dec 30 13:21:04 pc NetworkManager[365]: <info>  [1640892064.5085] device (wlp6s0): set-hw-addr: set MAC address to 6E:5F:FA:11:3E:19 (scanning)
Dec 30 13:21:04 pc NetworkManager[365]: <info>  [1640892064.5104] device (wlp6s0): supplicant interface state: inactive -> interface_disabled
Dec 30 13:21:04 pc NetworkManager[365]: <info>  [1640892064.5104] device (p2p-dev-wlp6s0): supplicant management interface state: inactive -> interface_disabled
Dec 30 13:21:04 pc NetworkManager[365]: <info>  [1640892064.5536] device (wlp6s0): supplicant interface state: interface_disabled -> disconnected
Dec 30 13:21:04 pc NetworkManager[365]: <info>  [1640892064.5536] device (p2p-dev-wlp6s0): supplicant management interface state: interface_disabled -> disconnected
Dec 30 13:21:05 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 45582, resource id: 14697608, major code: 3 (GetWindowAttributes), minor code: 0
Dec 30 13:21:05 pc kwin_x11[3218]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 45583, resource id: 14697608, major code: 14 (GetGeometry), minor code: 0
Dec 30 13:21:07 pc NetworkManager[365]: <info>  [1640892067.5562] device (wlp6s0): supplicant interface state: disconnected -> inactive
Dec 30 13:21:07 pc NetworkManager[365]: <info>  [1640892067.5562] device (p2p-dev-wlp6s0): supplicant management interface state: disconnected -> inactive
Dec 30 13:21:37 pc dbus-daemon[364]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.75' (uid=0 pid=12374 comm="sudo journalctl ")
Dec 30 13:21:37 pc dbus-daemon[364]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesktop.home1.service not found.
Dec 30 13:21:37 pc sudo[12374]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Dec 30 13:21:37 pc audit[12374]: USER_ACCT pid=12374 uid=1000 auid=1000 ses=2 subj==unconfined msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="nathan" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Dec 30 13:21:37 pc sudo[12374]:   nathan : TTY=pts/1 ; PWD=/home/nathan ; USER=root ; COMMAND=/usr/bin/journalctl
Dec 30 13:21:37 pc audit[12374]: CRED_REFR pid=12374 uid=1000 auid=1000 ses=2 subj==unconfined msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Dec 30 13:21:37 pc sudo[12374]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Dec 30 13:21:37 pc audit[12374]: USER_START pid=12374 uid=1000 auid=1000 ses=2 subj==unconfined msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Dec 30 13:21:37 pc kernel: audit: type=1101 audit(1640892097.754:504): pid=12374 uid=1000 auid=1000 ses=2 subj==unconfined msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="nathan" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/p>
Dec 30 13:21:37 pc kernel: audit: type=1110 audit(1640892097.754:505): pid=12374 uid=1000 auid=1000 ses=2 subj==unconfined msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? term>
Dec 30 13:21:37 pc kernel: audit: type=1105 audit(1640892097.754:506): pid=12374 uid=1000 auid=1000 ses=2 subj==unconfined msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev>

Files in /usr/share/X11/xorg.conf.d

$ cat 10-amdgpu.conf

Section "OutputClass"
	Identifier "AMDgpu"
	MatchDriver "amdgpu"
	Driver "amdgpu"
EndSection

libinput ( not sure why all of this is in libinput as I dont quite remember what i did when i troubleshooted my old X11 errors)

$ cat 40-libinput.conf

# Match on all types of devices but joysticks
#
# If you want to configure your devices, do not copy this file.
# Instead, use a config snippet that contains something like this:
#
# Section "InputClass"
#   Identifier "something or other"
#   MatchDriver "libinput"
#
#   MatchIsTouchpad "on"
#   ... other Match directives ...
#   Option "someoption" "value"
# EndSection
#
# This applies the option any libinput device also matched by the other
# directives. See the xorg.conf(5) man page for more info on
# matching devices.

Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Let me know what else is needed to help troubleshoot.