VMware Horizon Community
plemelin
Contributor
Contributor
Jump to solution

VMware Horizon Client for Linux disables Num Lock key on the connected usb keyboard

Good morning,

I'm running a Linux machine with the VMware Horizon Client for Linux. Before starting the client, i am able to use the NumLock key on my USB keyboard. Once I log through the client, I can still use the Num Lock key.

Now, once I exit the VMware Horizon Client, i am unable to toggle the Num Lock key. I tried using xset and some X11 code with XkbLockModifiers() to programatically change the status of the Num Lock and nothing works. I use the same code before entering the windows virtual machine and I can toggle the NumLock key either from the command line or with the keyboard itself.

If I log back in the VMware Horizon Client, the keyboard works just has before. As soon as I exit, I lose the control of the Num Lock key.

I either have to reboot my Linux machine or disconnect and reconnect the USB keyboard to solve the issue. However, as soon as i'm back inside the client, same process will repeat.

Does someone has an idea of what the VMware Horizon Client could be doing that would disable the NumLock for my OS?

Thank you.

0 Kudos
1 Solution

Accepted Solutions
plemelin
Contributor
Contributor
Jump to solution

The way the horizon client deals with the keyboard is pretty savage... If the client does not terminate properly, no cleanup is attempted and everything that was did in the background to handle the keyboard is not rolled back...

Mainly:

1- All modifiers are removed (you can see it when doing "xmodmap". It's all empty)

2- Something is playing with XkbSetIndicatorMap and messing up the flags of each LEDs.....

View solution in original post

0 Kudos
2 Replies
plemelin
Contributor
Contributor
Jump to solution

After additional testing, I found out that the issue is triggered if there is an unclean shutdown of the VMWare Horizon Client. So, basically, if the client is running and from the console where I started it I do CTRL-C, the NumLock and the CapsLock key becomes unresponsive. I dont think it happened to me if I use the "Disconnect and Quit" button.

Aditionally, I figured out it's something the client sends to the X server since simply by killing it, the keyboard starts behaving normally. I then used xtrace to further debug the issue and I can see that many X cleanup functions are not called when the SIGINT is received.

I'm going to keep digging to try to find which call to X actually disables the NumLock and CapsLock keys.

0 Kudos
plemelin
Contributor
Contributor
Jump to solution

The way the horizon client deals with the keyboard is pretty savage... If the client does not terminate properly, no cleanup is attempted and everything that was did in the background to handle the keyboard is not rolled back...

Mainly:

1- All modifiers are removed (you can see it when doing "xmodmap". It's all empty)

2- Something is playing with XkbSetIndicatorMap and messing up the flags of each LEDs.....

0 Kudos