openrazer icon indicating copy to clipboard operation
openrazer copied to clipboard

OpenRazer stopped working with recent update

Open Merung-Kelsith opened this issue 3 years ago • 15 comments

Distribution

Kubuntu 20.04 (fully updated) OpenRazer Daily PPA (fully updated) Polychromatic Testing PPA (fully updated)

Support

  • [ ] Have you tried rebooting? Yes
  • [ ] Have you looked at the Troubleshooting page? Yes

Up until about a week ago, my OpenRazer/Polychromatic installation was working with no issues. I have multiple Razer devices, and all (except Nari Ultimate and Kiyo) were working flawlessly. Now, I am getting "Unrecognized Device" for all of them.

I ran the "OpenRazer Troubleshooting" command through Polychromatic, and got the following:

  1. Check Secure Boot (EFI) Status - Failed: Secure Boot is enabled, but this has not been an issue before. Also, following the troubleshooting page, "sudo modprobe razerkbd" returns no output, which from what I am reading means the module is successfully loaded.
  2. Device can be accessed using plugdev permissions (Failed): My user is in the plugdev group, and "/usr/lib/udev/rules.d/99-razer.rules" exists (and from what I can tell looks correct). It is owned by root:root with permissions of 644. But it does not look like it is being run. The results of my "cat ~/.local/share/openrazer/logs/razer.log" is below:
2022-01-18 08:08:21 | razer                          | INFO     | Initialising Daemon (v3.2.0). Pid: 4494
2022-01-18 08:08:21 | razer.screensaver              | INFO     | Initialising DBus Screensaver Monitor
2022-01-18 08:08:21 | razer                          | INFO     | Found device.0: 0003:1532:0085.0005
2022-01-18 08:08:21 | razer                          | CRITICAL | Could not access /sys/devices/pci0000:00/0000:00:08.1/0000:07:00.3/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/0003:1532:0085.0005/device_type, file is not owned by plugdev
2022-01-18 08:08:21 | razer                          | INFO     | Found device.0: 0003:1532:024E.000A
2022-01-18 08:08:21 | razer                          | CRITICAL | Could not access /sys/devices/pci0000:00/0000:00:08.1/0000:07:00.3/usb1/1-1/1-1.1/1-1.1.4/1-1.1.4:1.2/0003:1532:024E.000A/device_type, file is not owned by plugdev
2022-01-18 08:08:21 | razer                          | INFO     | Found device.0: 0003:1532:0C04.0003
2022-01-18 08:08:21 | razer                          | CRITICAL | Could not access /sys/devices/pci0000:00/0000:00:08.1/0000:07:00.3/usb1/1-1/1-1.2/1-1.2:1.0/0003:1532:0C04.0003/device_type, file is not owned by plugdev
2022-01-18 08:08:21 | razer                          | INFO     | Found device.0: 0003:1532:0F08.000E
2022-01-18 08:08:21 | razer                          | CRITICAL | Could not access /sys/devices/pci0000:00/0000:00:08.1/0000:07:00.3/usb1/1-1/1-1.4/1-1.4.4/1-1.4.4:1.0/0003:1532:0F08.000E/device_type, file is not owned by plugdev
2022-01-18 08:08:21 | razer                          | INFO     | Serving DBus

The devices are owned by root:root still.

Any help would be very much appreciated!

Merung-Kelsith avatar Jan 18 '22 19:01 Merung-Kelsith

Known issue, you can unplug your device and back in and it should hopefully work. The udev rules have some kind of race condition I believe but never been able to track down what's exactly happening

z3ntu avatar Jan 18 '22 19:01 z3ntu

Do I have to re-plug them in individually? I have them all hanging off the same USB hub, and have tried unplugging / replugging that in...

Merung-Kelsith avatar Jan 18 '22 19:01 Merung-Kelsith

I just tried removing all of them, and plugging them in individually (restarting OpenRazer and Polychromatic after each device). Still getting the same error.

Merung-Kelsith avatar Jan 18 '22 19:01 Merung-Kelsith

One other thing I notice. In the udev rules, there is "99-systemd.rules" after "99-razer.rules". This file has the following lines that might affect the Razer products, but I am not sure:

# Pull in backlight save/restore for all backlight devices and
# keyboard backlights
SUBSYSTEM=="backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@backlight:$name.service"
SUBSYSTEM=="leds", KERNEL=="*kbd_backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@leds:$name.service"

Merung-Kelsith avatar Jan 18 '22 20:01 Merung-Kelsith

Nah we don't use the linux backlight/led subsystem so this shouldn't be an issue

z3ntu avatar Jan 18 '22 20:01 z3ntu

Hmmm. Was worth a shot :)

Tried the same steps plugging the USB hub into a different USB port on my laptop - same issue.

Tried plugging a single device directly into the port on my laptop (no USB hub, USB hub completely disconnected) - same issue.

Merung-Kelsith avatar Jan 18 '22 20:01 Merung-Kelsith

I'm not sure if this is the same issue, but I've been having issues since a recent update as well. Openrazer-daemon -Fv shows this:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/daemonize.py", line 245, in start
    self.action(*privileged_action_result)
  File "/usr/bin/openrazer-daemon", line 121, in run_daemon
    daemon = RazerDaemon(verbose=args.verbose,
  File "/usr/lib/python3/dist-packages/openrazer_daemon/daemon.py", line 107, in __init__
    self._load_devices(first_run=True)
  File "/usr/lib/python3/dist-packages/openrazer_daemon/daemon.py", line 409, in _load_devices
    razer_device = device_class(sys_path, device_number, self._config, testing=self._test_dir is not None, additional_interfaces=sorted(additional_interfaces))
  File "/usr/lib/python3/dist-packages/openrazer_daemon/hardware/device_base.py", line 489, in __init__
    super().__init__(device_path, device_number, config, testing, additional_interfaces, additional_methods)
  File "/usr/lib/python3/dist-packages/openrazer_daemon/hardware/device_base.py", line 452, in __init__
    super().__init__(device_path, device_number, config, testing, additional_interfaces, additional_methods)
  File "/usr/lib/python3/dist-packages/openrazer_daemon/hardware/device_base.py", line 84, in __init__
    DBusService.__init__(self, self.BUS_PATH, object_path)
  File "/usr/lib/python3/dist-packages/openrazer_daemon/dbus_services/service.py", line 87, in __init__
    super(DBusService, self).__init__(bus_object, object_path)
  File "/usr/lib/python3/dist-packages/dbus/service.py", line 459, in __init__
    validate_object_path(object_path)
ValueError: Invalid object path '/org/razer/device/': contains invalid character ''

Stopping daemon.

billf8004 avatar Mar 17 '22 15:03 billf8004

@billf8004 Does this happen every time or just sometimes? Also assuming you only have one Razer device, please run this and post the output hexdump -C /sys/bus/hid/drivers/razer*/0*/device_serial (not sure how this behaves if you have multiple devices connected)

z3ntu avatar Mar 17 '22 19:03 z3ntu

It happens every time. I have 3 devices, mouse, keyboard, and mousepad. It was working without issue until 3 months ago, give or take.

$ sudo hexdump -C /sys/bus/hid/drivers/razer*/0*/device_serial
00000000  01 0a 0a 0a                                       |....|
00000004

billf8004 avatar Mar 17 '22 20:03 billf8004

Yeah, that doesn't look like a correct serial number... It should be ASCII and not like these bytes

Did you do anything special to that device since it last worked? Firmware update in Windows or something?

z3ntu avatar Mar 26 '22 15:03 z3ntu

Nothing at all. Not even sure if you can on a linux box.

billf8004 avatar Mar 28 '22 16:03 billf8004

FYI, I just installed updates and rebooted (nothing related to the devices, python, or openrazer) and ran the hexdump again and got a different result:

$ sudo hexdump -C /sys/bus/hid/drivers/razer*/0*/device_serial 00000000 01 0a 0a 01 10 8c 0a |.......| 00000007

billf8004 avatar Mar 28 '22 16:03 billf8004

Can you check dmesg if there's any message from razermouse, razerkbd etc? I don't really understand why we're getting garbage data from the device...

z3ntu avatar Mar 28 '22 17:03 z3ntu

[ 997.295381] razer driver: Device data transfer failed. [ 997.295848] razerkbd: Response doesn't match request. Start Marker: 02 id: 3f Num Params: 02 Reserved: 00 Command: 04 Params: 00000000000000000000000000000000 . [ 997.297777] razer driver: Device data transfer failed. [ 997.298154] razermouse: Response doesn't match request. Start Marker: 02 id: 1f Num Params: 03 Reserved: 0f Command: 04 Params: 01108c00000000000000000000000000 . [ 1118.540847] razer driver: Device data transfer failed. [ 1118.541224] razeraccessory: Response doesn't match request. Start Marker: 02 id: 3f Num Params: 03 Reserved: 0f Command: 04 Params: 0100ff00000000000000000000000000

billf8004 avatar Mar 28 '22 17:03 billf8004

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 27 '22 03:07 github-actions[bot]

I also have this issue but i can not replug, because "the device" is my laptop... Rebooting does not fix anything either.

Weuxel avatar Dec 16 '22 12:12 Weuxel