No-VNC numlock not synced

Still having this problem and scouring the web for answers led me back to this post I made in late 2019. Num-lock appears to be oppositely synced on my end.
 
what is your pveversion -v ?
 
My initial post was concerning CAPS and NUM locks; but since, CAPS is fine.
NUM-lock remains effected. If I change the NUM lock off focus or within noVNC -- it does change in the VM - albeit, exactly opposite to my client/PC.

Code:
oot@node01:~# pveversion -v
proxmox-ve: 6.2-1 (running kernel: 5.4.41-1-pve)
pve-manager: 6.2-4 (running version: 6.2-4/9824574a)
pve-kernel-5.4: 6.2-2
pve-kernel-helper: 6.2-2
pve-kernel-5.3: 6.1-6
pve-kernel-5.0: 6.0-11
pve-kernel-5.4.41-1-pve: 5.4.41-1
pve-kernel-5.4.34-1-pve: 5.4.34-2
pve-kernel-5.3.18-3-pve: 5.3.18-3
pve-kernel-5.0.21-5-pve: 5.0.21-10
pve-kernel-5.0.21-4-pve: 5.0.21-9
pve-kernel-5.0.21-3-pve: 5.0.21-7
pve-kernel-5.0.21-2-pve: 5.0.21-7
pve-kernel-5.0.21-1-pve: 5.0.21-2
pve-kernel-5.0.15-1-pve: 5.0.15-1
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.3-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.15-pve1
libproxmox-acme-perl: 1.0.4
libpve-access-control: 6.1-1
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.1-2
libpve-guest-common-perl: 3.0-10
libpve-http-server-perl: 3.0-5
libpve-storage-perl: 6.1-8
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.2-1
lxcfs: 4.0.3-pve2
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.2-1
pve-cluster: 6.1-8
pve-container: 3.1-6
pve-docs: 6.2-4
pve-edk2-firmware: 2.20200229-1
pve-firewall: 4.1-2
pve-firmware: 3.1-1
pve-ha-manager: 3.0-9
pve-i18n: 2.1-2
pve-qemu-kvm: 5.0.0-2
pve-xtermjs: 4.3.0-1
qemu-server: 6.2-2
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
zfsutils-linux: 0.8.4-pve1
 
ok, afaics, novnc does not sync the numlock state at all, but simple sends the keyboard code, so if i have numlock off connect (with numlock off in the vm) it is in sync
does this solve your problem?
 
It seems to be effecting Windows systems (maybe Win 10 only?) I opened two noVNC consoles, one Windows 10 and the other Linux Mint, and the linux VM syncs properly. Win 10 was always opposite.

I tried your solution with no joy.

1) Turned client desktop Num Lock OFF
2) Started VM
3) Opened VM console in noVNC.
4) Tested Num pad: Num Lock was ON in VM
5) Closed noVNC console window
6) Turned client desktop Num Lock ON
7) Opened VM console in noVNC
8) Tested Num pad: Num Lock was OFF in VM

It appears to me to be attempting to sync and gets it backwards. Or, sending sync notify twice.

I'm reading elsewhere with a similar issue. I'll share this info with noVNC and see if the following details may be helpful.

https://www.cendio.com/bugzilla/show_bug.cgi?id=400
Problem found!

The issue has to do with the fact that we are really doing two syncs on connect:

1. When the server first announces it supports LED states

2. When we get the first focus when the window is created

If these two happen quickly enough then there will not be time for the server to push an update of its state between the two syncs. And since we sync by toggling, not by setting, we end up toggling twice because we haven't realised the server has already been updated (the client just isn't informed yet).


There are two ways of solving this, with their own drawbacks:

a) Avoid the first sync. It is only really needed if the server announces support when we already have focus, so we could limit it to that case. That would solve this case, but it would not solve a similar case where focus is quickly toggled back and forth without the server having time to respond. That will probably not happen because of user interaction, but it might be a side effect of e.g. a window quickly popping up and going away.

b) Keep track of when we are already trying to sync. The problem is we don't really know if the sync is done as the server might ignore some states (e.g. ScrollLock in most cases). So we might block future, legitimate syncs of other keys. Fences could be an option, but that is complex and not supported by all servers.


I think a) might be good enough, even if it leaves a theoretical corner case.
 
Last edited:
ok, afaics, novnc does not sync the numlock state at all, but simple sends the keyboard code, so if i have numlock off connect (with numlock off in the vm) it is in sync
does this solve your problem?
I am having this problem where if I have my numlock on win 10 where I access my proxmox web UI. if I restart my VM, it has opposite effect. How do I change config where it always start with number lock on?
 
Hello,
I have a same problem on the virtual machines Debian.
Debian virtual machines don't have a desktop environment

when numlock is not synced, I do the command


Code:
setleds +num
 
Last edited:
  • Like
Reactions: ZooKeeper
Hello,

I find the same problem on different servers (version 7 and 8)

This happens on all virtual machines regardless of their OS.

I use Microsoft Edge in its most up-to-date version.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!