New keyboard, need driver help

So, I recently got a logitech G510s and was having trouble launching G-hub – https://www.logitechg.com/en-us/innovation/g-hub.html
here is my error

usr_40476@localhost:~> wine /home/usr_40476/Downloads/lghub_installer.exe 
03a8:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION

Unhandled Exception:
System.DllNotFoundException: ntdll.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Interop+NtDll.NtQueryDirectoryFile(intptr,intptr,intptr,intptr,Interop/NtDll/IO_STATUS_BLOCK&,intptr,uint,Interop/NtDll/FILE_INFORMATION_CLASS,Interop/BOOLEAN,Interop/UNICODE_STRING*,Interop/BOOLEAN)
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].FindNextEntry () [0x0001c] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].MoveNext () [0x00032] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.Collections.Generic.LargeArrayBuilder`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] items) [0x0003d] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.Collections.Generic.EnumerableHelpers.ToArray[T] (System.Collections.Generic.IEnumerable`1[T] source) [0x00033] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.IO.MonoLinqHelper.ToArray[T] (System.Collections.Generic.IEnumerable`1[T] source) [0x00000] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00009] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern) [0x00007] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at Logi.Utils.deleteExistingGhubTempDirectories () [0x00005] in <c20ae83b5d594dc19ea92e94a53d7f63>:0 
  at Logi.Bootstrap.performPrerequisites () [0x00000] in <c20ae83b5d594dc19ea92e94a53d7f63>:0 
  at Logi.Bootstrap.Main () [0x00015] in <c20ae83b5d594dc19ea92e94a53d7f63>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: ntdll.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Interop+NtDll.NtQueryDirectoryFile(intptr,intptr,intptr,intptr,Interop/NtDll/IO_STATUS_BLOCK&,intptr,uint,Interop/NtDll/FILE_INFORMATION_CLASS,Interop/BOOLEAN,Interop/UNICODE_STRING*,Interop/BOOLEAN)
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].FindNextEntry () [0x0001c] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].MoveNext () [0x00032] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.Collections.Generic.LargeArrayBuilder`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] items) [0x0003d] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.Collections.Generic.EnumerableHelpers.ToArray[T] (System.Collections.Generic.IEnumerable`1[T] source) [0x00033] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.IO.MonoLinqHelper.ToArray[T] (System.Collections.Generic.IEnumerable`1[T] source) [0x00000] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00009] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern) [0x00007] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at Logi.Utils.deleteExistingGhubTempDirectories () [0x00005] in <c20ae83b5d594dc19ea92e94a53d7f63>:0 
  at Logi.Bootstrap.performPrerequisites () [0x00000] in <c20ae83b5d594dc19ea92e94a53d7f63>:0 
usr_40476@localhost:~> 

Does not work under wine:
https://www.google.com/search?q=logitech+g-hub+wine

crap. I just bought a keyboard, and now its as useful as my last one

You can try lutris:

It is recommended to do a base research before blowing some money :wink:

@40476 Install ratbagd (systemd service) and piper.

ratbagctl 
warbling-mara:       Logitech G203 LIGHTSYNC Gaming Mouse

Might need to add a device file for the G510…

do you know where i would get a file?

@40476 This is an example https://github.com/libratbag/libratbag/blob/master/data/devices/logitech-g513.device
I can branch/patch and add if you provide the device id from lsusb output

excerpt:

Bus 001 Device 007: ID 046d:c22d Logitech, Inc. G510 Gaming Keyboard

full text:

usr_40476@localhost:~> lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 1bcf:2b96 Sunplus Innovation Technology Inc. Integrated_Webcam_HD
Bus 001 Device 003: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 001 Device 004: ID 0424:2744 Microchip Technology, Inc. (formerly SMSC) Hub
Bus 001 Device 005: ID 0a5c:5832 Broadcom Corp. 5880
Bus 001 Device 006: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 001 Device 007: ID 046d:c22d Logitech, Inc. G510 Gaming Keyboard
Bus 001 Device 009: ID 0bda:4014 Realtek Semiconductor Corp. USB Audio
Bus 001 Device 010: ID 046d:0825 Logitech, Inc. Webcam C270
Bus 001 Device 011: ID 04d9:fc38 Holtek Semiconductor, Inc. Gaming Mouse [Redragon M602-RGB]
Bus 001 Device 012: ID 05ac:12ab Apple, Inc. iPad
Bus 001 Device 127: ID 0424:2807 Microchip Technology, Inc. (formerly SMSC) Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 011: ID 0424:5807 Microchip Technology, Inc. (formerly SMSC) Hub
Bus 002 Device 012: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
usr_40476@localhost:~> 

i made my own, will it work?

[Device]
Name=Logitech G510s
DeviceMatch=usb:046d:c22d
LedTypes=switches
Driver=hidpp20

@40476 you can only try… it lives in /usr/share/libratbag/

it did not work, did i get the driver field wrong?

@40476 Did you try a reboot?

Not yet, i will be back tommorow as i am currently at my cousins house and forgot my laptop, will get back to you tommrow :slight_smile:

I just tried a reboot,

GNU bash, version 5.2.21(1)-release (x86_64-suse-linux)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
usr_40476@localhost:~> sudo ratbagctl
[sudo] password for root: 
No devices available.
usr_40476@localhost:~> 

@40476 I would suggest creating an upstream issue to see if can be added? They have other ones, so it should be possible.

Oh you should not need to be root user for ratbagctl, run as your user.

do i need to be in/create a usergroup to make it work? That has been a thing i have had to do before.

GNU bash, version 5.2.21(1)-release (x86_64-suse-linux)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
usr_40476@localhost:~> sudo nano /usr/share/libratbag/logitech-g510s.device
[sudo] password for root: 
usr_40476@localhost:~> ratbagctl
No devices available.
usr_40476@localhost:~> 

also how would i get the gui?

libratbag-tools

Changelog
2023-05-11 - Matthias Bach marix@marix.org - 0.17 - Document the need for users of ratbagd to be a member of the group games (bsc#1210669) * In description of ratbagd package * In the new README.SUSE file of the ratbagd package. - Switch package to using %autosetup

https://bugzilla.opensuse.org/show_bug.cgi?id=1210669

@40476 Hmmm, don’t think you need to be part of a group. For a GUI, that is Piper (Only for Mice AFAIK), for that you need to be in the ‘games’ group.

So a device file is all that should be needed, so the driver may need some reverse engineering… See https://github.com/libratbag/libratbag?tab=readme-ov-file#adding-devices-to-libratbag

Sooooo, how would i get the driver?
I believe it is embedded some in G-hub or this other version on Logitech non-gaming website