Score:2

How can I invert mouse axes on Ubuntu 22.04?

lu flag

How can I invert both my mouse axes on Ubuntu 22.04 (i.e. with Xwayland)? I want up to be down and left to be right so that I can hold my mouse upside down.

Before my upgrade to Ubuntu 22.04 jammy jellyfish, I could invert my mouse axes with xinput, but now when I run xinput to list devices, I get a WARNING: running xinput against an Xwayland server., and the output doesn't show actual devices; instead it shows:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ xwayland-pointer:17                       id=6    [slave  pointer  (2)]
⎜   ↳ xwayland-relative-pointer:17              id=7    [slave  pointer  (2)]
⎜   ↳ xwayland-pointer-gestures:17              id=8    [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ xwayland-keyboard:17                      id=9    [slave  keyboard (3)]

Before, I would be able to grep for my mouse Primax Kensington Eagle Trackball.

I've tried setting the prop Coordinate Transformation Matrix for each of those pointer devices listed above, but that has no effect on my mouse axes.

David avatar
cn flag
It worked with xwayland in other version? The error clearly says you can not run this command on this DE. WARNING: running xinput against an Xwayland server.
JellicleCat avatar
lu flag
David, I doubt that I was using xwayland in the previous version (20.04) because I never saw the warning about it until now. Now I'm not looking for a way to continue using xinput but instead a new way to configure my mouse axes.
Esther avatar
es flag
@JellicleCat 20.04 used x.org by default, not Wayland. The issue is that these features aren't really configurable in Wayland unless they are deliberately exposed to the end user by the compositor. You would need to use `gsettings` (or `dconf-editor`, try looking for mouse settings and see if it's available)
Esther avatar
es flag
also, Xwayland is kind of like running x.org *inside* Wayland. It is used for compatibility with programs that require X.org when the system is using Wayland. So it's kind of like a "virtualized X" and that's why you don't see actual devices. Also any changes to it would only affect programs that use Xwayland for compatibility, so for example your DE would be unaffected by this
JellicleCat avatar
lu flag
@Esther I see one candidate that I thought might work if I invert its value to a negative: `org.gnome.desktop.peripherals.mouse speed`. But no matter what value I set, the pointer speed doesn't actually appear to be affected.
Esther avatar
es flag
there is a "rotation" option in theory, but it doesn't look like gsettings exposes it
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.