libratbag / libratbag

A DBus daemon to configure input devices, mainly high-end and gaming mice
MIT License
2.12k stars 258 forks source link

SteelSeries mice no longer detected since v0.16 (Rival 600, Sensei 310, etc) #1438

Closed dekart811 closed 1 year ago

dekart811 commented 1 year ago

Information

Device info:

$ ratbagctl list
No devices available.

Describe the bug The mouse isn't detected by ratbagctl, even tho libratbag seems to detect it and loads the proper driver.

Logs

$ 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: 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: 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
DBus server ready
$ lsusb
Bus 004 Device 002: ID 2109:0812 VIA Labs, Inc. VL812 Hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 005: ID 1038:1724 SteelSeries ApS SteelSeries Rival 600
Bus 002 Device 006: ID 24f0:0140 Metadot Das Keyboard 4
Bus 002 Device 004: ID 2109:2812 VIA Labs, Inc. VL812 Hub
Bus 002 Device 003: ID 0d8c:0134 C-Media Electronics, Inc. Auna Mic CM900
Bus 002 Device 002: ID 1235:8211 Focusrite-Novation Scarlett Solo (3rd Gen.)
Bus 002 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 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 1bcf:28c4 Sunplus Innovation Technology Inc. FHD Camera Microphone
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Additional context Obviously the mouse also doesn't show up in Piper.

staticssleever668 commented 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;
 }
dekart811 commented 1 year ago

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.
staticssleever668 commented 1 year ago

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?

dekart811 commented 1 year ago

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.

daxcore commented 1 year ago

same for me. the mouse worked in piper some days ago. so I guess a recent update broke the support.

staticssleever668 commented 1 year ago

@dekart811, hi again, would you be able to test another patch this time?

```diff diff --git a/src/driver-steelseries.c b/src/driver-steelseries.c index 487ab63..174a437 100644 --- a/src/driver-steelseries.c +++ b/src/driver-steelseries.c @@ -131,18 +131,27 @@ static int steelseries_test_hidraw(struct ratbag_device *device) { int device_version = ratbag_device_data_steelseries_get_device_version(device->data); + if (device_version == -1) { + 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. + * FIXME: we should either not ignore this or add another way + * of preventing showing duplicate devices. */ - if (!ratbag_hidraw_has_vendor_page(device)) - return false; + if (!ratbag_hidraw_has_vendor_page(device)) { + log_debug(device->ratbag, + "This is a non-vendor HID device, ignoring that instead of skipping\n"); + } - if (device_version > 1) - return ratbag_hidraw_has_report(device, STEELSERIES_REPORT_ID_1); - else - return true; + + if (device_version == 1) + return 1; + + return ratbag_hidraw_has_report(device, STEELSERIES_REPORT_ID_1); } static void @@ -306,14 +315,20 @@ 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 != 0) { + log_debug(device->ratbag, "Couldn't find hidraw device: '%s' (%d)\n", + strerror(-rc), rc); return rc; + } rc = ratbag_open_hidraw_index(device, STEELSERIES_INPUT_ENDPOINT, STEELSERIES_INPUT_HIDRAW); - if (rc) + if (rc != 0) { + log_debug(device->ratbag, "Couldn't open hidraw device: '%s' (%d)\n", + strerror(-rc), rc); return rc; + } device_version = ratbag_device_data_steelseries_get_device_version(device->data); if (device_version == -1) { @@ -410,7 +425,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; } diff --git a/src/libratbag-hidraw.c b/src/libratbag-hidraw.c index 781e326..52c2a44 100644 --- a/src/libratbag-hidraw.c +++ b/src/libratbag-hidraw.c @@ -1397,8 +1397,10 @@ ratbag_find_hidraw_node(struct ratbag_device *device, hid_udev = udev_device_get_parent_with_subsystem_devtype(device->udev_device, "hid", NULL); - if (!hid_udev) + if (!hid_udev) { + log_error(ratbag, "1\n"); return -ENODEV; + } if (use_usb_parent && device->ids.bustype == BUS_USB) { /* using the parent usb_device to match siblings */ @@ -1427,12 +1429,17 @@ ratbag_find_hidraw_node(struct ratbag_device *device, continue; rc = ratbag_open_hidraw_node(device, udev_device, hidraw_index); - if (rc) + if (rc) { + log_error(ratbag, + "ratbag_open_hidraw_node() failed: '%s' (%d)\n", + strerror(-rc), rc); goto skip; + } matched = match(device); rc = matched ? 0 : -ENODEV; + log_error(ratbag, "did match: %d\n", matched); if (matched == 1) return rc; ```

(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.

dekart811 commented 1 year ago
$ 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.

CounterPillow commented 1 year ago

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.

ziw-liu commented 1 year ago

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
staticssleever668 commented 1 year ago

Also applies to Rival 650 as seen in #1480.