You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got an Ubuntu 24.04 guest running in UTM Version 4.6.5 (108) on macOS. I am using Apple native virtualization (not QEMU). I was encountering an issue where the horizontal scrolling was backwards on my touchpad while vertical scrolling worked fine. This documents what I did to diagnose and resolve this issue.
This is not related to the GNOME "natural scrolling" setting. With "natural scrolling" enabled, vertical scrolling worked "naturally" and horizontal scrolling was backwards. With it disabled, vertical scrolling was backwards and horizontal scrolling worked "naturally".
StackOverflow has a solution involving "xinput list-props" to find "Scrolling Distance" and eventually setting up a file in /usr/share/X11/xorg.conf.d. This doesn't work because Ubuntu 24.04 is using Xwayland and not X11.
UTM's main settings has a checkbox labeled QEMU Pointer / Invert scrolling. This has no effect since QEMU emulation is not in use.
UTM's VM settings, virtualization tab has a Pointer setting. Some discussions I found talk about setting this to "Generic Mouse". This had no effect for me; I ended up leaving it as "Mac Trackpad".
Now, here's what actually worked to resolve this issue.
$ mkdir -p /etc/libinput/
$ sudo tee /etc/libinput/local-overrides.quirks >/dev/null <<EOF[Apple Virtual USB Digitizer Horizontal Scroll]MatchName=Apple Inc. Virtual USB DigitizerModelInvertHorizontalScrolling=1EOF
$ reboot
Some online sources say to use AttrHorizontalScrollInvert instead of ModelInvertHorizontalScrolling, but this didn't work for me. Here are some tools to help you debug if this still doesn't work for you. You will need to install the libinput tools (sudo apt install libinput-tools).
cat /proc/bus/input/devices should return a device that matches "Apple Inc. Virtual USB Digitizer".
sudo libinput list-devices to find the "Kernel" for the Digitizer, then use sudo libinput debug-events --device /dev/input/event2 (or whichever) to dump all events. Scroll up, down, left, right. If your horizontal scrolling is in sync with your vertical sync, then up should print negative "vert" values; down should print positive vert values; left should print negative horiz values; right should print positive horiz values. This is at a layer below your chosen setting for GNOME's "natural scrolling" and will not be affected it.
sudo libinput quirks list /dev/input/event2 (or whichever) should print ModelInvertHorizontalScrolling=1.
sudo libinput quirks validate should print nothing.
Hopefully this helps you to resovle the issue directly, or if it doesn't, at least gives you some tools to debug what might be happening. Cheers.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I've got an Ubuntu 24.04 guest running in UTM Version 4.6.5 (108) on macOS. I am using Apple native virtualization (not QEMU). I was encountering an issue where the horizontal scrolling was backwards on my touchpad while vertical scrolling worked fine. This documents what I did to diagnose and resolve this issue.
/usr/share/X11/xorg.conf.d
. This doesn't work because Ubuntu 24.04 is using Xwayland and not X11.Now, here's what actually worked to resolve this issue.
Some online sources say to use
AttrHorizontalScrollInvert
instead ofModelInvertHorizontalScrolling
, but this didn't work for me. Here are some tools to help you debug if this still doesn't work for you. You will need to install the libinput tools (sudo apt install libinput-tools
).cat /proc/bus/input/devices
should return a device that matches "Apple Inc. Virtual USB Digitizer".sudo libinput list-devices
to find the "Kernel" for the Digitizer, then usesudo libinput debug-events --device /dev/input/event2
(or whichever) to dump all events. Scroll up, down, left, right. If your horizontal scrolling is in sync with your vertical sync, then up should print negative "vert" values; down should print positive vert values; left should print negative horiz values; right should print positive horiz values. This is at a layer below your chosen setting for GNOME's "natural scrolling" and will not be affected it.sudo libinput quirks list /dev/input/event2
(or whichever) should printModelInvertHorizontalScrolling=1
.sudo libinput quirks validate
should print nothing.Hopefully this helps you to resovle the issue directly, or if it doesn't, at least gives you some tools to debug what might be happening. Cheers.
Beta Was this translation helpful? Give feedback.
All reactions