You are not logged in.

#1 2012-05-15 22:17:53

edgley
Member
From: UK
Registered: 2011-07-06
Posts: 27
Website

[Solved] Xorg and keyboard LED's

Hi all,

Hopefully this is in the right section!

Recently I purchased a Corsair K60 gaming keyboard (needed a new one and decided to go with a mostly mechanical one, feels great as well!), and it works just fine in my Arch Install.

I mapped the few extra media keys and all is working well, except the LED's.

It has the bog standard caps lock, scroll lock and num lock LED's, however when I press any of the corresponding keys, the LED's don't work. So I did a bit of ducking (duckduckgo, for those that don't know) and found almost nothing other than an unanswered topic on the Ubunutu forums: http://ubuntuforums.org/showthread.php?t=1849193.

This prompted me to try on boot up, and they work. In fact, unlike in the Ubuntu topic, they work at the login screen and then afterwards as well. I tried starting the x server again, and switching to another terminal, and they work yet again. As soon as I switch back to x, they stop working. This issue didn't come up on my previous keyboard which was also USB (but didn't have a pass through USB port).

What might also be interesting is the keyboard has a "lock" button which has it's own LED and this works no problem.

Any help would be greatly appreciated!

Update!
Solution:

sudo kbd_mode -u

Last edited by edgley (2012-07-15 15:03:13)

Offline

#2 2012-05-16 12:20:47

slint
Member
Registered: 2009-05-22
Posts: 31

Re: [Solved] Xorg and keyboard LED's

Have you tried playing with

xset led

?

Offline

#3 2012-05-17 18:19:44

edgley
Member
From: UK
Registered: 2011-07-06
Posts: 27
Website

Re: [Solved] Xorg and keyboard LED's

Hi,

Thanks for the reply.

'xset led' and 'xset led 3' both turn the numlock LED on, all other numbers don't do anything. 'xset -led', as expected turns the num lock LED off.

Last edited by edgley (2012-05-17 18:20:11)

Offline

#4 2012-05-20 20:46:07

edgley
Member
From: UK
Registered: 2011-07-06
Posts: 27
Website

Re: [Solved] Xorg and keyboard LED's

Bump.

Still no luck, not find any viable answers on the web. A guy at work suggested that maybe the drivers loaded by udev aren't the standard keyboard drivers, but  I can only see the "kbd" driver loading, which as far as I can tell is the standard one? Is there another driver I can try?

Thanks.

Offline

#5 2012-05-21 13:12:05

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Xorg and keyboard LED's

some comments :

Do the keys function as expected even though the leds don't ?

If you remove/disable the mappings for the media keys, do the keys / leds work ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2012-05-22 17:50:23

edgley
Member
From: UK
Registered: 2011-07-06
Posts: 27
Website

Re: [Solved] Xorg and keyboard LED's

Hi Lone_Wolf,

Thanks for the reply.

Yep, the keys work exactly as expected. The media keys are only mapped in Openbox, but I removed them anyway and restarted X to no joy sad

Offline

#7 2012-05-22 22:40:08

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Xorg and keyboard LED's

Ok, so the keys are read correctly, it's the leds that don't work.
that suggests it's not the keyboard driver that is the problem.

we should now determine if it''s a hardware or software problem :

before linux starts , like in the grub boot screen, test if the capslock & scroll lock leds work.
If they don't, the problem is with the keyboard itself.

If they do work on the grub screen, boot to runlevel 3 (console)
test again if the leds work.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#8 2012-05-25 11:31:05

edgley
Member
From: UK
Registered: 2011-07-06
Posts: 27
Website

Re: [Solved] Xorg and keyboard LED's

Hi Lone_Wolf,

The LED's work all the way, right up until I start X. I can switch to a different terminal (CTRL+ALT+F1-6) and the LED's work, but as soon as I go back to X they stop working.

Last edited by edgley (2012-05-28 16:05:02)

Offline

#9 2012-05-26 12:30:25

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Xorg and keyboard LED's

ok, so the problem is software related.

Post your xorg0.log please .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#10 2012-05-28 16:04:44

edgley
Member
From: UK
Registered: 2011-07-06
Posts: 27
Website

Re: [Solved] Xorg and keyboard LED's

Hi Lone_Wolf,

Sorry I didn't get back to you earlier.

Here's my Xorg.0.log:
http://pastebin.com/Zcc2QpNj

Thank you!

Edit: Just wondering if the line 'Option "xkb_layout" "us"' might cause problems, as it's a UK keyboard...

Last edited by edgley (2012-05-28 17:45:40)

Offline

#11 2012-05-28 19:01:35

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Xorg and keyboard LED's

edgley wrote:

Hi Lone_Wolf,

Sorry I didn't get back to you earlier.

Here's my Xorg.0.log:
http://pastebin.com/Zcc2QpNj

Thank you!

Edit: Just wondering if the line 'Option "xkb_layout" "us"' might cause problems, as it's a UK keyboard...

That shouldn't influence the leds, although it may have other undesired effects.

It does seem X detects to many keyboards , i see 3 corsair devices :

[    73.264] (II) XINPUT: Adding extended input device "Corsair Components, Inc. Corsair Vengeance 1500" (type: KEYBOARD, id 8)

[    73.265] (II) XINPUT: Adding extended input device "Corsair Corsair Vengeance K60 Keyboard" (type: KEYBOARD, id 9)

[    73.267] (II) XINPUT: Adding extended input device "Corsair Corsair Vengeance M60 Mouse" (type: KEYBOARD, id 13)

Any idea what device the Corsair Vengeance 1500 is ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#12 2012-05-30 00:25:10

edgley
Member
From: UK
Registered: 2011-07-06
Posts: 27
Website

Re: [Solved] Xorg and keyboard LED's

Hi Lone_Wolf,

Yeah, I got the full Corsair desktop set. The 1500 is my headphones smile

Interesting that both the headphones and my mouse are coming up as keyboards as well. I tried unplugging both extra devices and restarting X, but it didn't help sad

Thanks!

Offline

#13 2012-05-30 13:40:38

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Xorg and keyboard LED's

one thing came to mind that's worth checking :

do you have xf86-input-keyboard installed ?

If so, try removing it.
If not, try installing it.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#14 2012-05-31 18:03:24

edgley
Member
From: UK
Registered: 2011-07-06
Posts: 27
Website

Re: [Solved] Xorg and keyboard LED's

Hi Lone_Wolf,

I had it installed so I removed it and stopped X and restarted, still nothing sad

Offline

#15 2012-06-04 10:10:50

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Xorg and keyboard LED's

well, atleast we figured out the problem is software related, and only occurs in X sessions.

Now to determine if the problem is WM/DE related or to X itself.

login to a console as root and run startx.
This will start a twm session, check if the leds do work there.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#16 2012-06-05 17:37:48

edgley
Member
From: UK
Registered: 2011-07-06
Posts: 27
Website

Re: [Solved] Xorg and keyboard LED's

Hi Lone_Wolf,

Thanks for your continued help!

Unfortunately, stating X as root still didn't resolve it sad twm still has the same issue.

Offline

#17 2012-06-05 18:56:18

ealrann
Member
Registered: 2012-03-22
Posts: 9

Re: [Solved] Xorg and keyboard LED's

Hi !

Same keyboard, same problem, no solution sad

Offline

#18 2012-06-06 11:21:53

edgley
Member
From: UK
Registered: 2011-07-06
Posts: 27
Website

Re: [Solved] Xorg and keyboard LED's

While it doesn't help any, it's good to know there are other people with the same issue smile

I also tried the keyboard on another, completely separate Arch box, but still no joy sad

Last edited by edgley (2012-06-06 11:23:05)

Offline

#19 2012-06-06 17:39:23

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: [Solved] Xorg and keyboard LED's

Offline

#20 2012-06-06 18:07:47

edgley
Member
From: UK
Registered: 2011-07-06
Posts: 27
Website

Re: [Solved] Xorg and keyboard LED's

Hi MoonSwan,

Unfortunately didn't help. Initially tried it from within X:

~$ setleds +num
KDGKBLED: Invalid argument
Error reading current flags setting. Maybe you are not on the console?

So I tried it in tty2, which worked and I could set all lights (and their function) on and off. Switching back to X, the LED(s) went out.

Interestingly, just noticed that if I set num lock, for example, in tty2 then go into X the num pad still works. If I turn it off in X then go back to tty2 the LED still comes on again as if the X control didn't set or change anything hardware wise, but the other way round it does.

Offline

#21 2012-06-07 09:09:18

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [Solved] Xorg and keyboard LED's

Try using the numlockx package from community repo to make sure numlock is ON for X11 when you start X.
(i have it in ~/.xinitrc )


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#22 2012-06-07 16:03:41

ealrann
Member
Registered: 2012-03-22
Posts: 9

Re: [Solved] Xorg and keyboard LED's

Thank you for all your answers smile

Unfortunately, numlockx doesn't change anything except the numlock led is always on sad    (I have it too in the .xinitrc)

Offline

#23 2012-06-07 18:30:26

edgley
Member
From: UK
Registered: 2011-07-06
Posts: 27
Website

Re: [Solved] Xorg and keyboard LED's

Hi Lone_Wolf,

Running from within X, the numlock LED comes on, but the button doesn't turn it off (but does turn of the functionality).

If I run 'numlockx toggle' to turn it on, then press the button I have to rerun the command twice to actually turn it off.

So, I'm now at the point where I can turn num lock and scroll lock on (it was actually scroll lock when I do 'xset led 3') from the command line.

I tried adding the command "numlockx" as an entry in my Openbox rc.xml config works, but "numlockx toggle" does not turn it on, but does turn it off for some reason.

I'm also not sure how I would add two different commands depending on the state of the scroll lock to be able to use xset. And finally still nothing for capslock sad

Again, thanks for all your help so far!

Offline

#24 2012-07-06 22:41:56

DHKold
Member
Registered: 2012-07-06
Posts: 1

Re: [Solved] Xorg and keyboard LED's

What's the kbd_mode? Is it in UTF8?

try kbd_mode -u

Offline

#25 2012-07-12 22:18:31

edgley
Member
From: UK
Registered: 2011-07-06
Posts: 27
Website

Re: [Solved] Xorg and keyboard LED's

Oh wow!

Thank you DHKold, running "sudo kbd_mode -u" has now fixed it smile

Is there anyway to run that without needing sudo or root access? Just so I can automate it.

Offline

Board footer

Powered by FluxBB