Closed dekart811 closed 1 year ago
Would it be possible for you to build libratbag from source with a patch applied? Although it should only silently fail for unsupported devices, so I doubt we will be able to fix this. https://github.com/libratbag/libratbag#compiling-libratbag
The patch:
diff --git a/src/driver-steelseries.c b/src/driver-steelseries.c
index 8cf8106..665645c 100644
--- a/src/driver-steelseries.c
+++ b/src/driver-steelseries.c
@@ -131,18 +131,24 @@ static int
steelseries_test_hidraw(struct ratbag_device *device)
{
int device_version = ratbag_device_data_steelseries_get_device_version(device->data);
+ if (device_version) {
+ log_error(device->ratbag, "Device version must be specified\n");
+ return -EINVAL;
+ }
/* Rival mice are composite devices with multiple HID devices
* and only the HID vendor device can be used to configure the
* device.
*/
- if (!ratbag_hidraw_has_vendor_page(device))
- return false;
+ if (!ratbag_hidraw_has_vendor_page(device)) {
+ log_debug(device->ratbag, "Skipping wrong HID end-point\n");
+ return 0;
+ }
if (device_version > 1)
return ratbag_hidraw_has_report(device, STEELSERIES_REPORT_ID_1);
else
- return true;
+ return 1;
}
static void
@@ -306,14 +312,18 @@ steelseries_probe(struct ratbag_device *device)
unsigned int report_rates[] = { 125, 250, 500, 1000 };
rc = ratbag_find_hidraw(device, steelseries_test_hidraw);
- if (rc)
+ if (rc) {
+ log_debug(device->ratbag, "Couldn't find hidraw device\n");
return rc;
+ }
rc = ratbag_open_hidraw_index(device,
STEELSERIES_INPUT_ENDPOINT,
STEELSERIES_INPUT_HIDRAW);
- if (rc)
+ if (rc) {
+ log_debug(device->ratbag, "Couldn't open hidraw device\n");
return rc;
+ }
device_version = ratbag_device_data_steelseries_get_device_version(device->data);
if (device_version == -1) {
@@ -410,7 +420,12 @@ steelseries_probe(struct ratbag_device *device)
}
}
- steelseries_read_settings(device);
+ rc = steelseries_read_settings(device);
+ /* Some devices don't support reading settings, so ignore ENOTSUP. */
+ if (rc < 0 && rc != -ENOTSUP) {
+ log_error(device->ratbag, "Error reading device settings\n");
+ return rc;
+ }
return 0;
}
That doesn't seem to work either.
sudo ratbagd --verbose=raw
Initializing libratbag
ratbag debug: New device: Auna Mic CM900 Auna Mic CM900
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: No data file found for 0d8c:0134
ratbag debug: New device: Metadot - Das Keyboard Das Keyboard
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: No data file found for 24f0:0140
ratbag debug: New device: Metadot - Das Keyboard Das Keyboard
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: No data file found for 24f0:0140
ratbag debug: New device: SteelSeries SteelSeries Rival 600
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: device assigned driver steelseries
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw1'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw2'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw3'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: - HID report ID 01
ratbag debug: - HID report ID 02
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw1'.
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw2'.
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw3'.
ratbag debug: Couldn't open hidraw device
ratbag debug: New device: SteelSeries SteelSeries Rival 600
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: device assigned driver steelseries
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw1'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw2'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw3'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: - HID report ID 01
ratbag debug: - HID report ID 02
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw1'.
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw2'.
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw3'.
ratbag debug: Couldn't open hidraw device
ratbag debug: New device: SteelSeries SteelSeries Rival 600
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: device assigned driver steelseries
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw1'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw2'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw3'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: - HID report ID 01
ratbag debug: - HID report ID 02
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw1'.
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw2'.
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw3'.
ratbag debug: Couldn't open hidraw device
DBus server ready
$ ratbagctl list
No devices available.
Basically, the call to ratbag_open_hidraw_index() fails, and we can't do any communication with the mouse. Could you try if rivalcfg - another configuration made specifically for SteelSeries devices - works? Also, you were able to configure the mouse with official configuration utility, right?
First I didn't know about that tool, so thanks for pointing me to it.
rivalcfg --print-debug
RIVALCFG
========
Version: 4.8.0
udev rules installed: True
udev rules up to date: True
Installation path: /usr/lib/python3.10/site-packages/rivalcfg
OPERATING SYSTEM
================
OS: Linux
Platform: Linux-6.2.1-AMD-x86_64-with-glibc2.37
Version: #1 SMP PREEMPT_DYNAMIC Sat Feb 25 11:44:45 CET 2023
Distribution issue: Arch Linux \r (\l)
PYTHON
======
Python version: 3.10.9
HIDAPI version: 0.13.1
PLUGGED STEELSERIES DEVICES ENDPOINTS
=====================================
1038:1724 | 00 | SteelSeries Rival 600 (firmware v0)
1038:1724 | 01 | SteelSeries Rival 600 (firmware v0)
1038:1724 | 01 | SteelSeries Rival 600 (firmware v0)
1038:1724 | 02 | SteelSeries Rival 600 (firmware v0)
1038:1724 | 02 | SteelSeries Rival 600 (firmware v0)
As you can see rivalcfg
does properly detect the mouse and I was able to adjust the sensitivity by using rivalcfg -s 2000
. So it seems to me that the issue is somehow related to libratbag
.
same for me. the mouse worked in piper some days ago. so I guess a recent update broke the support.
@dekart811, hi again, would you be able to test another patch this time?
(one way to apply is, save the text into a file and run git-apply with path to it supplied, so if we name it steelseries-test0.diff
, we do git apply steelseries-test0.diff
)
This adds a bit more logging and reverts #1211. Not a fix, just to get more information and possibly work-around the problem.
$ sudo ratbagd --verbose=raw
Initializing libratbag
ratbag debug: New device: Auna Mic CM900 Auna Mic CM900
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: No data file found for 0d8c:0134
ratbag debug: New device: Metadot - Das Keyboard Das Keyboard
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: No data file found for 24f0:0140
ratbag debug: New device: Metadot - Das Keyboard Das Keyboard
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: No data file found for 24f0:0140
ratbag debug: New device: SteelSeries SteelSeries Rival 600
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: device assigned driver steelseries
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw1'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag error: did match: 0
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw2'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: This is a non-vendor HID device, ignoring that instead of skipping
ratbag error: did match: 0
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw3'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: - HID report ID 01
ratbag debug: - HID report ID 02
ratbag debug: This is a non-vendor HID device, ignoring that instead of skipping
ratbag error: did match: 1
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw1'.
ratbag debug: Parsing HID report descriptor
ratbag debug: - HID report ID 01
ratbag debug: - HID report ID 02
ratbag debug: Parsing HID report descriptor
ratbag debug: - HID report ID 01
ratbag debug: - HID report ID 02
ratbag error: did match: 1
ratbag raw: output report: 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ratbag raw: input report: 34 02
ratbag raw: output report: 00 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ratbag raw: input report: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ratbag debug: driver match found: SteelSeries
hidraw1: "SteelSeries SteelSeries Rival 600", 1 profiles
ratbag debug: New device: SteelSeries SteelSeries Rival 600
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: device assigned driver steelseries
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw1'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag error: did match: 0
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw2'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: This is a non-vendor HID device, ignoring that instead of skipping
ratbag error: did match: 0
ratbag error: ratbag_open_hidraw_node() failed: 'No such device' (-19)
ratbag debug: Couldn't find hidraw device: 'No such device' (-19)
ratbag debug: New device: SteelSeries SteelSeries Rival 600
ratbag debug: Using data directory '/usr/share/libratbag'
ratbag debug: device assigned driver steelseries
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw1'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag error: did match: 0
ratbag debug: hidraw info: bus 0x03 vendor 0x1038 product 0x1724
ratbag debug: SteelSeries SteelSeries Rival 600 is device '/dev/hidraw2'.
ratbag debug: Parsing HID report descriptor
ratbag debug: Parsing HID report descriptor
ratbag debug: This is a non-vendor HID device, ignoring that instead of skipping
ratbag error: did match: 0
ratbag error: ratbag_open_hidraw_node() failed: 'No such device' (-19)
ratbag debug: Couldn't find hidraw device: 'No such device' (-19)
DBus server ready
$ ratbagctl list
singing-gundi: SteelSeries SteelSeries Rival 600
As you can see the mouse is now being detected but it still doesn't seem to work properly.
I hope this data helps you to further investigate.
Since this is a regression from v0.16, I've decided to treat it like a regression and git bisect between the two releases.
$ git bisect good
9732aa009e0d638c40042dfb2592c09881d4c4c2 is the first bad commit
commit 9732aa009e0d638c40042dfb2592c09881d4c4c2
Author: Kristian Klausen <kristian@klausen.dk>
Date: Sun Oct 10 17:29:33 2021 +0200
steelseries: only use the HID vendor device
Rival mice are composite devices with multiple HID devices and only the
HID vendor device can be used to configure the device.
Tested with a SteelSeries Rival 300 (1038:1710).
Fix #888
src/driver-steelseries.c | 7 +++++++
src/libratbag-hidraw.c | 15 +++++++++++++++
src/libratbag-hidraw.h | 10 ++++++++++
3 files changed, 32 insertions(+)
@klausenbusk please fix, you broke my mouse.
Reverting the offending commit fixes it for me.
Edit: Oops, just noticed I'm basically just re-treading ground here and it's already known it was this commit that broke it.
Having the same issue here. I'm trying to add my device with this config:
[Device]
Name=SteelSeries Sensei Raw Optical V2
DeviceMatch=usb:1038:1826
Driver=steelseries
DeviceType=mouse
[Driver/steelseries]
DeviceVersion=1
Buttons=8
Leds=2
DpiRange=50:7200@50
MacroLength=1
@staticssleever668's second patch:
$ sudo builddir/ratbagctl.devel -v list
testdevice0: "Test device", 1 profiles
ratbag error: did match: 1
ratbag error: did match: 1
hidraw1: "SteelSeries SteelSeries Sensei Raw Optical RGB", 1 profiles
ratbag error: ratbag_open_hidraw_node() failed: 'No such device' (-19)
ratbag error: did match: 1
ratbag error: ratbag_open_hidraw_node() failed: 'No such device' (-19)
ratbag error: did match: 1
hidraw2: "SteelSeries SteelSeries Sensei Raw Optical RGB", 1 profiles
ratbag error: ratbag_open_hidraw_node() failed: 'No such device' (-19)
ratbag error: ratbag_open_hidraw_node() failed: 'No such device' (-19)
ratbag error: did match: 1
ratbag error: ratbag_open_hidraw_node() failed: 'No such device' (-19)
ratbag error: ratbag_open_hidraw_node() failed: 'No such device' (-19)
ratbag error: did match: 1
hidraw3: "SteelSeries SteelSeries Sensei Raw Optical RGB", 1 profiles
hollering-blesmol: SteelSeries SteelSeries Sensei Raw Optical RGB
yelling-marmot: SteelSeries SteelSeries Sensei Raw Optical RGB
honking-squirrel: SteelSeries SteelSeries Sensei Raw Optical RGB
whooping-hare: Test device
Also applies to Rival 650 as seen in #1480.
Information
ratbagd
version:0.17
Arch Linux
Linux 6.2.1-AMD x86_64 GNU/Linux
Device info:
Describe the bug The mouse isn't detected by
ratbagctl
, even tholibratbag
seems to detect it and loads the proper driver.Logs
Additional context Obviously the mouse also doesn't show up in Piper.