Closed pandiloko closed 3 years ago
Part of the delay in solaar show
is unavoidable - it is communicating with the device and that takes time. You could write a simple script to send a "report battery" command to your keyboard via the receiver. To see the command, run solaar show -dd
and look for the communication just before the report on BATTERY VOLTAGE. The voltage level is a 16-bit number in the response from the device, which is followed by a byte of flags. You will also see Solaar's interpretation of the message just after the response.
This is going to be specific to your keyboard and receiver.
What do you mean by "stop working"? Are you sure you don't mean the G keys? There may be a bug in the GKEY feature setting code in Solaar. Please attach the contents of ~/.config/solaar/config.json
I think the TKL version doesn't have any G keys. I really meant the F keys: F1 to F12. I noticed this since the last update. Before I only got information from the mouse but since the last update the keyboard also appeared in Solaar which I greatly appreciate, but then alt-F4 stopped working and I started digging to try and find the culprit.
Here the config.json:
{
"4067:FBD89093": {
"_modelId": "C08600000000",
"_name": "G903 Lightspeed Gaming Mouse",
"_sensitive": {
"dpi": false,
"report_rate": false
},
"_unitId": "FBD89093",
"dpi": 650,
"report_rate": 2
},
"408E:84A129A2": {
"_modelId": "B35F408EC343",
"_name": "G915 TKL LIGHTSPEED Wireless RGB Mechanical Gaming Keyboard",
"_unitId": "84A129A2",
"divert-keys": {
"209": 0,
"210": 0
},
"report_rate": 1
},
"_version": "1.0.5"
}
According to your output from solaar show
, your keyboard has the 0x8010 feature, which is a feature to change the behaviour of the "G" keys. When solaar show
runs it tries to set your keyboard to the state that Solaar remembers and that may be changing the behaviour of your keyboard. To check, please attach the output of solaar -dd show
.
By the way, the "G" keys act like Fn keys under normal circumstances. Your keyboard may have "G" keys but label them with 'F'. That would be silly, but ....
I don't find any reference in the user manual to G keys but there are indeed some labels for memory keys (M1, M2, M3, MR) under F1 to F4. Maybe the feature is not disabled when it should. Here the debug info:
Somehow your output has all the logging information first and the regular output afterwards. It is much easier to see what is going on if they are together.
sorry for that. I redirected with solaar -dd show 2>&1 | xclip
and it sorted the output that way. I edited my post after carefully marking it with the mouse directly from terminal ;)
Thanks. Those keys are definitely G keys, even though they are labeled with 'F'.
I have a guess as to what is happening, but it is going to take a while to confirm.
I took a look, and I don't see why the keys stop working. There are two things that might be causing the keys to stop working, but only if these features aren't working as they are supposed to.
To check, you'll have to clone the Solaar repository and run Solaar from there (as bin/solaar show
). You'll have to remove the bits of Solaar that might be causing the problems (but that's easy). What you need to do is to edit lib/logitech_receiver/settings_templates.py by commenting out two settings that Solaar uses.
The two lines are
_S(_REPORT_RATE, _F.REPORT_RATE, _feature_report_rate),
_S(_DIVERT_GKEYS, _F.GKEY, _feature_divert_gkeys),
Try commenting out (by putting a # at the beginning of the line) one, then the other, then both. See whether the F-keys work after running bin/solaar show
and then turn the keyboard off and on again to reset it for each setting. Report back your results.
OK, I tested as you asked and also observed that on top of the F-keys not responding, the backlit also goes off. Using the brightness key doesn't bring it back on. I found in the manual that some light presets are available pressing Brightness+1..9. That combination turns the backlit back on but with the builtin configurations. My custom setting comes back only after turning the keyboard off and on.
Anyway, the line causing the problem seems to be:
_S(_REPORT_RATE, _F.REPORT_RATE, _feature_report_rate),
Deleting only that line and executing ./bin/solaar show
keeps the F-keys working and the backlit on.
OK. What appears to be happening is that your keyboard is using profiles to control the F-keys and the backlight. To set the report rate, Solaar turns off profiles, which is what is causing the problem.
But what to do about this? Setting report rate is useful. I'll have to think about this.
For now you can get around your problem using your modified version of Solaar.
yes, thank you for your very quick reaction and thank you for this project.
In case some other user encounters this problem I wanted to add that the workaround is also possible with the installation from ppa (ppa:solaar-unifying/stable). Just comment the line in /usr/share/solaar/lib/logitech_receiver/settings_templates.py
and you are good to go.
Solaar has a tool (tools/hidconsole) to send messages to the device. You need to give it the Linux device name - /dev/hidrawN. To find out N do ls -l /sys/class/hidraw/
. You want the N that has the WPID of the device. The command to send is probably 10010703
(short command, device 1, feature 07, message 0, 3 to identify the return). The response should look like 11 01 070C 101100000... (11 for long response, device 1, feature 07, message 0, 3 to identify the response, then a 16-bit battery voltage). After that comes some flags.
I added a quirk that should stop setting host mode for your keyboard. This has the side-effect of not allowing you to change your reporting rate, but I can't figure out how to get reporting rate to work for your keyboard.
So, please run PR #1107 and test whether bin/solaar show
affects your function keys. Before testing, make sure that no version of Solaar is running and also remove your ~/.config/solaar/config.json file if it exists.
To download and work with Solar
git clone https://github.com/pwr-Solaar/Solaar.git
cd Solaar
Run Solaar as bin/solaar from this directory.
To run PR #1107, first clone Solaar if you have not already done so and cd to the clone directory. The first time you download the pull request, fetch it into a new branch and checkout that branch, as in:
git fetch origin pull/1107/head:pull_1107
git checkout pull_1107
To download a new version of the pull request, fetch it and then set your pull branch to the new fetch, as in:
git checkout pull_1107
git fetch origin pull/1107/head
git reset --hard FETCH_HEAD
It worked. No problems observed with PR #1107. I never bothered to change the reporting rate so this isn't a big issue for me but I get that others might use that and having to launch a VM to change settings is a real pain. It is also frustrating having to add one more exception for one specific device.
Information
uname -srmo
):Linux 5.8.0-44-generic x86_64 GNU/Linux
Output of
solaar show
:Lightspeed Receiver Device path : /dev/hidraw8 USB id : 046d:C539 Serial : 7EEC93AA Firmware : 39.04.B0036 Bootloader : 02.09 Other : AA.BE Has 1 paired device(s) out of a maximum of 1. Notifications: wireless, software present (0x000900) Device activity counters: (empty)
1: G903 Lightspeed Gaming Mouse Device path : /dev/hidraw9 WPID : 4067 Codename : G903 Kind : mouse Protocol : HID++ 4.2 Polling rate : 2 ms (500Hz) Serial number: FBD89093 Model ID: C08600000000 Unit ID: FBD89093 Firmware: MPM 07.00.B0009 Bootloader: BOT 55.00.B0009 Other: The power switch is located on the base. Supports 29 HID++ 2.0 features: 0: ROOT {0000}
1: FEATURE SET {0001}
2: DEVICE FW VERSION {0003}
Firmware: Firmware MPM 07.00.B0009 C086 Firmware: Bootloader BOT 55.00.B0009 AAD8 Firmware: Other
Unit ID: FBD89093 Model ID: C08600000000 Transport IDs: {'usbid': 'C086'} 3: DEVICE NAME {0005}
Name: Logitech G903 Wired/Wireless Gaming Mouse Kind: mouse 4: BATTERY VOLTAGE {1001}
Battery: 3837mV, discharging, average. 5: unknown:1863 {1863} internal, hidden 6: unknown:18A1 {18A1} internal, hidden 7: unknown:1E00 {1E00} hidden 8: unknown:1E20 {1E20}
9: unknown:1EB0 {1EB0} internal, hidden 10: ADJUSTABLE DPI {2201}
Sensitivity (DPI): 650 11: ANGLE SNAPPING {2230}
12: SURFACE TUNING {2240}
13: REPORT RATE {8060}
Polling Rate (ms): 2 Polling Rate (ms): 2 14: ONBOARD PROFILES {8100}
Device Mode: Host 15: MOUSE BUTTON SPY {8110}
16: unknown:1850 {1850} internal, hidden 17: DFUCONTROL SIGNED {00C2}
18: unknown:1801 {1801} internal, hidden 19: DEVICE RESET {1802} internal, hidden 20: unknown:1803 {1803} internal, hidden 21: OOBSTATE {1805} internal, hidden 22: unknown:1809 {1809}
23: unknown:1890 {1890} internal, hidden 24: unknown:1811 {1811} internal, hidden 25: LATENCY MONITORING {8111}
26: COLOR LED EFFECTS {8070}
27: LED CONTROL {1300}
28: unknown:1830 {1830} internal, hidden Battery: 3837mV, discharging, average.