z3ntu / razer_test

An experimental replacement for OpenRazer
69 stars 10 forks source link

Device Support - Razer Goliathus Extended Chroma #15

Open mdrayner opened 4 years ago

mdrayner commented 4 years ago

Hello,

I have tested adding the Razer Goliathus Extended Chroma but am getting the following error: [info] razer_test (bringup util) - version 0.0.1 [info] Running in development mode and using development data files. [critical] Error calling IOCreatePlugInInterfaceForService. kr: -536870210 [info] ============================= [info] == razer_test bringup util == [info] == NEW DEVICE WIZARD == [info] ============================= [info] Product: Razer Goliathus Extended Chroma [info] VID: 1532 [info] PID: 0c02 [info] Do you want to bring up this new device? (y/N)

y 00000000 OK [critical] Failed to send report - device returned NOT_SUPPORTED [warning] Error during getBrightness() [warning] Error while initializing LED with ID '1' [warning] Failed to initialize device. 00000000 OK [critical] Failed to send report - device returned NOT_SUPPORTED [warning] Error during getBrightness() [warning] Error while initializing LED with ID '1' [warning] Failed to initialize device. 00000000 OK 00000000 OK 00000000 OK 00000000 OK 00000000 OK [critical] Failed to send report after 3 tries. [warning] Error during getBrightness() [warning] Error while initializing LED with ID '3' [warning] Failed to initialize device. 00000000 OK 00000000 OK [critical] Failed to send report - device returned NOT_SUPPORTED [warning] Error during setSpectrumInit() [warning] Error while initializing LED with ID '1' [warning] Failed to initialize device. 00000000 OK [critical] Failed to send report - device returned NOT_SUPPORTED [warning] Error during getLedState() [warning] Error while initializing LED with ID '1' [warning] Failed to initialize device. 00000000 OK [critical] Failed to send report - device returned NOT_SUPPORTED [warning] Error during getLedState() [warning] Error while initializing LED with ID '1' [warning] Failed to initialize device. 00000000 OK [critical] Failed to send report - device returned NOT_SUPPORTED [warning] Error during getLedState() [warning] Error while initializing LED with ID '1' [warning] Failed to initialize device. 00000000 OK [critical] Failed to send report - device returned NOT_SUPPORTED [warning] Error during getLedState() [warning] Error while initializing LED with ID '1' [warning] Failed to initialize device. [critical] Tried all quirks and pclasses and none worked. Exiting [critical] No device found. Exiting.

z3ntu commented 4 years ago

The bringup util currently relies on some quirks that the devices I own have but many other devices behave differently so the tool doesn't work correctly.

For getting your device to work you can try to check out the no_get_brightness branch and apply the following diff on top:

diff --git a/data/devices/mousepad.json b/data/devices/mousepad.json
index f252dc1..0085c38 100644
--- a/data/devices/mousepad.json
+++ b/data/devices/mousepad.json
@@ -10,5 +10,17 @@
         "features": ["custom_frame"],
         "quirks": ["firefly_custom_frame"],
         "matrix_dimensions": [1, 15]
+    },
+    {
+        "name": "Razer Goliathus Extended Chroma",
+        "vid": "1532",
+        "pid": "0c02",
+        "type": "mousepad",
+        "pclass": "matrix",
+        "leds": [0],
+        "fx": ["off", "static", "breathing", "breathing_dual", "breathing_random", "spectrum", "reactive", "brightness"],
+        "features": ["custom_frame"],
+        "quirks": ["extended_matrix"],
+        "matrix_dimensions": [1, 1]
     }
 ]
\ No newline at end of file

Don't forget to recompile after checking out the new branch :)

mdrayner commented 4 years ago

Thanks.. So if I try to re-compile with no_get_brightness and the above changes I get an error in the JSON validity test (0 isn't a valid value for "LEDs") I tried changing this to 1 which allows the compile but then when I try to run I still get an unsupported error:

[info] razer_test (bringup util) - version 0.0.1 [info] Running in development mode and using development data files. [critical] Error calling IOCreatePlugInInterfaceForService. kr: -536870210 [info] Initializing device: Razer Goliathus Extended Chroma (1532:0c02) 00000000 OK [critical] Failed to send report - device returned NOT_SUPPORTED [warning] Error during getBrightness() [warning] Error while initializing LED with ID '1' [critical] Failed to initialize leds, skipping device. [info] Initializing device: Razer Goliathus Extended Chroma (1532:0c02) 00000000 OK [critical] Failed to send report - device returned NOT_SUPPORTED [warning] Error during getBrightness() [warning] Error while initializing LED with ID '1' [critical] Failed to initialize leds, skipping device. [critical] No device found. Exiting.

mdrayner commented 4 years ago

Made a bit of progress and now have Razer Genie up and running and connected to the daemon (started using ./razer_test --devel so that it stays up instead of exiting after the failures). However, it is not detecting the device (obviously).... feels so close.

Also noted that if I run the commands without --devel it says that it cannot find the device JSON files. Do these need to be put somewhere particular to work or should it only run with that command?

Thanks for your help.

z3ntu commented 4 years ago

With --devel the daemon is looking at ../data/devices for the json files, otherwise into /usr/share/razer_test