wayvnc icon indicating copy to clipboard operation
wayvnc copied to clipboard

WayVNC Mouse movement inverted on Raspberry Pi 5 with Touchscreen rotated 90 degrees.

Open videoman opened this issue 1 year ago • 1 comments

  • Version: $ wayvnc -V wayvnc: v0.8-rc0-4c70b8c (pios) neatvnc: 0.7.2 aml: 0.3.0

dpkg -l of wayvnc package. ii wayvnc 0.8.0-rc0-2 arm64 VNC server for wlroots-based Wayland compositors

  • Describe how to reproduce the problem This is still an issue with Raspberry pi and WayVNC /etc/os-release PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

/boot/firmware/cmdline.txt console=serial0,115200 console=tty1 root=PARTUUID=81e5547f-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles video=HDMI-A-1:1280x400@60234,rotate=90

~/.config/wayfire.ini [output:HDMI-A-1] mode = 400x1280@60234 position = 0,0 transform = 90

To reproduce, install the latest Raspberry Pi OS on a pi5, and connect a touch screen display. Then configure the rotation in cmdline.txt and wayfarer.ini. I believe that this is a wayvnc issue. All local USB and bluetooth mouse movements work as expected on the console/screen. Touch screen also registers correctly. It's just the WayVNC session that has reversed X and Y mappings. Before I upgrade the wayvnc service, upon connect it would show the orientation off by 90 degrees before it would do a screen refresh. Once the screen refreshed, it would then show the correct orientation. After wayvnc upgrade to 0.8.0-rc0-2 upon connection it would now show the right screen orientation, however it still had reversed X and Y mouse movements. If I do not rotate the screen, the VNC session works just fine. So something in wayvnc does not know how to map the mouse movements when the display is rotated.

I was hoping to find documentation in wayvnc on the config file to reverse the mouse movements, but did not see anything in the config documentation for that.

To fix this, I switched back to X11 server and vncserver (RealVNC) using the raspi-config tool under advanced options. Then all the mouse movements match up.

videoman avatar Feb 23 '24 20:02 videoman

It works fine on sway, so I think it's a wayfire bug.

any1 avatar Feb 23 '24 22:02 any1

I can confirm this bugger !

LongDirtyAnimAlf avatar Mar 01 '24 09:03 LongDirtyAnimAlf

@any1 any fix?

steveiliop56 avatar Mar 12 '24 18:03 steveiliop56

I haven't had the time to look into this, and it's not very high on my list of priorities.

any1 avatar Mar 12 '24 19:03 any1

@any1 I found some more info about the issue. It seems it's not a way fire bug but an issue with wlroots. There is this issue describing the changes here: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3760 Do you think it contains a fix?

steveiliop56 avatar Apr 19 '24 11:04 steveiliop56

@any1 I found some more info about the issue. It seems it's not a way fire bug but an issue with wlroots. There is this issue describing the changes here: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3760 Do you think it contains a fix?

I don't see any references to inverted mouse in that issue.

any1 avatar Apr 19 '24 11:04 any1

Yes I know it might have a different name or something. I couldn't understand the changes that's why I asked here.

steveiliop56 avatar Apr 19 '24 12:04 steveiliop56

Is there any temporary fix for that? Can I tweak the config somehow to fix the cursor?

steveiliop56 avatar Apr 30 '24 19:04 steveiliop56

Ahh, it's because wayfire doesn't map the seat to the output: https://github.com/WayfireWM/wayfire/issues/1283

any1 avatar May 08 '24 13:05 any1

Found this thread after experiencing the same issue with VNC and I don't see a way to solve it. The mouse orientation is incorrect when using VNC - did anyone manage to solve this?

j-broome avatar Jul 06 '24 14:07 j-broome