Keyboard not recognized after being disconnected

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
praxitilies
Level 1
Level 1
Posts: 10
Joined: Fri Mar 25, 2022 11:56 am

Keyboard not recognized after being disconnected

Post by praxitilies »

Hi everyone,

New convert from Windows, having an issue that I haven't been able to find an answer for yet, hoping someone can help me with it.

I have my personal computer and my work computer set up on the same desk, and I switch my keyboard between the two depending on what I need to do at any given time. I do this by physically disconnecting the keyboard from one machine and connecting it to the other when I need to switch tasks.

With my windows installation, there was never any problem, but with Mint I've noticed that if I disconnect my keyboard from the home computer to do something on my work computer, when I reconnect the keyboard back into Mint it will usually fail to reconnect and won't be recognized until I reboot Mint.

Naturally this is a bit of an inconvenience.

I've already tried changing my grub config with usbcore.autosuspend=-1, but when I run the command cat /sys/module/usbcore/parameters/autosuspend it still spits back 2 as the result.

I'm not sure if I'm doing something wrong or if this is an issue with the drivers (it's a Dell wired keyboard) or if I'm just missing some setting somewhere.

Please let me know what I can do to fix this, because I would hate to have to reinstall linux over this weird bug. Thanks!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
SMG
Level 25
Level 25
Posts: 31815
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Keyboard not recognized after being disconnected

Post by SMG »

praxitilies wrote: Fri Mar 25, 2022 12:05 pmI've already tried changing my grub config with usbcore.autosuspend=-1, but when I run the command cat /sys/module/usbcore/parameters/autosuspend it still spits back 2 as the result.
Welcome to the forum, praxitilies.

Please give us information about your install by entering this command in a terminal:

Code: Select all

inxi -Fxxxrz
Click </> from the mini toolbar above the textbox where you type your reply and then place your cursor between the code tags and paste the results of the command between the code tags [code]Results[/code]. This will let us know how Mint sees your hardware.

It sounds like you tried this solution.
Are the ports USB 2.0 or 3.0 that you are using?
Have you checked to see if it makes a difference into which port you attach the keyboard (presuming you have an option of more than one)?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
praxitilies
Level 1
Level 1
Posts: 10
Joined: Fri Mar 25, 2022 11:56 am

Re: Keyboard not recognized after being disconnected

Post by praxitilies »

Hi SMG,

This is the output I get when running that command in the terminal:

Code: Select all

System:
  Kernel: 5.4.0-104-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
  Desktop: Cinnamon 5.2.7 wm: muffin 5.2.1 dm: LightDM 1.30.0 
  Distro: Linux Mint 20.3 Una base: Ubuntu 20.04 focal 
Machine:
  Type: Desktop System: Dell product: Precision T5600 v: 01 serial: <filter> 
  Chassis: type: 7 serial: <filter> 
  Mobo: Dell model: 0GN6JF v: A01 serial: <filter> BIOS: Dell v: A19 
  date: 06/30/2019 
CPU:
  Topology: 6-Core model: Intel Xeon E5-2620 0 bits: 64 type: MT MCP 
  arch: Sandy Bridge rev: 7 L2 cache: 15.0 MiB 
  flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 47883 
  Speed: 1995 MHz min/max: 1200/2500 MHz Core speeds (MHz): 1: 1995 2: 1995 
  3: 1995 4: 1995 5: 1995 6: 1995 7: 1995 8: 1995 9: 1995 10: 1995 11: 1995 
  12: 1995 
Graphics:
  Device-1: NVIDIA GK208B [GeForce GT 710] vendor: PNY driver: nouveau 
  v: kernel bus ID: 03:00.0 chip ID: 10de:128b 
  Display: x11 server: X.Org 1.20.13 driver: modesetting 
  unloaded: fbdev,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: NV106 v: 4.3 Mesa 21.2.6 direct render: Yes 
Audio:
  Device-1: Intel C600/X79 series High Definition Audio vendor: Dell 
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:1d20 
  Device-2: NVIDIA GK208 HDMI/DP Audio vendor: PNY driver: snd_hda_intel 
  v: kernel bus ID: 03:00.1 chip ID: 10de:0e0f 
  Sound Server: ALSA v: k5.4.0-104-generic 
Network:
  Device-1: Intel 82579LM Gigabit Network vendor: Dell driver: e1000e 
  v: 3.2.6-k port: f040 bus ID: 00:19.0 chip ID: 8086:1502 
  IF: eno1 state: down mac: <filter> 
  Device-2: Realtek RTL8188EUS 802.11n Wireless Network Adapter type: USB 
  driver: r8188eu bus ID: 2-1.7:6 chip ID: 0bda:8179 serial: <filter> 
  IF: wlx984827e0b6e8 state: up mac: <filter> 
  IF-ID-1: virbr0 state: down mac: <filter> 
  IF-ID-2: virbr0-nic state: down mac: <filter> 
Drives:
  Local Storage: total: 2.05 TiB used: 44.55 GiB (2.1%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 980 250GB size: 232.89 GiB 
  speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 1B4QFXO7 scheme: MBR 
  ID-2: /dev/sda vendor: Hitachi model: HDS721010CLA630 size: 931.51 GiB 
  speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> rev: A41A scheme: MBR 
  ID-3: /dev/sdb vendor: Seagate model: ST1000LM024 HN-M101MBB 
  size: 931.51 GiB speed: 3.0 Gb/s rotation: 5400 rpm serial: <filter> 
  rev: 0002 scheme: MBR 
  ID-4: /dev/sdc type: USB vendor: Generic model: USB Flash size: 7.50 GiB 
  serial: <filter> rev: 0.00 scheme: MBR 
Partition:
  ID-1: / size: 229.07 GiB used: 44.53 GiB (19.4%) fs: btrfs 
  dev: /dev/nvme0n1p1 
  ID-2: /home size: 229.07 GiB used: 44.53 GiB (19.4%) fs: btrfs 
  dev: /dev/nvme0n1p1 
  ID-3: swap-1 size: 3.81 GiB used: 0 KiB (0.0%) fs: swap 
  dev: /dev/nvme0n1p5 
Sensors:
  System Temperatures: cpu: 53.0 C mobo: 21.0 C sodimm: 26.0 C gpu: nouveau 
  temp: 34 C 
  Fan Speeds (RPM): cpu: 956 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list 
  1: deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://packages.linuxmint.com una main upstream import backport #id:linuxmint_main
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
  No active apt repos in: /etc/apt/sources.list.d/plexmediaserver.list 
  Active apt repos in: /etc/apt/sources.list.d/spotify.list 
  1: deb http://repository.spotify.com stable non-free
Info:
  Processes: 398 Uptime: 48m Memory: 7.72 GiB used: 2.36 GiB (30.5%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.4.0 alt: 9 Shell: bash 
  v: 5.0.17 running in: gnome-terminal inxi: 3.0.38 
The ports on the front of the computer where I keep the keyboard connected are mostly 2.0, but there is one 3.0.

I've tried switching to all the ports on the computer when this happens and I still see the issue, so it doesn't matter if it's 2.0 or 3.0 that it's connected to.

Thanks for the response, I was starting to think no one would say anything and I would just be stuck like this.
User avatar
SMG
Level 25
Level 25
Posts: 31815
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Keyboard not recognized after being disconnected

Post by SMG »

praxitilies wrote: Fri Apr 22, 2022 12:51 pmThis is the output I get when running that command in the terminal:
Please run the updates in Update Manager. The most recent kernel is 5.4.0-109.

System:
Kernel: 5.4.0-104-generic x86_64 bits: 64 compiler: gcc v: 9.3.0
Desktop: Cinnamon 5.2.7 wm: muffin 5.2.1 dm: LightDM 1.30.0
Distro: Linux Mint 20.3 Una base: Ubuntu 20.04 focal

Please also provide the output of lsusb and xinput when the keyboard is recognized. That will give us an idea of how the system is recognizing it.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
praxitilies
Level 1
Level 1
Posts: 10
Joined: Fri Mar 25, 2022 11:56 am

Re: Keyboard not recognized after being disconnected

Post by praxitilies »

Hi SMG,

This is the output for lsusb:

Code: Select all

Bus 002 Device 007: ID 03f0:0d17 HP, Inc LaserJet 1012
Bus 002 Device 006: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 002 Device 005: ID 1532:0037 Razer USA, Ltd 
Bus 002 Device 004: ID 413c:2113 Dell Computer Corp. 
Bus 002 Device 003: ID 048d:1177 Integrated Technology Express, Inc. 
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
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 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The Keyboard is Bus 002 Device 004

The xinput output is

Code: Select all

⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Dell KB216 Wired Keyboard Consumer Control	id=10	[slave  pointer  (2)]
⎜   ↳ Razer Razer DeathAdder 2013             	id=11	[slave  pointer  (2)]
⎜   ↳ Razer Razer DeathAdder 2013 Consumer Control	id=12	[slave  pointer  (2)]
⎜   ↳ PS/2 Generic Mouse                      	id=17	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Power Button                            	id=7	[slave  keyboard (3)]
    ↳ Dell KB216 Wired Keyboard               	id=8	[slave  keyboard (3)]
    ↳ Dell KB216 Wired Keyboard System Control	id=9	[slave  keyboard (3)]
    ↳ Razer Razer DeathAdder 2013 System Control	id=13	[slave  keyboard (3)]
    ↳ Razer Razer DeathAdder 2013 Keyboard    	id=14	[slave  keyboard (3)]
    ↳ Razer Razer DeathAdder 2013             	id=15	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=16	[slave  keyboard (3)]
    ↳ Dell KB216 Wired Keyboard Consumer Control	id=18	[slave  keyboard (3)]
    ↳ Razer Razer DeathAdder 2013 Consumer Control	id=19	[slave  keyboard (3)]
praxitilies
Level 1
Level 1
Posts: 10
Joined: Fri Mar 25, 2022 11:56 am

Re: Keyboard not recognized after being disconnected

Post by praxitilies »

As for the Kernel update, I'm not actually sure how to do that in my current configuration;

The motherboard does not recognize my PCIe NVMe drive as a bootable option, so when I installed Linux onto it, I had to place the bootloader on a separate USB stick.

So BIOS boots to the USB stick which runs GRUB & boots into the NVMe where Mint is installed.

However, when opening the GRUB menu at boot, it does not see the new kernels that I installed through the update manager within mint itself.

I know it's a very oddly specific configuration, but do you have any idea how I can get the updated kernel onto the USB stick?
praxitilies
Level 1
Level 1
Posts: 10
Joined: Fri Mar 25, 2022 11:56 am

Re: Keyboard not recognized after being disconnected

Post by praxitilies »

To clarify further, when I was first installing Mint I followed the instructions found here:

delightlylinux.wordpress.com/2017/12/21/system-boot-when-using-nvme/

So, when I was in the LiveUSB, I specified my NVMe as the root & swap, but I specified an 8gb usb stick as /boot, then specified the same stick as the bootloader.

Please let me know if this is something that will be a problem later or if I'm just missing something simple.
User avatar
SMG
Level 25
Level 25
Posts: 31815
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Keyboard not recognized after being disconnected

Post by SMG »

praxitilies wrote: Fri May 06, 2022 2:32 pmAs for the Kernel update, I'm not actually sure how to do that in my current configuration;
At some point your system did update because 5.4.0-104 is not a kernel on any Mint ISO. I believe the kernel on LM20.3 in 5.4.0-92 or so. I do not have any guesses at this point as to what might have changed that it stopped updating.

This problem with it updating may also be why what you described earlier is happening.
praxitilies wrote: Fri Mar 25, 2022 12:05 pmI've already tried changing my grub config with usbcore.autosuspend=-1, but when I run the command cat /sys/module/usbcore/parameters/autosuspend it still spits back 2 as the result.
praxitilies wrote: Fri May 06, 2022 2:46 pmSo, when I was in the LiveUSB, I specified my NVMe as the root & swap, but I specified an 8gb usb stick as /boot, then specified the same stick as the bootloader.
The data you posted does not quite match that description which may be why there is a problem.

There are three partitions shown, root, home, and swap. There is no boot partition listed. That may be why the kernel is not updating properly.

Code: Select all

Partition:
  ID-1: / size: 229.07 GiB used: 44.53 GiB (19.4%) fs: btrfs 
  dev: /dev/nvme0n1p1 
  ID-2: /home size: 229.07 GiB used: 44.53 GiB (19.4%) fs: btrfs 
  dev: /dev/nvme0n1p1 
  ID-3: swap-1 size: 3.81 GiB used: 0 KiB (0.0%) fs: swap 
  dev: /dev/nvme0n1p5 
These are the drives mounted by Linux Mint. Does sdc have the boot partition?

Code: Select all

Drives:
  Local Storage: total: 2.05 TiB used: 44.55 GiB (2.1%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 980 250GB size: 232.89 GiB 
  speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 1B4QFXO7 scheme: MBR 
  ID-2: /dev/sda vendor: Hitachi model: HDS721010CLA630 size: 931.51 GiB 
  speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> rev: A41A scheme: MBR 
  ID-3: /dev/sdb vendor: Seagate model: ST1000LM024 HN-M101MBB 
  size: 931.51 GiB speed: 3.0 Gb/s rotation: 5400 rpm serial: <filter> 
  rev: 0002 scheme: MBR 
  ID-4: /dev/sdc type: USB vendor: Generic model: USB Flash size: 7.50 GiB 
  serial: <filter> rev: 0.00 scheme: MBR 
What is the output of

Code: Select all

cat /etc/fstab
and

Code: Select all

sudo fdisk -l
Image
A woman typing on a laptop with LM20.3 Cinnamon.
praxitilies
Level 1
Level 1
Posts: 10
Joined: Fri Mar 25, 2022 11:56 am

Re: Keyboard not recognized after being disconnected

Post by praxitilies »

cat /etc/fstab:

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p1 during installation
UUID=acda1ea4-5232-4654-9703-d77a64c08510 /               btrfs   defaults,subvol=@ 0       1
# /boot was on /dev/sdb5 during installation
UUID=d4742507-9d5a-4e66-9df3-aeef423d4513 /boot           btrfs   defaults        0       2
# /home was on /dev/nvme0n1p1 during installation
UUID=acda1ea4-5232-4654-9703-d77a64c08510 /home           btrfs   defaults,subvol=@home 0       2
# swap was on /dev/nvme0n1p5 during installation
UUID=1f92c4ec-6d42-4315-8c4a-1c421288fb36 none            swap    sw              0       0
sudo fdisk -l:

Code: Select all

Disk /dev/nvme0n1: 232.91 GiB, 250059350016 bytes, 488397168 sectors
Disk model: Samsung SSD 980 250GB                   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 16384 bytes / 131072 bytes
Disklabel type: dos
Disk identifier: 0x55f68dee

Device         Boot     Start       End   Sectors   Size Id Type
/dev/nvme0n1p1           2048 480397311 480395264 229.1G 83 Linux
/dev/nvme0n1p2      480399358 488396799   7997442   3.8G  5 Extended
/dev/nvme0n1p5      480399360 488396799   7997440   3.8G 82 Linux swap / Solaris

Partition 2 does not start on physical sector boundary.


Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Hitachi HDS72101
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xfcb143b8

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sda1  *          2048     206847     204800  100M  7 HPFS/NTFS/exFAT
/dev/sda2           206848 1916961951 1916755104  914G  7 HPFS/NTFS/exFAT
/dev/sda3       1916962816 1918695423    1732608  846M 27 Hidden NTFS WinRE
/dev/sda4       1918695424 1953523119   34827696 16.6G  7 HPFS/NTFS/exFAT


Disk /dev/sdb: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LM024 HN-M
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x07f2837e

Device     Boot    Start        End    Sectors   Size Id Type
/dev/sdb1             63     208844     208782   102M de Dell Utility
/dev/sdb2  *      212992   41172991   40960000  19.5G  7 HPFS/NTFS/exFAT
/dev/sdb3       41172992 1953523119 1912350128 911.9G  7 HPFS/NTFS/exFAT


Disk /dev/sdc: 7.51 GiB, 8053063680 bytes, 15728640 sectors
Disk model: USB Flash Disk  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xdd58ab58

Device     Boot   Start      End Sectors  Size Id Type
/dev/sdc1  *       2048  7862271 7860224  3.8G 83 Linux
/dev/sdc2       7864318 15726591 7862274  3.8G  5 Extended
/dev/sdc5       7864320 15726591 7862272  3.8G 83 Linux
User avatar
SMG
Level 25
Level 25
Posts: 31815
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Keyboard not recognized after being disconnected

Post by SMG »

praxitilies wrote: Fri May 06, 2022 2:46 pmSo, when I was in the LiveUSB, I specified my NVMe as the root & swap, but I specified an 8gb usb stick as /boot, then specified the same stick as the bootloader.
I am not sure what happened, but /boot does not seem to be on your 8GB usb stick (sdc). It appears to be on your Seagate drive (sdb).

From fstab:

Code: Select all

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# /boot was on /dev/sdb5 during installation
UUID=d4742507-9d5a-4e66-9df3-aeef423d4513 /boot           btrfs   defaults        0       2
Normally, most people use ext4 for their installs so I am not that familiar with btrfs. That means I am not sure what partition 2 is on your nvme drive so I do not know if there is any concern about the message posted. (I'm guessing you used btrfs because you were copying what was done in the tutorial. That file system is not the default for a Linux Mint install.)

Code: Select all

Device         Boot     Start       End   Sectors   Size Id Type
/dev/nvme0n1p1           2048 480397311 480395264 229.1G 83 Linux
/dev/nvme0n1p2      480399358 488396799   7997442   3.8G  5 Extended
/dev/nvme0n1p5      480399360 488396799   7997440   3.8G 82 Linux swap / Solaris

Partition 2 does not start on physical sector boundary.
Oddly, even though fstab indicates the boot partition is on sdb5, there is no sdb5 listed in the output of fdisk. But perhaps that has something to do with the fact sdb seems to be a Windows drive. Normally, sdb5 would be part of the extended partition (although I would think it would still show in fdisk).

Code: Select all

Device     Boot    Start        End    Sectors   Size Id Type
/dev/sdb1             63     208844     208782   102M de Dell Utility
/dev/sdb2  *      212992   41172991   40960000  19.5G  7 HPFS/NTFS/exFAT
/dev/sdb3       41172992 1953523119 1912350128 911.9G  7 HPFS/NTFS/exFAT
Your system is booting so the boot partition for Linux must exists, but I have no guesses as to why it is not showing up or how to fix it. The sdb drive is just a little over 930GB and that is the total of what is showing in fdisk.

I do not know if there is an additional boot partition on the usb stick, but according to fstab that was not where it was placed during install and that might be why it is not showing up on your computer's inxi output.

Any ideas of what may have happened? Did you maybe try installing more than once?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
praxitilies
Level 1
Level 1
Posts: 10
Joined: Fri Mar 25, 2022 11:56 am

Re: Keyboard not recognized after being disconnected

Post by praxitilies »

I have no idea what could have caused that.

Is there a way to reinstall just the /boot partition & bootloader onto a fresh USB stick? I have plenty that can be formatted and used for this purpose without any issues.
User avatar
SMG
Level 25
Level 25
Posts: 31815
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Keyboard not recognized after being disconnected

Post by SMG »

praxitilies wrote: Sat May 21, 2022 12:55 amIs there a way to reinstall just the /boot partition & bootloader onto a fresh USB stick?
I suggest creating a new topic for that specific issue in the Installation & Boot section of the forum and reference this topic. There are others on the forum who have much more experience re-installing boot partitions than I have.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Locked

Return to “Hardware Support”