Use Tablet For Pointer option causing CPU usage on Linux

cfnz

Member
Feb 12, 2019
11
5
23
55
Hi,

Just testing proxmox... I was getting around 5-6% CPU usage on two different linux boxes on two different test servers, but in the guest, cpu usage in top was not really showing anything.

I have done some searching and found a couple of several year old posts that talked about the Tablet for Pointer option and context switching... seemed to be more about windows guests.

Anyway, I turned it off and immediately (without rebooting the guest), the CPU usage dropped (see pic in attachment). The docs don't really talk about what this option is for, from what I can gather it is for gui mouse control in the guest.

Why would one turn this on (the posts talked about some drivers that could be used instead anyway).

Should it be on by default? And is there a way to turn this off by default? (Or is there another issue at play that should be fixed in my setup or elsewhere?)

upload_2019-5-8_12-41-55.png

Thanks for any help.
 
I experienced the same. A question out of curiosity: what exactly does this option do?

Is there any Difference if its on or off if I only access the VM via SSH or RDP and never by using the proxmox VNC?
 
It emulates a USB tablet as a mouse - as that's more accurate for VNC tracking of the cursor.

As its a USB device, it gets polled at ~1000hz. That's the CPU usage you see.
 
As its a USB device, it gets polled at ~1000hz. That's the CPU usage you see.

Makes sense to cause such a high CPU Load if its polled at that frequency. The question is: why on earth such a high polling rate? Even for gaming this is, most of the time, to much. Why not the very common 125 Hz?

Also, can the polling rate be changed? Using the mouse without "tablet mode" is quite cumbersome, but having a constant 12% CPU load (in my case) for only occasionally using the VNC connection is a bad trade-off.
 
in recent distros (like debian 11) this should be resolved, since

/usr/lib/udev/rules.d/60-autosuspend.rules
and
/usr/lib/udev/hwdb.d/60-autosuspend.hwdb

containing
#########################################
# QEMU
#########################################

# Emulated USB HID devices
usb:v0627p0001:*QEMU USB Keyboard*
usb:v0627p0001:*QEMU USB Mouse*
usb:v0627p0001:*QEMU USB Tablet*
ID_AUTOSUSPEND=1


has been added to systemd (after ripped of long before, where it was working correctly).

https://github.com/systemd/systemd/commit/ec8bebbcc27ebbd9fa606743199c456ed5e3874c


my debian 11 vm is at 0.2% cpu when idle with "use tablet for pointer"=on
 
  • Like
Reactions: Neobin

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!