You are not logged in.

#1 2014-01-07 00:39:04

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

So I got a new Tesoro Durandal mechanical keyboard today.  The keyboard is nice, and I'd like to point out that both the numlock and caps lock work fine in a typing perspective.  But, pressing numlock and caps lock don't illuminate the corresponding indicators.  I was aware of the issue before I got the keyboard, but to my knowledge, the indicators work while I'm in BIOS.  So, that to me sounds like there is something linux is doing (or not doing) that prevents the keys from illuminating.  I haven't found anything under /sys/class/leds, and I've got way too many sub-folders under /sys/class/input to attempt to figure out if any of those work.

Does anybody know a way to "brute force" the numlock and caps lock LEDs to be on/off?

Last edited by schmidtbag (2014-01-12 18:54:16)

Offline

#2 2014-01-08 03:41:22

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

I wanted to point out, when shutting down the computer (but still while in linux), I am able to toggle the num lock and caps lock LEDs.  If I switch to another TTY, I am also able to toggle the locks along with the LEDs.  It seems to me there's something X related that's causing this issue.  I'm using KDE - anybody think that might have something to do with it?  This never happened with my old PS/2 keyboard.

EDIT:
I tried using "numlockx on" and "numlockx off", which actually seems to control the numlock LED.  But, I shouldn't have to configure a keyboard shortcut for that, and that doesn't solve the caps lock issue.

Last edited by schmidtbag (2014-01-08 03:49:49)

Offline

#3 2014-01-08 13:48:37

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

I've had the same issue with num lock and KDE a long time ago.
I had the bios setup to enable numlock at boot, and to my surprise found KDE/X did switch off the led upon start, but that did not change the console numlock status which was very confusing.

From what i remember the problem is that X/KDE  and linux console each have their own separate way of tracking numlock and other keys state.
they don't communicate changes with eachother, and even worse assume they're the only one that is able to change the status.

Basically you have 2 different num lock statuses (X & console) , and only 1 led .

Last edited by Lone_Wolf (2014-01-08 13:49:14)


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

#4 2014-01-08 15:37:42

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

Interesting, but why is it affecting this new keyboard but not my old PS/2 keyboard?

So, did you ever solve the issue yourself?  When I get home I can try toggling the BIOS feature and see if that makes a difference, but I'm open to any other suggestions.

Offline

#5 2014-01-08 16:41:36

vanquish
Member
Registered: 2013-12-28
Posts: 49

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

for me there are more then two options: console, xorg and wm (kde, gnome, etc.). wm option depends on wm itself (if fetching settings from xorg or manage the keyboard by its own).
https://wiki.archlinux.org/index.php/Ac … _on_Bootup

Offline

#6 2014-01-08 16:52:26

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

Well, I'm not having issues USING numlock or capslock - they both function fine, whether I'm in CLI or GUI.  Numlock is on by default, and the LED for it is illuminated.  The issue is that when I press the keys, the LEDs don't change, and to my knowledge, that guide you showed me is not going to fix that part of the problem. It also won't fix caps lock.

So for example right now when I boot up the computer, numlock is set to "on", along with the LED. If I open kwrite, I can type numbers using the number pad.  Then when I go to press numlock, the LED is still on but I can't type numbers anymore.  Press it again, the LED is still on, and I can type numbers again.  Caps lock works the same way, except it is off by default (as well as the LED).

Offline

#7 2014-01-08 18:06:12

vanquish
Member
Registered: 2013-12-28
Posts: 49

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

then i would say the keyboard (hardware) and/or driver are the problem. and if i look for this gaming keyboard and its harware connectors (usb, audio) i would bet on a hardware related problem. ... and if i look further on google i read this:

Does Max Keyboard Nighthawk X7, X8, X9 compatible with Mac OS and Linux operating system?

During our development stage, we had tested our Nighthawk series keyboard with Mac OS X and a few different types of Linux based operating system. Most functionality on the keyboard will work with Mac OS X and Linux based operating system. However, CAPS LOCK and NUM LOCK indicator LED will not lit up on these operating system (Functionality is there, but just not these LED’s indicator).

It is normal to see if your top right indicator LED does not lit up when you are using Nighthawk backlit mechanical keyboard on these above operating systems.

Note: We have had user reported a Linux HID driver will solved the issue. (We have no knowledge on what kind of driver was being used.)

Our Nighthawk backlit mechanical keyboard is designed based on Windows operating system and it is 100% compatible using it on Windows XP, Windows Vista, Windows 7 and Windows 8.

http://blog.maxkeyboard.com/faqs/

hmm

Offline

#8 2014-01-08 23:55:26

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

I appreciate your effort vanquish, but you seem to have a knack for not completely reading everything.  In that same quote you showed, you'll see that it says the Linux HID driver solves that issue.  As I said earlier, the numlock and capslock LEDs illuminate when I'm in the CLI.  I'm still in linux, so it isn't a driver problem, and obviously not a hardware problem either.  It's either an X or a KDE problem.  That being said, this problem seems to be just coincidental with this particular keyboard.  Unfortunately, this is the only wired USB keyboard I have so its hard to prove if this is just coincidence - I have 5 other keyboards I can use but none of them are wired USB.  Anyway, the real underlying issue is WHY does X/KDE affect the LED, and how do I prevent the problem from continuing.

Also as something I mentioned before - while in the GUI, I can use numlockx and turn the numlock LED on and off.  Something else is forcing the LEDs to stay where they are.

EDIT:
I wanted to point out that I tried plugging the keyboard into a laptop I own that runs XFCE.  Same issue - LEDs do not toggle (but the locks will) but they work fine in the CLI.  So, this seems to be explicitly an X related issue.

Last edited by schmidtbag (2014-01-09 00:04:33)

Offline

#9 2014-01-09 00:16:55

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

Xorg uses an evdev keyboard driver, the console does not. I don't know why the evdev driver has those problems. You are not the only one: https://www.google.com/search?q=evdev+keyboard+led


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#10 2014-01-09 00:39:02

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

progandy wrote:

Xorg uses an evdev keyboard driver, the console does not. I don't know why the evdev driver has those problems. You are not the only one: https://www.google.com/search?q=evdev+keyboard+led

Hmm that's interesting.  Though, how exactly does X use a different keyboard driver?  AFAIK, X still runs on top of the CLI, so you'd think it would inherit the same drivers.  But, I don't know a whole lot about how that stuff works in the background.

Looking more in-depth with those search results, it seems to be mostly a multi-seat issue.  I don't do multiseat, but, since I do have a PS/2 connector, maybe the computer thinks there are 2 available keyboards.  Think that could be a cause of the issue?

Offline

#11 2014-01-09 11:30:39

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

schmidtbag wrote:

Interesting, but why is it affecting this new keyboard but not my old PS/2 keyboard?

So, did you ever solve the issue yourself?  When I get home I can try toggling the BIOS feature and see if that makes a difference, but I'm open to any other suggestions.

I partially solved it.
I use "numlockx on &"  in ~/.xinitrc so X does start with the correct setting for numlock.

Selecting the right keyboard driver in KDE (keyboard was a logitech with multimedia keys) did make the leds change status correctly, but console and X still had their own independent settings.

I trained myself to expect numlock to be on and caps off as default setting , and if i changed their state i made very sure to change them back before switching between console and X.

Basically i worked around the issue.

I now use a standard ps/2 keyboard without any special keys, but it still has the same issue : X evdev keyboard driver and console keyboard driver each have their own setting for numlock / caps lock /scroll lock state .

Last edited by Lone_Wolf (2014-01-09 11:31:11)


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 2014-01-09 12:17:36

vanquish
Member
Registered: 2013-12-28
Posts: 49

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

schmidtbag wrote:

I appreciate your effort vanquish, but you seem to have a knack for not completely reading everything.  In that same quote you showed, you'll see that it says the Linux HID driver solves that issue.  As I said earlier, the numlock and capslock LEDs illuminate when I'm in the CLI.  I'm still in linux, so it isn't a driver problem, and obviously not a hardware problem either.  It's either an X or a KDE problem.  That being said, this problem seems to be just coincidental with this particular keyboard.  Unfortunately, this is the only wired USB keyboard I have so its hard to prove if this is just coincidence - I have 5 other keyboards I can use but none of them are wired USB.  Anyway, the real underlying issue is WHY does X/KDE affect the LED, and how do I prevent the problem from continuing.

Also as something I mentioned before - while in the GUI, I can use numlockx and turn the numlock LED on and off.  Something else is forcing the LEDs to stay where they are.

EDIT:
I wanted to point out that I tried plugging the keyboard into a laptop I own that runs XFCE.  Same issue - LEDs do not toggle (but the locks will) but they work fine in the CLI.  So, this seems to be explicitly an X related issue.

sorry if you think i'm wrong and sorry for missleading you guys. i've read your posts for sure. maybe i misunderstood something. as english is not my native language this is possible. for me its only a different understanding about hardware/driver on the one side and kde/x/console on the other.

anyway ... enough blah blah form my side. smile

Offline

#13 2014-01-09 14:15:44

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

Lone_Wolf wrote:

I use "numlockx on &"  in ~/.xinitrc so X does start with the correct setting for numlock.

Selecting the right keyboard driver in KDE (keyboard was a logitech with multimedia keys) did make the leds change status correctly, but console and X still had their own independent settings.

I trained myself to expect numlock to be on and caps off as default setting , and if i changed their state i made very sure to change them back before switching between console and X.

Basically i worked around the issue.

I now use a standard ps/2 keyboard without any special keys, but it still has the same issue : X evdev keyboard driver and console keyboard driver each have their own setting for numlock / caps lock /scroll lock state .

I wasn't aware I could even set the keyboard driver in KDE, but I'll take a closer look.  If that's all it takes, this isn't really that annoying of a problem.  I've dealt with misleading LEDs before from different keyboards, so that downside isn't really significant enough.

Offline

#14 2014-01-11 00:05:43

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

Ok, so I couldn't find anything driver related in the KDE input settings, but I found keyboard model.  Changing that didn't seem to fix the issue.  However, I noticed something interesting - under "Numlock on KDE startup", it has "turn on", "turn off", and "leave unchanged", but the interesting thing is whenever I apply either "turn on" or "turn off", it actually toggles the LED.  That seems pretty weird to me, because why is KDE's systemsettings able to toggle the LED?  Unfortunately it still doesn't let me toggle the LEDs using the keyboard itself.

Offline

#15 2014-01-11 20:44:50

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

@schmidtbag
This sounds like a case for systematic troubleshooting.
The most low-level way that I know of (with no need for programming) to test keyboard LEDs in X is the `xset` utility.
To test with this and have the least interference from other software (window manager, desktop environment, input method helpers, etc.), make sure you have the packages 'xorg-xinit', 'xterm' and 'xorg-xset' installed, switch to a free VT, log in, then run:

$ startx /usr/bin/xterm # this will start an (extra) X server, hosting a single terminal window
<in the X terminal, run:>
$ xset led named "Scroll Lock" # this should turn on the Scroll Lock LED
$ xset -led named "Scroll Lock" # this should turn it off again
$ xset led named "Num Lock" # this should turn on the Num Lock LED
$ xset -led named "Num Lock" # ...and turn it off again
$ exit # or ^D, to close the terminal and kill the X server

In my case (simple no-name USB keyboard), I was able to turn on/off the Scroll Lock LED but not the Num Lock LED. You can try using `xset led <number#>`, too, see `man xset`.
If you can only 'toggle' the LEDs but not specifically turn them on/off, that may indicate an X input driver problem.
You can also have a look at the output of `xinput` and your /var/log/Xorg.0.log to make sure your keyboard is detected as such correctly. I remember having read that at least some Microsoft keyboards were being detected as a collection of joysticks / other gaming related devices.

Last edited by ackalker (2014-01-11 21:03:54)

Offline

#16 2014-01-11 21:53:55

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

According to xinput, the keyboard is labeled  as "EST Gaming Keyboard".  Interestingly, it's considered both a mouse and a keyboard.

I've found that using "xset led 14" converts the number pad into a mouse.  Even if I press numlock, it doesn't allow me to get out of "mouse mode".  The only way to reverse it is through "xset -led 14".  I tried all other 32 numbers and nothing happened.  This keyboard I have doesn't have a scroll lock LED so I'm not sure if that toggled or not.  Using "xset led named" didn't help either.

Anyway, I find it strange that xset can't control the LEDs or even toggle the functions of the locks.

Offline

#17 2014-01-12 18:38:34

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

@schmidtbag
Found another possible solution: maybe your keyboard isn't in UTF-8 mode. Please have a look at this thread.

Offline

#18 2014-01-12 18:54:01

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

ackalker wrote:

@schmidtbag
Found another possible solution: maybe your keyboard isn't in UTF-8 mode. Please have a look at this thread.

sudo kbd_mode -u

Holy crap that was the easiest solution ever!  Thanks for pointing that out.  I just added that to /etc/rc.local (I have a feeling this won't carry over when I reboot).

Offline

#19 2014-01-12 18:58:21

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

You're welcome :-)

Offline

#20 2014-04-29 16:53:52

asg1448
Member
Registered: 2014-04-12
Posts: 74

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

I used that solution. While it fixes caps lock LED problem, now I have another after-effect: pressing Alt+Fn will switch me between TTYs, when I am inside WM. E.g.: Alt+F2 instead of showing "Run" dialog will drop me into TTY2. Anyone knows how to solve one without breaking another?..

Offline

#21 2014-05-07 19:35:29

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

@asg1448
Please open another topic. While the problem may be related, this topic is marked *SOLVED*, so far fewer people will have a look at it.
You can always link to this topic, though ;-)

Offline

#22 2014-05-07 19:38:50

asg1448
Member
Registered: 2014-04-12
Posts: 74

Re: Numlock and Capslock don't illuminate on new keyboard. *SOLVED*

I did it's here.

Offline

Board footer

Powered by FluxBB