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
error writing gestures feature #1318
Comments
Solaar tried to write some setting to the device but encountered an error because the setting value was invalid (error 2). The device feature is index 0x0F (first byte of request_data). To figure out what went wrong will require the name of the device that was involved and the output of |
Thanks for looking into this. I've forwarded your requests to the original submitter. |
Release 1.0.8 should be going out on a week or two, adding support for Bolt receivers. It would be nice to get more information about this bug to see whether it should be fixed before the release. |
It would, but don't hold the release for this. I've asked the original submitter and will reply here if/when they respond. |
PR #1319 prevents problems of this sort of error from interfering with other settings. Instead incorrect values are (mostly) ignored. This is better for the overall operation of Solaar but will likely result in any code bugs (as opposed to transient communications errors) not being noticed as quickly. |
Thanks. I'm not sure if we want to paper over (uncaught) code bugs, though. Now, having said that, I've got another independent report of this: bug 2022320. It's marked private for now but I asked the reporter to make it public and provide the same outputs ( |
I suspect that this is a new-to-Solaar device that implements a feature differently than Solaar expects. What will happen with this patch is that Solaar should be able to handle the rest of the device, while producing warnings for this setting. The UI should also show that Solaar is not able to push a value to the setting. |
I got a response from one of the reporters! Output of
and contents of
Hopefully it helps. |
If this information is for the second bug can you provide the backtrace for it? |
Yes, here's the backtrace from the second bug report:
|
Thanks. It appears that the two reports are for the same feature and thus the same bug. The feature is a complex one so debugging may require multiple interactions with the reporters. |
I took a closer look at the code. Soaar is trying to write a bunch of boolean values for gestures that the device implements and is somehow getting the wrong index to write the values to. This error could come from a number of places and does not occur with the device that I have that has gestures. It would be faster if one or both (both would be ideal as they appear to have different hardware) of the reporters could interact directly here as I expect that the debugging will require multiple steps. The first step would be to get the output of |
I've asked both users to respond here. |
Hi @pfps enclosed output from
|
Now that you mention index, there is a random (maybe once per week, maybe 3-4 times in a day) where the mouse stops responding and I see errors like these in the journal:
thx for looking at this Dylan |
@dylanswift Thanks for the quick response. This part of Solaar appears to be working fine - the interactions with the suspect feature (GESTURE 2) look correct. The next step is to try to change one of these gesture settings. This can be done via |
@dylanswift Your other problem could either be hardware or software. On the hardware side there is the possibility that the USB connection between your receiver and your computer is being interrupted, maybe due to some jostling of the receiver. On the software side it is possible that some other USB activity is causing some USB driver to hiccup. If you have an external USB hub and connect your receiver to that either problem is more likely, in my opinion. (I see some problems like this with an external USB hub I have - sometimes devices disappear and I can't reconnect them by unplugging and replugging. I don't know where the hardware or software problem is so I'm not sure how to report the problem.) |
@dylanswift By the way, the version of Solaar in this github repository has a patch that should improve Solaar for you. The patch doesn't fix the problem but instead ignores the error reported back by the device so that the rest of Solaar should work. You might consider downloading and running this patched Solaar. The patched Solaar will still report the error in its debugging output so you can still help debug the problem even if you install it. |
@pfps thanks for the input.
As for USB hub - yes I have one, but the performance is about the same regardless of whether I use the hub or a built in port |
Thanks. The relevant part of this output is at the very end
The last two lines show a valid write (the The weird thing is that this is almost the same code that caused the error previously. So the next thing is to run the Solaar GUI and capture its debugging output. This is done by quitting out of Solaar if it is running already and then running |
Hi @pfps sorry - I only just caught up with my messages. Here is the output from
|
So now Solaar is updatting that feature correctly as evidenced by:
Have you had any recent crashes from Solaar? |
One last thing to try is to try to change one of the gesture settings from the Solaar GUI. Start Solaar as |
Hi @pfps output as requested below:
|
Thanks. That's exhausted all the ways I think the initial crash could have been triggered, and all the writes look and work fine. The only thing left to do (and I probably should have done this earlier) is to ask whether you remember what was happening when you experienced the crash. Otherwise, I'll just have to close this issue as non-reproducible. |
@pfps Thanks, As far as I recall (and I just checked my journal) I had just been working as usual and was about to go on a teams call when the crash reporter fired up. Probably worth closing as non-reproducible then. thanks for your time looking into this. Regards Dylan |
OK. If you see the problem again, let me know the circumstances that it occurs under. |
I've just received another report from the other user who reported this issue on Fedora. He seems to have a GitHub account. |
The issue happens when I wake up the mouse to use it. I have to stop the power on the wireless mouse then it works fine.
|
Thanks for the quick response. It is helpful to find out just when the problem occurs. What percentage of the times the mouse wakes up does this happen? What is happening is that Solaar is re-applying the settings to the mouse after it wakes up. This needs to be done because most settings are not stored in persistent memory on the device and are forgotten when the device goes into power-saving mode. The setting that is being applied is the Gestures setting and somehow the settings are being written into an invalid place on the device. The odd thing is that as far as I can tell, this should be completely reproducible. If you could run Solaar as |
I think that this bug is caused by two threads setting up the structures for the Gestures setting, which ends up creating a data structure that causes Solaar to emit invalid commands. |
This bug happens when two threads both try to compute the internal structure for gestures at the same time. This should only have resulted in extra work and extra querying of the device but the gesture structure had a per-device counter so gestures ended up with the wrong offset. PR #1420 removes the shared counter and also locks computation of the gesture structure as well as computation of the settings structure and the keys structure. All three duplications of work have been seen in recent debugging output. |
solaar-2021-12-17_081255.txt |
Thanks. I see a few problems in rule evaluation. Are you running X11 or Wayland as the windowing system? If you use Gnome I think that you run Wayland. |
I am using Wayland on Fedora 35 64bit. The laptop is Lenovo ThinkPad T490s 20NYS7K90Z
|
@mircea-vutcovici To clone and use Solar from its GitHub repository
Run Solaar as bin/solaar from this directory. To run PR #1420, 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
|
I don't know if this is still relevant after the fix, but as requested in #1410 (comment), here's the output of Short:
Verbose:
|
@viniciusbm Thanks. It's a bit overtaken by events, but still useful. PR #1420 has been updated to the current version of Solaar and thus now includes the new Set rules. Please try it out and see whether gestures work OK. Try turning the gesture on and off via the GUI and also try via Set rules. The Set rule for gestures now takes '~' as a value for toggling a gesture setting. |
I tried it now and didn't encounter any problems. Using the GUI or a Set rule, the state of the toggle widgets and the gesture behaviour change appropriately. I used this rule: ---
- Feature: REPROG CONTROLS V4
- Report: 0
- Rule:
- Key: [Second Left Click, pressed]
- Execute: [notify-send, HI]
- Set: [null, fn-swap, '~']
- Set: [null, gesture2-gestures, Tap1Finger, true]
- Set: [null, gesture2-gestures, Tap2Finger, false]
- Set: [null, gesture2-gestures, Zoom2FingerStateless, '~']
- Execute: [notify-send, BYE] |
Excellent, thanks. |
Information
solaar --version
orgit describe --tags
if cloned from this repository):1.0.7
Fedora 35
uname -srmo
):5.14.14-300.fc35.x86_64
solaar show
:Describe the bug
A Fedora user reported getting an exception in solaar. No reproduction steps provided so far.
Truncated backtrace:
Local variables in innermost frame:
To Reproduce
Steps to reproduce the behavior:
N/A, I'll add them when the original reporter responds.
Additional context
Downstream bug report 2020706.
The text was updated successfully, but these errors were encountered: