-
Notifications
You must be signed in to change notification settings - Fork 421
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
MX Keys S Compatiblity (FeatureCallError When Trying to Change Backlight) #2210
Comments
Please run Solaar as |
I had pasted the output above which shows after changing, but here is the complete output:
|
It looks as if newer versions of this feature may be more picky about the commands to turn the backlight on and off. Please run some tests on the device to see how it operates. You need to download Solaar from this respository and run
and then the following inputs to try to turn the backlight on and off
You will see responses to these commmands as well as messages about other keyboard activity. My hope is that the last two inputs actually turn the backlight on and off. Post the result here. Here is what I see with my keyboard, which has backlight as the tenth feature so the interaction is slightly different. I ran hidconsole in a terminal emulator window and copied the inputs by highlighting them and then clicking my middle mouse button so the only keyboard activity is pressing the enter key.
|
The full log was helpful as it showed the precise commands that were sent to the device and the responses and also showed that a similar error occurred at Solaar startup. |
Thanks @pfps , unfortunately none of those commands turned the backlight on or off. Here is the output:
|
I tried to get the windows PR #2165 running on another windows machine to see if I could run the hidconsole and report the result of toggling the backlight in the logi options software, but the PR is pretty broken and I couldn't get it to work. If you know an easier way I can test what logi options is doing, let me know and I can try that. |
There are ways of snooping on device input in Windows but I don't use Windows at all so I don't know which of the various tools work well. One tool that is mentioned in several places is usbsnoop. See https://github.com/SnoopWare/usbsnoop. There is also https://freeusbanalyzer.com/ |
The you provided is showing errors on each of the four attempts, each error number 02, which is 'invalid argument'. I'll see if I can get more information about the implementation of the backlight (1982) feature on your device to see what might be going wrong. One thing to check on Windows is to see if your keyboard has something that might be considered to be a keymap customization, which is supposed to override this feature. |
Hey @pfps I tried that Free USB Analyzer and here are the raw packets when toggling the backlight option in Logi Options+ software.
Unfortunately when I tried them on linux with hidconsole it did not turn off the backlight, here is the output from that:
|
There was multiple USB devices in Windows and logging on some of them did not show the events from Logi Options but would show keyboard input events. I had another look at the Not sure if that is relevant. EDIT:
Running
|
I'll have to take a close look, but there are a lot of moving parts to set up input devices, and Bolt receivers are fairly new and may not be supported in Linux the same way that Lightspeed and Unifying receivers are, thus the difference between your two devices. In general, Linux sets up several devices for Unifying (and Bolt) receivers, which are identified by the second byte of messages to the receiver's hidraw node. But sending to the hidraw node for the device also sends messages through the receiver. |
I did use the same reciever, but when I installed Logi Options it asked me to repair the device so that may be why it's 02, but was still on the device 1 on the keyboard. I tried with 01 in hidconsole but still no backlight off:
Here are the uevent and report_descriptors: hidraw5 uevent and report_descriptor
hidraw3 uevent and report_descriptor
Bolt reciever lsusb
|
@pfps That gave me the following log for switching the backlight option off then on:
I've confirmed that the following packets work for toggling the backlight using hidconsole: |
I noticed the 'Swap Fx Function' toggle in Solaar also doesn't work but doesn't give an error/warning icon in the UI like the backlight toggle was. Disabling specific keys feature works though. I went through the Logi Options software and logged all the features USB calls using BusDog here: The files for relevant not working or not implemented features: Solaar features also not working: Solaar features not implemented: I'm not too fussed about the other features, toggling the backlight on/off is my main concern, but thought these may be useful if someone decides to implement in the future. |
It's still looking as if the Logitech software is setting some option on the keyboard that enables the brightness feature. Capturing interactions with the keyboard when it is first plugged in under Windows might show something. The second byte in the messages is the attachment number for the device. This is shown in I'm trying to get full documentation on the backlight feature but in case I don't can you try to find the minimum command that works by replacing non-zero bytes in the working commands you found by
Use the attachment number of the keyboard instead of |
I have an MX Keys for Business keyboard that looks very similar to your MX Keys S, except that it has a couple fewer features and older versions of some features. But it works find in Solaar. I'm still suspecting that there is some feature that needs to be modified on your keyboard before backlight changes are possible. |
None of these worked to turn it on, tried the same method with trying to turn it off and didn't work either. The only byte that seemed irrelevant is the FF byte, if I change that to 00 in either of the command it still works e.g.: Perhaps it's to do with the auto-brightness feature or setting the backlight duration? These weren't available on the previous MX Keys I believe, nor was the battery saving mode (disable backlight at 10%). |
This is the log when plugging it in:
|
Thanks. That showed some generic setup but nothing related to features on the keyboard. Can you see if there are communications when Logi Options is started? |
Opening Logi Options+:
Checking for firmware updates in Logi Options+:
|
Thanks. I can see the Logitech software querying and setting the backlight but nothing that helps figure out the problem that Solaar is encountering. I'm going to wait for a while to see if I can get newer documentation. In the end it might be necessary to write custom code for this newer version of backlight, which is very annoying as currently the setting is all done via a simple template. |
Ah yeah that's annoying, but understandable. Surely you could just extend the current template system somewhat? Either way, update here when you get the newer docs, I might be able to help out with a PR @pfps |
It looks as if the messages to change the backlight require first gathering some information. There is a template that might work but care has to be taken to ensure that the right messages are created for other devices that have the same feature. |
It certainly looks like messages to change the backlight need to first gather information about the backlight and add this information to the message to turn the backlight off and on. This is very annoying. |
PR #2230 tries to get around the bug in the MX Keys S. (At least the documentation for the feature says that the way Solaar was doing things should have worked.) Please try it out by downloading the PR and seeing whether Solaar can turn the backlight off and on. If it can't, run To clone and use Solar from its GitHub repository
Run Solaar as bin/solaar from this directory. To run PR #2230, 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:
To download a new version of the pull request, fetch it and then set your pull branch to the new fetch, as in:
|
Can confirm the backlight toggle in the Solaar UI now works. Excellent work, thank you. One note though, is it initially turned it on when it was already off, may be good to query the current state, but probably was due to my previous failed attempts in the UI being out of sync with the keyboard state, now that it's working I guess that shouldnt happen. Any chance of supporting the other backlight related settings? The off delay, setting the brightness level etc. |
What Solaar does is keep track of the state that it remembers for the device and reimpose this when Solaar starts up or the device connects. This is by design. Setting the delays and level should be possible. Stay tuned. Documentation of the feature is, as usual, a bit sparse. Have you tried to set the backlight under Windows? Can you set a backlight level in automatic or key-controlled mode? |
It can be set via the FN+F3/F4 keys, but there is also a slider in Logi Options to set the intensity, I don't believe thats available in automatic mode though. It would be nice to set the automatic timeout length, and also the backlight duration too. I provided logs for all these actions in one of my previous comments. |
The current version of the PR should support setting the delays and also levels. Give it a try and try out all the options for the backlight. If any of them don't work provide output of There are three modes - automatic, set by keys, and set by software. Solaar should allow all three plus completely off. I'm not sure what the automatic timeout length is, aside from the backlight duration. |
Hey @pfps Appreciate the work you've done on this a lot. There is a couple of issues with the PR though, will move discussion over there. |
The current version of the PR should fix the error when trying to change the backlight level in the UI. |
Information
solaar 1.1.10
uname -srmo
):Linux 6.5.13-6-MANJARO x86_64 GNU/Linux
solaar show
:~/.config/solaar/config.yaml
(or~/.config/solaar/config.json
if~/.config/solaar/config.yaml
not present):Describe the bug
Exception pasted above is thrown when trying to turn off the backlight on MX Keys S
To Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: