matteodelabre/vnsee

Sway window manager rotation has no effect on final output on reMarkable

jegfish opened this issue · 2 comments

First off, amazing piece of software, thank you to the original author and contributors for writing it. I am excited for the possibility of using an e-ink computer monitor in the hopes it will help with my eye strain (with hardware I currently have, don't have to buy an expensive e-ink monitor).

  • Desired Result: Ability to rotate final output on reMarkable tablet. I want to try landscape mode, and would be nice to be able to do a 180 degree rotation so that I can stand it up in portrait mode (so cable port is on top).
  • Actual Result: Even though I have done a rotation transform on my virtual Sway display, when connecting from VNSee to wayvnc the display is always in portrait mode, no rotation.
  • FYI, performance of refresh rate does seem to be good (in terminal and in browser using Tridactyl Vim plugin for scrolling [unrelated but my mouse isn't working in VM, and probably run into issues when scrolling with mouse]), it's just the orientation that is the issue.

Details

Note: I am using a virtual machine setup as MacOS is not supported

  • Host Hardware: M1 MacBook Air
  • VM software: UTM for Mac (https://mac.getutm.app/), it's a GUI wrapper around QEMU
  • VM Guest Operating System: Fedora 35 aarch64/arm64
    • Minimal install with just the packages swaywm, wayvnc, xfce4-terminal added.

Sway and wayvnc setup:

  • swaymsg create_output
  • swaymsg 'output "HEADLESS-1" mode 1872x1404'
  • swaymsg 'output "HEADLESS-1" transform 90'
    • have also tried other transforms, 180, 270
  • wayvnc --output=HEADLESS-1 --max-fps=10 10.11.99.2 5900

VNSee error messages

If I have resolution set at 1872x1404 (landscape version of reMarkable resolution), with no transform (swaymsg 'output "HEADLESS-1" transform 0'), VNSee will warn:

Warning: The server resolution (1872x1404) does not fit in the screen (1404x1872)
The image will be cropped to fit

If I then swaymsg 'output "HEADLESS-1" transform 90', there is no warning, but the screen content is not actually rotated.

If I apply a transform to output "Virtual-1", which is the VM window visible on my laptop monitor, it does rotate on my laptop screen, but if I then pass that output to wayvnc, it does not rotate on the reMarkable tablet. The video is still a mirror of what I can see on my laptop monitor, except for the fact that it is rotated on my laptop and not rotated on the reMarkable.

I haven't been able to test wayvnc with another VNC client, they don't seem to connect. Maybe it's my janky setup, maybe it's wayvnc. But it could be possible this is a bug in wayvnc rather than VNSee. I will try to get another VNC client to work to see if it shows up rotated there.

Managed to get vncviewer working on the VM, bit confusing but I don't think it works. Rotated the display 90 degrees. When I connected the viewer it's display seemed to only be rotated 90 degrees, I would expect it to be 90 + 90 = 180 degrees if it is rendering as rotated. So perhaps the issue is in sway or wayvnc, though that's not an ideal test. I'll see if I can get a VNC viewer on my host OS connected to the VM guest OS.

EDIT:
Managed to get VNC viewer connected from host (MacOS) to VM guest (Fedora Linux). Rotation not applied. I'm guessing the issue is in wayvnc, will look into it and perhaps report the bug there. Would appreciate any additional information anyone has.

Turns out I had to change settings/code in wayvnc to get this working.