-
Notifications
You must be signed in to change notification settings - Fork 179
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
G502 X (wired) not fully supported #952
Comments
I have the same issue and I've been doing some research. I did find this: #879 |
unfortunately there seems to be other issues with piper's support for the g502 x other than the 404 image - libratbag supports it fully, but piper does not i'm actually writing some documentation for how to program the mouse absent piper - if anyone is interested, let me know and i'll link it when it's done |
I'm definitely interested |
gotchya in my queue - i'll post when it's done, suffice to say that assigning buttons (all 11) to keyboard keys is easily doable with ratbagctl which is bundled with libratbag |
If anybody uses Nix, I got it to work by copying the derivation from nixpkgs and replacing the version with the commit mentioned in #873. Not sure if there's a better way, but it works.
|
thanks @MichaelCDormann for that - in my case i decided to bypass piper and utilize ratbagctl... |
Got a G502 X too! Waiting for an update to fix this mouse <3 |
Yep, piper issue... it doesn't remember which profile is active, it's as if the "profile list" page and the "button configuration" page aren't communicating fully. It gets confused deleting profiles, switching profiles, etc. It's very confusing behavior and I can't seem to make rhyme or reason to it yet. EDIT: And yeah I think I'd be happy with just scripting different profiles using ratbagctl but... God, it's a lot of work. |
Thanks for your review... is there documentation on scripting time delays and such into a key sequence when assigning with ratbagctl? For instance, something like:
Cheers. |
there is: |
Thanks much. |
Piper isn't working for my G502 X, but I believe that's because there hasn't been a release tag in over 2 years, please make a v0.8 tag so distos update their packages! |
You can pull straight from github and it's still busted. Better (at least it finds it and has a graphic), but busted. EDIT: You'll also want to pull straight from github libratbag, I believe. Not sure if there's a variance there, but just build those two together and you'll be up to date. |
I tried EDIT: |
This github has the latest code. I suggest you look at some docs on how to pull the latest code from these and built libratbag/piper yourself. AUR has nothing to do with this, AUR is your distro's package manager. Pre-packaged distribution packages are very convenient and usually reliable, but it is not guaranteed to have the latest code. You will learn much, have fun. |
I know how to compile from source and/or make/update a PKGBUILD, but I prefer not to use source packages if avoidable. I got Solaar to work which is good enough, if Piper gets an update I'll try it out. |
OK, again, the PKGBUILD system is specific to Arch and builds the code they have in their repository, which still won't be the latest. Has nothing to do with pulling down the current state of the code and building it yourself. But hey, if you can't be arsed, and Solaar is working for you, all's well that ends well. |
It's likely old ratbagd still running in the background, you can stop it with 'systemctl stop ratbagd' or restart your PC and it will work. |
@ShayBox - there is another issue that i think has bitten many people, including myself the doc for ratbagctl states that it writes to the active profile on the mouse by default, but that is not necessarily the case also so the 'trick' is to set another profile as active and then test if changes to it affect the currently active profile a potential solution i haven't really played with yet is to delete all but 1 profile and see what happens |
did a little playing around to try and nail this down... $ ratbagctl warbling-mara profile active get
2 # <-- wrong - profile 1 is the active one
$ ratbagctl warbling-mara profile 2 get
Profile 2: (disabled) (active) # <-- how can it be disabled and active?
$ ratbagctl warbling-mara profile active set 2 # <-- tested 2 and confirmed it was the wrong profile
$ ratbagctl warbling-mara profile active set 1
$ ratbagctl warbling-mara profile active get
1 # <-- now it picks up correct profile |
Did you ever finish this writeup? |
I'd like a comprehensive guide too. Although from my memory, even the command line tool has trouble keeping profiles straight, which are active, which changes are going into, etc. It's extremely laborious. If someone has it all figured out, it shouldn't be too difficult to write some wrapper script or something. I've given up on the thing and went back to my Corsair (ckb-next works well.) |
@DylanChuckry @mercster - i finished my little guide long ago - the link is earlier in this thread again, ratbagctl may not write to the selected profile on the mouse, but other than that it works ok - you may have to switch profiles after writing to see which one it wrote to - as i recall it write to the selected profile +1 |
Ahh yes, you're right, this is what I saw... it's not a full "guide" but enough to figure it out but.. yeah, the way it treated the current profile, active profile, it seemed to still jump back and forth and act in indeterminate ways. I appreciate your write up and I did start working at it, but honestly, in the end I just figured, I'll use mice that have better support and stick this in a drawer, maybe someday libratbag/piper/et al will be up to snuff. Thanks. |
ratbagctl supports the mouse fine, it's just a matter of figuring out which profile it writes too - i think if you activate the lowest profile (i forget if it's 0 or 1) before writing, then you can count on the next one in line as being the one it wrote to don't be afraid of the command-line stuff - once you figure it out, it's all very simple |
agreed!!! the lack of good documentation + lengthy commands + figuring out the key codes is a pain in the ass
negative, but i think it would be easy to write one along with a config file for storing profiles - can't say i'll do that, but i might :)
hmmm, that's weird - i haven't dis/re-connected to check that (a bit of a pain in my case) - you should be able to use |
@mercster - are you linux or windows? if the former, which DE? |
Not sure why I'd be here if I was in Windows :) ... but I run KDE. I ran GNOME 0.x -> 1.x -> 2.x until it got goofy. |
oh that's right, both piper and libratbag are linux only - i thought ratbag was x-platform if you run anything other than arch or a derivative thereof, let me know what OS you're using as well as the path and file name of the key code file (Manjaro, and i assume Arch, is /usr/include/linux/input-event-codes.h) i think i'll write that script which should make programming the mouse much easier anyone else can provide the same info if interested |
The event codes should be the same regardless of distro... what would be useful is a script that asked: "OK what input would you like [Mouse Key 3] to be?" And then depending on user input, you would translate that into the specific keycodes ratbagctl wanted. (To be fair even I wouldn't go that far, it'd require some doing.. of course this is what piper is for but, apparently none of those devs have a G502X for testing.) Oh and having a look back at your document, I see that "warbling-mara" is the "nickname" the driver gives the mouse. I was thinking a script would need to poll the device and include that nickname when calling the ratbagctl command to set things, but if you can just use 'Logitech G502 X' that'd be easier... the documentation says it wants that randomly generated signifier (looking at the source, there's a couple of arrays they use, why the device gets a new random one at each connect, including reboots, I have no idea. Maybe if you have more than one connected, which seems like it would be a real outlier.) At any rate, I haven't looked at it in a few months. |
the keycodes may be the same, but the path and file name isn't across OSs and i'm planning on grabbing that file so the user can easily figure out what the key names are, thus i would need to know the OS, path and file name or... if the keycodes are the same across OSs (EN vs non EN? i dunno), that would make it a lot easier, sans special keys like multimedia or keypad keys which not every board has and yes, 'Logitech G502 X' can be used instead - i just tested |
What do you mean 'grab that file'? I think they are the same across all languages (I see nothing in the source that indicates not... the source is in English so just start with that.) You could include the keycodes in your script, it'll be the same for everyone. Honestly, first what would be useful the most to everyone (I think) is to get the different profiles worked out... abstract the profile labels 1-2-3-4-5 for the user so they don't have to memorize whatever goofy order things get applied when a script is run. My other idea, since I couldn't figure out the way profiles were working, was just always use profile 1. This would necessitate someone running a script (whatever-application-mouse-profile.[sh|py]) every time they needed to switch profiles, but it's better than the alternative. Just ideas mind you, do whatever you think is best.
Netch on stackoverflow:
Not sure libratbag is taking any of that into account, I'd just target whatever your own locale is first.
That's useful then! In your document you use the randomized signifier, so I wasn't sure and was already thinking in my head how to solve that when I was looking at this a few months ago. |
Oh and every single Linux system in existence will have EDIT: Ok maybe not embedded systems, containers, etc. But most any desktop system. |
for all interested, i've got a bash script working that loads profile configs from ini files - it can also set the active profile and print device info i can't figure out is how to set the 'sniper' resolution - for ex., if button 4 is bound to 'resolution-alternate', how do you define what resolution is used while it's pressed? |
I think I saw these in the source somwhere for libratbag, I'd have to take a look. Sorry for late reply. |
there's instances of some stuff i tried...
|
Information
ratbagd
version (ratbagd --version
): 0.17uname -srmo
):Linux 6.7.7-1-MANJARO x86_64 GNU/Linux
Describe the bug
the newest iteration of the G502 X (wired) does not appear to be fully supported - this is the version with the optical switches and a larger 'D' shaped PTFE pad on the heel of the mouse (part no. 810-007900)
ratbagctl correctly lists all 11 buttons while piper lists only 8 - for example, there are no options to re-assign the G7/G8 (9 and 10) buttons - also the image for the mouse defaults to the 404 image rather than what is expected (piper was installed from the Arch repo)
`$ ratbagctl 'Logitech G502 X' info`
To Reproduce
install piper and notice missing buttons for the G502 X
Logs
skipping as i believe this is irreverent
Additional context
n/a
The text was updated successfully, but these errors were encountered: