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

Feature: Add support for Razer Naga V2 Pro (Wired + Wireless) #2113

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Caedis
Copy link

@Caedis Caedis commented Aug 14, 2023

Closes #1952

I have not tested the daemon as I prefer reading directly from sysfs (i just wanted the charging status and level)
Daemon + sysfs OK

  • charge_level and charge_status (data from wireless both show as 0 when charging, wired shows status/level)
  • dpi
  • matrix_brightness
  • matrix_* (but brightness)
  • logo_led_brightness
  • charge_effect - Error: Command not supported. status: 05 transaction_id.id: 1f remaining_packets: 00 protocol_type: 00 data_size: 01, command_class: 03, command_id.id: 10 Params: 01000000000000000000000000000000
  • charge_color - Error: Command timed out. status: 04 transaction_id.id: ff remaining_packets: 00 protocol_type: 00 data_size: 01, command_class: 03, command_id.id: 10 Params: 01000000000000000000000000000000. Command not supported. status: 05 transaction_id.id: 1f remaining_packets: 00 protocol_type: 00 data_size: 05, command_class: 03, command_id.id: 01 Params: 00030000000000000000000000000000 .
  • charge_low_threshold - Writing does not change value. Example: "\x10" should be 10, but stays at 12
  • device_idle_time
  • device_type
  • device_serial
  • Macros
  • Custom scroll wheel haptics (will require a lot of work)

Anyone else is free to make changes as I do not have much experience with C++ or Linux drivers.

@z3ntu
Copy link
Member

z3ntu commented Aug 14, 2023

I have not tested the daemon as I prefer reading directly from sysfs

Please at least briefly install a UI like polychromatic and RazerGenie and click through the options to see if they work correctly. I don't want to include broken stuff here, otherwise people will complain ;)

@Caedis
Copy link
Author

Caedis commented Aug 14, 2023

Can do

@Caedis
Copy link
Author

Caedis commented Aug 14, 2023

Couldnt get polychromatic to detect the backend with the daemon running for some reason.

Was able to read and write everything i have above via the dbus
image

@Caedis
Copy link
Author

Caedis commented Aug 14, 2023

Issue: Dbus handles wired and wireless versions as separate devices. Is that expected?

@z3ntu
Copy link
Member

z3ntu commented Aug 14, 2023

Wired and wireless versions being detected separately is expected, there's no concept to group them together in OpenRazer.

Also please check the CI failure and fix it.

@Caedis
Copy link
Author

Caedis commented Aug 14, 2023

Neat, it even checks the README.

@Caedis
Copy link
Author

Caedis commented Aug 14, 2023

Still need to inspect the traffic for non-static colors, effects, charge color, and charge effect.

@Ruscios
Copy link

Ruscios commented Aug 15, 2023

I attempted to build and install this version, and while successful, it did not recognize my Razer Naga V2 Pro. Mine shows up as 1532:00A4.

@Caedis
Copy link
Author

Caedis commented Aug 15, 2023

@Ruscios Are you using the dock?

@Caedis
Copy link
Author

Caedis commented Aug 15, 2023

and can you please post a screenshot of lsusb

@Ruscios
Copy link

Ruscios commented Aug 15, 2023

I thought that might be the case, yes I am using the dock. Do we know if the dock gives a unique USB identifier by what mouse it acts as the connection for, or if it is always 00A4?

Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 002: ID 26ce:01a2 ASRock LED Controller
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 002: ID 1532:0555 Razer USA, Ltd Razer BlackShark V2 Pro 2.4
Bus 005 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 002 Device 003: ID 0781:55a3 SanDisk Corp. SanDisk 3.2Gen1
Bus 002 Device 002: ID 0781:55ab SanDisk Corp. SanDisk 3.2Gen1
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 3434:0150 Keychron Keychron Q5
Bus 001 Device 007: ID 1532:00a4 Razer USA, Ltd Razer Mouse Dock Pro
Bus 001 Device 002: ID 3434:0131 Keychron Keychron Q0 Plus
Bus 001 Device 005: ID 8087:0032 Intel Corp. AX210 Bluetooth
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I'll try un-binding the mouse from the dock in Windows and then trying again with the dongle.

@Caedis
Copy link
Author

Caedis commented Aug 15, 2023

I believe so since the dock takes the place of the usb dongle and has its own endpoints

Do not know how it handles different mice connected to it

@Ruscios
Copy link

Ruscios commented Aug 15, 2023

Okay, tested with original dongle and PolyChromatic is able to configure the mouse. Only lighting effect I had trouble with was "Wave." Could be that what I saw was the intended behavior, but it seemed like the light was just doing some sort of strobe color rotation. Other than that, fully functional.

@Caedis
Copy link
Author

Caedis commented Aug 15, 2023

Thanks for checking!

Conflicts:
	install_files/udev/99-razer.rules
@z3ntu
Copy link
Member

z3ntu commented Sep 8, 2023

What's the status on this? Any progress on fixing the open issues?

@Caedis
Copy link
Author

Caedis commented Sep 8, 2023

@z3ntu I am at my limit for c++ knowledge as most of it was copy paste from the v1 naga pro.

It already has all the features I was wanting (really only just reading battery status) and I have been running it since with no issues.

@DjSapsan
Copy link

DjSapsan commented Nov 3, 2023

hello. Just bought the Naga V2 Pro (wireless) and followed all the instructions. Also the keyboard Razer Ornata V3.
Currently nothing show up in the RazerGenie GUI, but I wanna start with the mouse. Also old profiles seems to be broken.
Here is what the daemon logs show when I re-connect it:

2023-11-03 22:15:17 | razer                          | DEBUG    | Device event [unbind]: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:05:00.1/usb1/1-6/1-6.2/1-6.2:1.0/0003:1532:00A8.000B
2023-11-03 22:15:17 | razer                          | DEBUG    | Device event [remove]: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:05:00.1/usb1/1-6/1-6.2/1-6.2:1.0/0003:1532:00A8.000B
2023-11-03 22:15:17 | razer                          | DEBUG    | Device event [unbind]: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:05:00.1/usb1/1-6/1-6.2/1-6.2:1.1/0003:1532:00A8.000C
2023-11-03 22:15:17 | razer                          | DEBUG    | Device event [remove]: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:05:00.1/usb1/1-6/1-6.2/1-6.2:1.1/0003:1532:00A8.000C
2023-11-03 22:15:17 | razer                          | DEBUG    | Device event [unbind]: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:05:00.1/usb1/1-6/1-6.2/1-6.2:1.2/0003:1532:00A8.000D
2023-11-03 22:15:17 | razer                          | DEBUG    | Device event [remove]: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:05:00.1/usb1/1-6/1-6.2/1-6.2:1.2/0003:1532:00A8.000D
2023-11-03 22:15:29 | razer                          | DEBUG    | Device event [add]: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:05:00.1/usb1/1-6/1-6.3/1-6.3:1.0/0003:1532:00A8.0011
2023-11-03 22:15:29 | razer                          | DEBUG    | Device event [add]: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:05:00.1/usb1/1-6/1-6.3/1-6.3:1.1/0003:1532:00A8.0012
2023-11-03 22:15:29 | razer                          | DEBUG    | Device event [add]: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:05:00.1/usb1/1-6/1-6.3/1-6.3:1.2/0003:1532:00A8.0013
2023-11-03 22:15:29 | razer                          | DEBUG    | Device event [bind]: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:05:00.1/usb1/1-6/1-6.3/1-6.3:1.2/0003:1532:00A8.0013
2023-11-03 22:15:29 | razer                          | DEBUG    | Device event [bind]: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:05:00.1/usb1/1-6/1-6.3/1-6.3:1.1/0003:1532:00A8.0012
2023-11-03 22:15:29 | razer                          | DEBUG    | Device event [bind]: /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:05:00.1/usb1/1-6/1-6.3/1-6.3:1.0/0003:1532:00A8.0011

@DjSapsan
Copy link

DjSapsan commented Nov 3, 2023

hmm should I build from this src for myself now?

@z3ntu
Copy link
Member

z3ntu commented Nov 4, 2023

@DjSapsan Neither device is currently supported, for Ornata V3 it's likely #2053 (check lsusb | grep 1532) that it matches the device there.

If you'd build from this pull request from source (https://github.com/openrazer/openrazer/wiki/Building-a-package) then at least the Naga V2 Pro should work to some extent - you can read more about the state of this pull request in earlier comments.

@DjSapsan
Copy link

DjSapsan commented Nov 5, 2023

@z3ntu , I'm trying to build it, but everything appears to be configured for a different OS.
First, "/openrazer-driver-dkms.install/" targets files in the wrong location. I found files via search and fixed the path. But then I got a lot of errors with permissions/files not found/attr not found/file name too long etc.
I have Kubuntu 22.04. How can I reconfigure the build for my system?

@z3ntu
Copy link
Member

z3ntu commented Nov 6, 2023

Without you giving me more details, I can't help much. Maybe send the built .deb packages and build log? But it might be easier if you join the community chat to not spam this PR too much https://github.com/openrazer/openrazer/wiki/Community-chat

@gimmemabrewski
Copy link

I built from this repo and have the device (Naga Pro v2) showing up. The lighting options work. Did anyone figure out how to bind the mouse keys? I'm assuming this is something that has to be done at the kernel level? xinput does not detect the extra button input. Thanks

@z3ntu
Copy link
Member

z3ntu commented Mar 3, 2024

@gimmemabrewski Good that the lighting works fine. Do you also see the issues mentioned in the top-most post?

For the extra mouse keys, if they don't show up in e.g. libinput debug-events or with xinput then I'm assuming that either the device is currently in "device mode" where the mouse just doesn't emit the events; or it's in "driver mode" where the openrazer kernel driver would need some additions to handle the buttons correctly. As far as I can tell, we currently don't switch mice to driver mode at all in the daemon.

@gimmemabrewski
Copy link

@gimmemabrewski Good that the lighting works fine. Do you also see the issues mentioned in the top-most post?

For the extra mouse keys, if they don't show up in e.g. libinput debug-events or with xinput then I'm assuming that either the device is currently in "device mode" where the mouse just doesn't emit the events; or it's in "driver mode" where the openrazer kernel driver would need some additions to handle the buttons correctly. As far as I can tell, we currently don't switch mice to driver mode at all in the daemon.

I actually haven't noticed any issues. I can look into some of this stuff after work if it could help. I used a VM to set the mouse up in windows and since then everything seems to work, although I haven't tried macros. I just set my buttons to keyboard shortcuts and use linux options (kde in my case) from there. As far as the lighting goes, I turn that off anyway but the little I messed with it seemed to work.

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

Successfully merging this pull request may close these issues.

Support for Razer Naga V2 Pro
5 participants