Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Razer DeathAdder V3. Wrong pooling rate after reboot. #2223

Open
VeilSilence opened this issue Mar 17, 2024 · 12 comments
Open

Razer DeathAdder V3. Wrong pooling rate after reboot. #2223

VeilSilence opened this issue Mar 17, 2024 · 12 comments
Labels

Comments

@VeilSilence
Copy link

Distribution

OS: Arch Linux x86_64
Kernel: 6.7.9-arch1-1
Openrazer-driver-dkms 3.7.0-1

Support

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

Issue

Greetings.
Got the problem with my DeathAdder V3. I installed openrazer-dkms, set plugdev group, rebooted, installed polychromatic app, plugged my mouse, set 8000Hz pooling rate.
Then I used sudo evhz app to verify that my mouse actually at, 8000Hz, which is correct.
After pc reboot, evhz report that my mouse stuck at 1000Hz pooling rate, when in polychromaticpolling rate set at 8000Hz.

What I tried to fix the issue

After fresh boot, I changed from 8000Hz pooling rate to 1000Hz in polychromatic.
At 8000Hz in polychromatic, evhz reports Latest 1000Hz, Average 856Hz. When I set to 1000Hz in polychromatic, evhz reports Latest 125Hz, Average 116Hz for example.
modprobe -r usbhid && modprobe usbhid does not fix this issue.
The only way I found to fix this issue, is unplug/replug my mouse. I tried to put in different usb ports -> reboot and verify my pooling rate. All usb ports behave the same. I also checked the logs, but i don't see anything suspicious. For me atleast.
In windows, all working as intended.

dmesg.razer.txt
dmesg.usb.txt
journalctl.razer.txt
ls.al.txt
lsmod.razer.txt

@VeilSilence
Copy link
Author

Update: 6.8.1 kernel fixed this issue for me.
modprobe -r xhci_pci && modprobe xhci-pci also can be used for "workaround".

@VeilSilence
Copy link
Author

VeilSilence commented Apr 4, 2024

The problem still persists.
I'll reopen the issue, so perhaps someone has an idea why it's happening. When I shut down the PC and then power it on, the polling rate is 8000Hz as expected. However, if I use systemctl reboot -i, the polling rate will be 1/8 of my settings until i replug mouse.

@VeilSilence VeilSilence reopened this Apr 4, 2024
@z3ntu
Copy link
Member

z3ntu commented Apr 4, 2024

Honestly sounds like the mouse firmware might be doing some weird things. But you could try to uninstall OpenRazer to see if it makes any difference, because I don't think OpenRazer is causing this at all.

@burd1
Copy link

burd1 commented Apr 5, 2024

#2122

@VeilSilence
Copy link
Author

VeilSilence commented Apr 5, 2024

Honestly sounds like the mouse firmware might be doing some weird things. But you could try to uninstall OpenRazer to see if it makes any difference, because I don't think OpenRazer is causing this at all.

Yea.. looks like mouse firmware bug for me also, because after "warm boot" this issue appear.

I checked #2122. After warm boot, cat /sys/bus/hid/drivers/razer*/*1532*/device_serial return same serial ( MyMouseSerial ) as it was before.
cat .config/openrazer/persistence.conf

[MyMouseSerial]
dpi_x = 3200
dpi_y = 3200
poll_rate = 8000

Looks same, but pooling rate 1/8.

I also moved from arch linux to NixOS, so i doubt reinstalling change something. Looks like i got faulty/unlucky mouse then..

@lah7
Copy link
Member

lah7 commented Apr 5, 2024

Out of curiosity, does the "USB reset" command cause (or correct) this firmware behaviour?

sudo usbreset 1532:00B2

(On Arch, usbreset is in the usbutils package)

@VeilSilence
Copy link
Author

VeilSilence commented Apr 5, 2024

Tried. Sadly, not helping me on this case.
I noticed something else. This "bug" affect windows also, but in strange way.

For example: i rebooted pc, then logged on NixOS. Tested my mouse -> saw that it's 1000Hz -> i replugged mouse. Now mouse at 8000Hz as should. I do "systemctl reboot -i".
In refind, i choose windows 11. I test my pooling rate on windows -> bugged! like on linux. Okay, i replug my mouse, did test again. 8000Hz.

After that, i pressed "reboot" in windows, but I choose windows 11 in refind for this time. Testing pooling rate and... it 8000Hz as should.

After i done with testing on windows, i press "reboot" on windows. I choose in refind NixOS boot, lauched kitty and typed "sudo evhz". Tested my mouse and... pooling rate at 8000Hz. In the end, i "systemctl reboot -i" -> boot NixOS and i got this bug again.

Something weird happening when i reboot my pc on Linux?

@lah7
Copy link
Member

lah7 commented Apr 6, 2024

Do you have Razer Synapse installed on the Windows side? Also, did you try uninstalling OpenRazer on NixOS?

I'd try isolating them to see if having both installed is the cause of the problem. Razer devices typically have a "normal" and "driver" mode.

When the device is plugged in, it'll be in "normal" mode, until [openrazer-daemon or Synapse service] puts it into "driver" mode. Maybe the mouse is still in "driver" mode across reboots? There is a sysfs file to find out. Could try stopping openrazer-daemon (and check device is in "normal" mode) before rebooting. Or, check if set_device_mode impacts the Hz test?

@VeilSilence
Copy link
Author

VeilSilence commented Apr 14, 2024

Sorry for the delayed response; I've had some troubles to attend to this week. Well, this problem is really weird.

Last week, I decided to try plug my mouse in "Headphone Stand" with three USB ports in it, which I rarely used. Plugged mouse -> rebooted, and everything worked as it should. The polling rate stayed at 8000Hz when I rebooted or switched between Windows and NixOS. After that, i was busy, so i couldn't test it thoroughly.

I returned home three days ago, and this bug hasn't occurred in these three days anymore. This evening, I decided to try plugging the mouse back into my first USB port, where this bug started happening... and again, everything is working. I tried four chain reboots in a row (NixOS -> reboot -> NixOS -> reboot -> NixOS). I also tried mixing between Windows -> reboot -> NixOS. Everything is working... for now.

And yes, I have Razer Synapse on Win 11.

I'll keep this bug open for now in case this occur again. Somehow, plugging mouse to usb hub ( Headphone Stand in my case ), fixed the issue?

@lah7
Copy link
Member

lah7 commented Apr 14, 2024

I'm not sure. I have the Base Station Chroma ("Headphone Stand") as well, which is just a regular USB 2.0 hub. Was your first port a USB 3.0 (blue one)?

@VeilSilence
Copy link
Author

I'm not sure. I have the Base Station Chroma ("Headphone Stand") as well, which is just a regular USB 2.0 hub. Was your first port a USB 3.0 (blue one)?

Yes, blue one.

Also i remember that when this pooling rate bug happens, in KDE -> Settings -> USB devices Razer Deathadder "USB version" was 1.1 or 1.0. Right now it shows USB 2.0 always and pooling rate correct.

@VeilSilence
Copy link
Author

After a month without any issues, this bug has reappeared.

NixOS update changed related to Python/Glib things, and OpenRazer stopped working. Without the OpenRazer daemon, my mouse was running at a 1000Hz polling rate, according to evhz

This error I got after update nixos system

openrazer-daemon -Fv
Traceback (most recent call last):
  File "/nix/store/s8vsc4p2cyqc2kim2cjvvl85d9fdz54x-python3.11-openrazer-daemon-3.8.0/bin/.openrazer-daemon-wrapped", line 13, in <module>
    from openrazer_daemon.daemon import RazerDaemon, __version__
  File "/nix/store/s8vsc4p2cyqc2kim2cjvvl85d9fdz54x-python3.11-openrazer-daemon-3.8.0/lib/python3.11/site-packages/openrazer_daemon/daemon.py", line 20, in <module>
    from gi.repository import GLib
  File "/nix/store/40cddha2iiqzbqd6dpal3rlrgvb4p0yc-python3.11-pygobject-3.48.2/lib/python3.11/site-packages/gi/importer.py", line 133, in create_module
    raise ImportError('cannot import name %s, '
ImportError: cannot import name GLib, introspection typelib not found

Anyway, I resolved python/Glib issue by myself, and openrazer-daemon/polychromatic working without errors now, but bug with pooling rate appear again.

While pooling rate bugged, I tried:
Checked that pooling rate is indeed set at, 8000hz:

cat /sys/bus/hid/drivers/razer*/*1532*/poll_rate
8000

cat /sys/bus/hid/drivers/razer*/*1532*/device_mode returned nothing.
echo -n -e "\x03\x00" > /sys/bus/hid/drivers/razer*/*1532*/device_mode had no effect on this bug. Maybe I'm doing this wrong? Tried also x00\00. No effect whatsoever.

echo -n "1000" > /sys/bus/hid/drivers/razer*/*1532*/poll_rate changed value to 1000, but mouse movement very sluggish and evhz report 125Hz.
Mouse USB speed reported was 12 Mbit/s while bugged. After replug 480Mbit/s.

Mouse replug once again fixed the issue for the current boot session. Note that mouse was connected for a month on back panel USB and worked correctly. I can try plug again mouse to "Headphone Stand" USB-Hub and see if it fix the issue again, but I will hold for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants