Score:0

mouse and keyboard not working in Ubuntu 22.04

er flag

I'm running Ubuntu 22.04. I just got this box (HP Z220 Workstation) back from a student who was using it successfully. However, when I boot, my mouse and keyboard are not working at login.

The machine is on my network (wired), so I can ssh in. I see both devices in lsusb. I am able to boot to GRUB and go into recovery mode, so the keyboard is working. I have tried multiple ports and keyboards and mice.

Several pages have suggested doing updates/upgrades, including sudo apt-get install xserver-xorg-input-all and I have tried this, to no avail.

I'm at a loss of what to do next. I have reviewed these questions:

Per RonJohn's questions below, kb works in UEFI, but AFAIK there's no way to tell about the mouse. As I wrote, I've tried multiple kbs and mice, but here's what lsusb says right now:

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 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
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 0e6a:02c0 Megawin Technology Co., Ltd Defender Gaming Keyboard
Bus 003 Device 002: ID 17ef:602e Lenovo USB Optical Mouse
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

OK, figured it out... by uninstalling the desktop entirely, I was at the tty login prompt and I got error "USB Device Not Authorized for usage".

Turns out that usbguard was installed and configured to permanently autoblock any USB device that was hot-plugged after booting. I guess I connected the first KB and mouse after booting, and then I swapped other KB and mice while running.

Anyway, I don't need usbguard, so I uninstalled that and then just reinstalled Gnome.

RonJohn avatar
cn flag
What does `lsusb` say? Do the kb and mouse work in UEFI?
Joshua avatar
er flag
@RonJohn, couldn't fit everything here so I added it to the original question.
ar flag
Welcome to Ask Ubuntu. Always add the new information in your question when we ask you for clarifications. Best of luck!
RonJohn avatar
cn flag
"kb works in UEFI, but AFAIK there's no way to tell about the mouse." Mice work in Gigabyte's UEFI "bios" manager. Maybe they also work in Dell's.
RonJohn avatar
cn flag
It's apparent that Linux detects the "Lenovo USB Optical Mouse". What if you turn it off and turn it back on?
Joshua avatar
er flag
@RonJohn the issue was usbguard, which I didn't know about. Rebooting, even with the devices attached, didn't help. I really appreciate your help, though!
RonJohn avatar
cn flag
I should have known that schools (and businesses) implement something like that. Heck, my company-provided laptop can *only* write encrypted files to thumb drives.
Sachith Muhandiram avatar
cd flag
I am having the same issue, but I dont have `usbguard` installed. Any suggestion?
Joshua avatar
er flag
@SachithMuhandiram, sorry, wish I had. I am assuming that you already ran through the linked questions and tried what worked there.
Sachith Muhandiram avatar
cd flag
@Joshua Yes, none of them worked. My issue was with `tlp`. I stopped that service and now USB is working normal
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.