first. i want to say that my English isn't so good. ;)
I have a G510 the keyboard has an LCD screen and 18G keys. i want to use it on ubuntu. So I recompiled libg15 from the sourcecode, but i added one line in the DEVICES LIST So that my G510 would be recoginezed.
The line I have added is:
DEVICE("Logitech G510 Gaming Keyboard",0x46d,0xc22e, G15_LCD|G15_KEYS|G15_DEVICE_5BYTE_RETURN|G15_DEVICE_IS_SHARED),
it works very well, but there are a few problems it works only when I executed the daemon as root and a larger problem is that the keyboard stops working. So the LCD is working but I cant typ.
I hope that you can help me with this problem.
this is the message which the daemon gives when executed:
G15Daemon CMDLINE ARGS: -d
usb_set_debug: Setting debugging level to 1 (on)
usb_os_init: Found USB VFS at /dev/bus/usb
skipping descriptor 0x25
skipping descriptor 0x25
skipping descriptor 0x25
libg15: libg15 1.2.7
libg15: Found 1 supported devices
libg15: Trying to find Logitech G15
libg15: Logitech G15 not found
libg15: Trying to find Logitech G11
libg15: Logitech G11 not found
libg15: Trying to find Logitech Z-10
libg15: Logitech Z-10 not found
libg15: Trying to find Logitech G15 v2
libg15: Logitech G15 v2 not found
libg15: Trying to find Logitech G510 Gaming Keyboard
libg15: Found Logitech G510 Gaming Keyboard, trying to open it
libg15: Device has 1 possible configurations
libg15: Device has 1 Alternate Settings
libg15: Interface 0 has 1 Endpoints
libg15: Trying to detach driver currently attached: "usbhid"
libg15: Success, detached the driver
libg15: Found "Extra Keys" endpoint 1 with address 0x81 maxtransfersize=8
libg15: Device has 1 Alternate Settings
libg15: Interface 1 has 2 Endpoints
libg15: Trying to detach driver currently attached: "usbhid"
libg15: Success, detached the driver
libg15: Found "Extra Keys" endpoint 2 with address 0x82 maxtransfersize=8
libg15: Found "LCD" endpoint 3 with address 0x3 maxtransfersize=64
libg15: Done opening the keyboard
Booting plugin "Clock"
Plugin "Clock" boot successful.
Booting plugin "LCDServer"
Plugin "LCDServer" boot successful.
Booting plugin "Linux UINPUT Keyboard Output"
Plugin "Linux UINPUT Keyboard Output" boot successful.
I have the same problem. Have
I have the same problem. Have you found a solution?
Logitech G510 Media Keys support
G'day,
Posted a patch on SourceForge last week adding media keys support to the G510.
enjoy,
multitude
ps. Posted a notification here at the same time but it's disappeared in to moderatorland.
Hmm, I'll give g15macro a
Hmm, I'll give g15macro a try, although I am using xmodmap currently for what I believe will be the same thing. I was under the impression that the current G510 additions to the driver actually had disabled the multimedia keys because a problem with the way g15tools works (not sure exactly what, multitude said it in their post).
Preliminary G510 support
G'day all,
This is another attempt to get my G510 support patch posted without it being queued for moderation...
As mentioned in my earlier post, this patch provides custom LED colours (read color for US) and preliminary key support.
Unfortunately media keys are disabled at this time. There is a current limitation in the 'g15tools' implementation which prevents their use (as well as full G13 support). Also of note, the site's autoformatting is removing leading spaces in the patches.
After applying the patches, you may modify the following line in 'libg15.c' to taste:
setG510LEDColor(0, 255, 0);
enjoy,
multitude
Listing 1. Header. Apply with the command:
$ patch trunk/libg15/libg15.h patch-file.txt
-- start patch --
169a
int setG510LEDColor(unsigned char r, unsigned char g, unsigned char b);
.
37a
#define G510_STANDARD_KEYBOARD_INTERFACE 0x0
.
35a
#define G15_DEVICE_G510 32
.
-- end patch --
Listing 2. Source code. Apply with the command:
$ patch trunk/libg15/libg15.c patch-file.txt
-- start patch --
853a
// G510
if (buffer[0] == 0x03)
{
if (buffer[1]&0x01)
*pressed_keys |= G15_KEY_G1;
if (buffer[1]&0x02)
*pressed_keys |= G15_KEY_G2;
if (buffer[1]&0x04)
*pressed_keys |= G15_KEY_G3;
if (buffer[1]&0x08)
*pressed_keys |= G15_KEY_G4;
if (buffer[1]&0x10)
*pressed_keys |= G15_KEY_G5;
if (buffer[1]&0x20)
*pressed_keys |= G15_KEY_G6;
if (buffer[1]&0x40)
*pressed_keys |= G15_KEY_G7;
if (buffer[1]&0x80)
*pressed_keys |= G15_KEY_G8;
if (buffer[2]&0x01)
*pressed_keys |= G15_KEY_G9;
if (buffer[2]&0x02)
*pressed_keys |= G15_KEY_G10;
if (buffer[2]&0x04)
*pressed_keys |= G15_KEY_G11;
if (buffer[2]&0x08)
*pressed_keys |= G15_KEY_G12;
if (buffer[2]&0x10)
*pressed_keys |= G15_KEY_G13;
if (buffer[2]&0x20)
*pressed_keys |= G15_KEY_G14;
if (buffer[2]&0x40)
*pressed_keys |= G15_KEY_G15;
if (buffer[2]&0x80)
*pressed_keys |= G15_KEY_G16;
if (buffer[3]&0x01)
*pressed_keys |= G15_KEY_G17;
if (buffer[3]&0x02)
*pressed_keys |= G15_KEY_G18;
if (buffer[3]&0x10)
*pressed_keys |= G15_KEY_M1;
if (buffer[3]&0x20)
*pressed_keys |= G15_KEY_M2;
if (buffer[3]&0x40)
*pressed_keys |= G15_KEY_M3;
if (buffer[3]&0x80)
*pressed_keys |= G15_KEY_MR;
if (buffer[4]&0x1)
*pressed_keys |= G15_KEY_L1;
if (buffer[4]&0x2)
*pressed_keys |= G15_KEY_L2;
if (buffer[4]&0x4)
*pressed_keys |= G15_KEY_L3;
if (buffer[4]&0x8)
*pressed_keys |= G15_KEY_L4;
if (buffer[4]&0x10)
*pressed_keys |= G15_KEY_L5;
if (buffer[3]&0x8)
*pressed_keys |= G15_KEY_LIGHT;
}
.
600a
int setG510LEDColor(unsigned char r, unsigned char g, unsigned char b)
{
int retval = 0;
unsigned char usb_data[] = { 4, 0, 0, 0 };
usb_data[1] = r;
usb_data[2] = g;
usb_data[3] = b;
pthread_mutex_lock(&libusb_mutex);
retval = usb_control_msg(keyboard_device, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 9, 0x305, 1, (char*)usb_data, 4, 10000);
pthread_mutex_unlock(&libusb_mutex);
return retval;
}
.
540a
if(g15DeviceCapabilities()&G15_DEVICE_G510)
setG510LEDColor(0, 255, 0);
.
167a
if (g15DeviceCapabilities()&G15_DEVICE_G510){
if (i==G510_STANDARD_KEYBOARD_INTERFACE) continue;
}
.
50a
DEVICE("Logitech G510",0x46d,0xc22d,G15_LCD|G15_KEYS|G15_DEVICE_IS_SHARED|G15_DEVICE_G510), /* without audio activated */
DEVICE("Logitech G510",0x46d,0xc22e,G15_LCD|G15_KEYS|G15_DEVICE_IS_SHARED|G15_DEVICE_G510), /* with audio activated */
.
-- end patch --
Thanks
Now that the patch is up....
Thanks to 'craven' of the G13 Linux Driver (http://www.nexoid.at/g13/) for the source example of changing colour backlighting.
Thanks to 'robojan' for beginning this topic and detailing that the G510 at least had basic functionality under Linux.
And a big thanks to all those who've contributed to 'g15tools'.
cheers,
multitude
Thank too
Thank, it work nice for me.
I have just add a little change to g15_uinput.c in function g15_uinput_keydown and g15_uinput_keyup to add :
event.type = EV_SYN;
event.code = SYN_REPORT;
event.value = 0;
write (uinp_fd, &event, sizeof(event));
After the write, because it seem like uinput doesn't send the key else.
Cheers
Cheers Juluan!
It will be interesting to see if others need your 'g15_uinput.c' additions.
multitude
Yeah, it worked better after
Yeah, it worked better after the modification!
Thanks to both of you! :)
Preliminary G510 support
Hi all,
To those interested I posted a patch last week which provides LED colour changes and preliminary extra key support for the G510.
The site told me it was to be cleared by adminstrators/moderators but as yet hasn't appeared.
The extra key support is preliminary because the keyboard still sends function key codes along with the G keys. If anyone knows how to remedy this please post it here.
cheers,
multitude
Did you upload the patch to
Did you upload the patch to this forum or to the actual Patches tracker on sourceforge.net? Sourceforge does not, to my knowledge, have any limitations like this forum most likely does.
Please upload it there and I'll commit it to SVN if others can vouch that it does indeed work for them too.
As above
Hi SteelSide,
I posted the patch Tue, 12/28/2010 - 06:41, as above. Of note, leading spaces have been stripped by the site.
'Juluan' has confirmed it's working for them, though they had to make a modification to the 'uinput' code to get extra keys working which appears to be unrelated to the patch.
cheers,
multitude
Patch
Ah yes but did you upload it to sourceforge? I was unable to find any recent tickets in either of the 3 trackers there..
Could you upload your patch to this tracker https://sourceforge.net/tracker/?group_id=167869&atid=844658 please?
I do not believe it requires registration, but it's always good to have a sf.net account incase you don't already have one :)
I'll commit the uinput snippet asap and will commit your patch once I get it in a more usable state :p
Patch to SF
Patch uploaded to SF.
I'd also re-submitted it here uuencoded, but it's gone in to moderatorland.
enjoy,
multitude
Thanks, saw your patch and
Thanks, saw your patch and will apply it in the near future.
Any news on the current state
Any news on the current state of the driver? Not sure if what was done so far was ever applied (I just got the latest from subversion and it doesn't seem to be in there).
We're so close with this driver!
Riiiiight, forgot to do that!
Riiiiight, forgot to do that! svn up now and you're ready to go :)
Awesome thanks! As for the
Awesome thanks!
As for the driver itself, is there any news on how far along everything else is with it? Currently while the G-keys send a unique value, they also still send the F-key with it, and the multimedia controls are out of order as well.
No idea, guess you'll have to
No idea, guess you'll have to contact the people who have contributed for G510 support.
What are you missing by the way?
Are you running g15macro? It should set up the gkeys to only send one keycode and multimedia keys. You can also do this using xmodmap (see the manpage for g15daemon).
Well, after a little messing
Well, after a little messing around with it, I unfortunately cannot even get g15macro to run, I keep getting a buffer overflow right as it starts to run. I'll keep trying to get g15macro to work, but I want to make sure that it's actually going to do what I want it to do. From the previous post by SteelSide, he said that it was possible to use g15macro to actually send only one keycode from the G keys? I know that it's the driver still that is sending both the keycode from the G keys as well as the F keys (and some number keys as well).
I am already using xmodmap for a few things and wouldn't have anything against using it to execute a program with a combination of a G key and F key, unfortunately the keyscodes are sent in different orders each time the key is pressed so I'm not sure how that is going to effect it, although I'll give it a try.
Additionally, the multimedia keys were disabled in the most recent update of the driver and do not send any keycode when pressed - sorry I was a little ambiguous as to what I meant in my first post.
Maybe I'll spend some time messing around with it during break next week (like I originally planned over winter break, heh).
And after attempting to use a
And after attempting to use a combination of keys with xbindkeys, unfortunately it seems that not only are two keycodes sent, but occasionally the keys will get "stuck on" and keep sending the keycodes even while not being pressed. Has anyone else experienced this? It's pretty easy to test with Xev, just press the key a couple of times and see if Xev starts repeating itself over and over.
Yep, i confirm It worked for
Yep, i confirm
It worked for my G510 with and without audio (don't have test to switch)
My change to uinput was required to have key working.
I have other change for media keys that i will submit after a little code cleaning and testing.
But i also have F Keys send with the G Keys and no solution for the moment (and can't run g15daemon without skipping the standard keyboard)
But i approve this patch, it's a very good start to support the G510
Your uinput change
Are you running a recent version of g15daemon?I was pretty sure I had seen that uinput code before, but I figured I was wrong so I went to add it in, but saw that it was indeed already present :)In fact, it has been there for 11 months..
http://g15daemon.svn.sourceforge.net/viewvc/g15daemon?view=revision&revi...
Oh. I see that there was never any release afterwards. So SVN is probably a better alternative for everyone right now :p
I'll try to get a release out with all this applied.
Hi, I have checked and yes it
Hi,
I have checked and yes it is in my computer, on the g15daemon-wip folder...
And i'm working on g15daemon and libg15 on g15daemon svn.
And in this svn there isn't this change
Are you absolutely sure you
Are you absolutely sure you are inside the g15daemon-wip folder/you're working on a revision that is 527+?
Cause the file you mentioned (g15_uinput.c) belongs to the old g15daemon. In the -wip one it's named ./g15daemon-wip/plugins/g15_plugin_uinput.c.
I also did an svn diff for my tree, and it's all there, nothing is modified regarding this file, it's all in svn (latest revision, 535).
Whatever you're seeing should be consistent with what I am ;O
$ svn info
$ svn info g15_uinput.c
Chemin : g15_uinput.c
Nom : g15_uinput.c
URL : https://g15daemon.svn.sourceforge.net/svnroot/g15daemon/trunk/g15daemon/...
Racine du dépôt : https://g15daemon.svn.sourceforge.net/svnroot/g15daemon
UUID du dépôt : ab83d0d9-5618-0410-a047-8efd564e0644
Révision : 535
Type de nœud : fichier
Tâche programmée : normale
Auteur de la dernière modification : mlampard
Révision de la dernière modification : 348
Date de la dernière modification: 2007-12-20 06:10:36 +0100 (jeu. 20 déc. 2007)
Texte mis à jour: 2010-12-22 23:08:50 +0100 (mer. 22 déc. 2010)
Somme de contrôle : 1e4c9148f40a5dd205928d66a0127f0b
As i have said, i'm not working in wip folder.
And for G keys sending also F keys, i have found a solution !
Send a modifier with it, to send like Ctrl+F12.
But i don't know which one we can send without having trouble
Ah, but the thing is that the
Ah, but the thing is that the g15daemon you are working on is outdated, as you can see on the timestamps there. You probably want to be working on g15daemon-wip as that's what has been put to use for some years.
Patch
Hi,
great job!
Is it possible to get the code somewhere else as they doesn't seem to have commited it, could we maybe have a tar-ball or something? :)
/Spydon
Stop disconnecting your G510
For those experimenting with your G510 and having to physically disconnect and reconnect your keyboard all the time, you can restart your 'usbhid' module instead. Create a bash script with the contents below and have it within easy clicking distance:
#!/bash/bin
modprobe -r usbhid
modprobe usbhid
Of note, this will also restart any other 'usbhid' devices you have connected and you may need superuser privileges.
Have fun,
multitude
Me again, I just build a
Me again,
I just build a sample script who claim an usb interface, do a libus_interrupt_transfert and dump everything he got.
With a standard keyboard, it work fine, showing changes when i press key.
With the G510, it also work only one time and libusb_interrupt return -7 : LIBUSB_ERROR_TIMEOUT
More information : it need to be remove and plug to rework one time.
So it seem like the G510 wait for an ACK before continuing sending information.
And i'm stuck here, i don't know how find what to answer.
If anybody have an idea ?
More information : I have
More information :
I have added
DEVICE("Logitech G510",0x46d,0xc22d,G15_LCD|G15_KEYS|G15_DEVICE_5BYTE_RETURN|G15_DEVICE_IS_SHARED),
and
printf("Return : %d\n",ret);
printf("Data : %2X %2X %2X %2X %2X %2X\n",buffer[0],buffer[1],buffer[2],buffer[3],buffer[4]);
just after usb_interrupt_read.
And i got that :
libg15: Done opening the keyboard
g15daemon 1.2svn loaded
Return : -110
Data : 0 0 0 0 0 0
Return : -110
Data : C7 FA AA 7A 25 7AAAFAC7
[...]
Return : -110
Data : 1 0 7 0 0 7AAAFAC7
Return : -110
Data : 1 0 7 0 0 7AAAFAC7
Return : -110
Data : 1 0 7 0 0 7AAAFAC7
Return : -110
Data : 1 0 0 0 0 7AAAFAC7
Return : -110
Data : 1 0 0 0 0 7AAAFAC7
[...]
The C7 is alwais here, the following value are random.
When i press a key, it goes with 1,0,7,0,0 and with 1,0,0,0,0 when i release it
the 7 depent on the key pressed. For "s" it return 16.
As long as i keep the key pressed, i got this code and it work only once. after i need to close g15daemon, remove et plug the keyboard
But on the other side the LCD work fine with g15cat
Code correction
G'day,
Just a heads up that you've 5 parameters, but 6 %2X in your printf:
printf("Data : %2X %2X %2X %2X %2X %2X\n",buffer[0],buffer[1],buffer[2],buffer[3],buffer[4]);
Most likely describes the '7AAAFAC7' you're seeing.
Good luck,
multitude
The same
I have the same keyboard and the same issue.
my keyboard is the Logitech G510, ID 046d:c22d Logitech, Inc.
With svn g15daemon, no keyboard but lcd.
It appear that first "Extra Keys" detected are the whole keyboard+lcd key+G key+M key
The second Extra Keys are the right side of keyboard : media touch (pause,stop,rewind,forward,mute,volume) and keyboard light on/off
I'm running ubuntu too, but kde.
Without g15daemon, the "normal" keyboard work fine, media touch also.
And i'm also non-english.
G510 Hangs
Hi,
my g510 when launch g15daemon -d hangs.
I compiled and installed from source.
There is a way for debug to resolve the problem?
Thanks in advance.
Open Mind, Open Future, Open Source
wizardlinuxteam.altervista.org
Same thing happens to me
Hi,
same problem with my G510 :(
I tried changing the device options (deleting and adding combinations). Nothing.
Is it really so different from its predecessors?
Sorry for my english.
Regards.
Hopefully it's not too
Hopefully it's not too different. After my semester ends next week I plan on spending some time with this keyboard and seeing what I can figure out with it.
My goal is to get the thing working before the new year, so we'll see what happens. I'll make sure to post everything here that I come up with.