5

I am running Debian on a Lenovo Thinkpad X240. Some time ago I upgraded from Stretch to Buster. Since then the USB-Keyboard and the USB-Mouse don't work. I can't read or access any USB-Sticks either. The system is up to date and I've rebooted it several times.

The keyboard and the mouse are recognized (I see them when running lsusb), but running dmesg I get a Device is not authorized for usage message. I also get this message when plugin in any USB-memory.

> dmesg
[10599.977463] usb 2-2: new low-speed USB device number 10 using xhci_hcd  
[10600.134705] usb 2-2: New USB device found, idVendor=XXXX, idProduct=XXXX, bcdDevice= 1.07  
[10600.134709] usb 2-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0  
[10600.135024] usb 2-2: Device is not authorized for usage  

What should I do to continue troubleshooting and get the USBs working?

Gypaets
  • 407
  • 1
  • 4
  • 11
  • 5
    Check if your kernel defaults to not [authorizing](https://www.kernel.org/doc/Documentation/usb/authorization.txt) new USB devices (`grep . /sys/bus/usb/devices/usb*/authorized_default`). Also check if you have [USBGuard](https://usbguard.github.io/) installed. And read through a [related question](https://unix.stackexchange.com/questions/463881/usb-device-authorization-difference-between-interface-authorized-default-and-au). – Ferenc Wágner Aug 01 '19 at 21:35
  • @FerencWágner You're probably on point. How do I change the value? I edited the `sys/bus/usb/devices/usb[123]/authorized_default` files with an editor changing the value 0 to 1, but after rebooting the change was gone – Gypaets Aug 02 '19 at 18:26
  • The buster kernel defaults to 1 for wired USB, so something changes it on your system. Or do you use wireless USB? Isn't the _usbguard_ package installed by any chance (`apt-cache policy usbguard`)? – Ferenc Wágner Aug 02 '19 at 22:55
  • 1
    @FerencWágner No, usbguard was not installed. I have no idea what the reason was, but since there were other minor problems I've ended up doing a clean install of the system. Now everything works fine – Gypaets Aug 10 '19 at 06:40

1 Answers1

0

Probably you need udev rules to enable them. Something similar to here: https://github.com/LairdCP/UwTerminalX/wiki/Granting-non-root-USB-device-access-(Linux)

Update:

Try to make the following file: /etc/udev/rules.d/99-permissions.rules and inside add the following:

SUBSYSTEM=="usb",GROUP="users",MODE="0666"

Then run:

$ udevadm control --reload-rules && udevadm trigger

and restart your linux. This is from ubuntu 16.04, I am guessing the path is the same on debian buster. It worked on a configuration where I had to use some printer/scanner equipment.

Panagiotis
  • 189
  • 7
  • Thanks for the answer. I just checked and the problem applies to any usb, not only the mouse and keyboard. Do you know how to whitelist every usb - as it was before the update - instead of going one by one like in the link you provided? – Gypaets Jul 31 '19 at 19:27
  • Yes, I'll update my answer shortly – Panagiotis Jul 31 '19 at 19:33