How to portrait mode (wayland)

Heyho!
I set up a NUC (with an Intel ARC GPU) with Rocky Linux 9.4 and now I’m trying to put the Display in portrait mode via the cli.

Through googling I learned that doing this with wayland is a little bit complicated, so I tried using X11 with xrandr, which worked just fine! But, when putting chrome in fullscreen, there was a weird artefact at one line in the screen, where it looked like screen tearing, but not like typical tearing. It was more like the content at this line kinda diffused. Maybe a ‘translation’ error because the Display was put in portrait mode?

To tackle this I already tried Vsync on and off, hardware acceleration on and off, using the xrandr TearFree flag, though I lost track which permutation of these settings I tried out.

So I guess maybe I should try to do this with Wayland but I don’t know how to do that, therefore I am asking for help from more experienced people here and I’m thankful for any pointers or resources you could give me :slight_smile:

Since I’m fairly new with Linux, I’m not sure which other information are helpful

Cheers!

What is a NUC? (what is a nuc)

It’s a mini computer, if you google “intel nuc” you’ll see what it looks like.

There is a wlr-randr, an xrandr for Wayland. Not sure if Rocky has it. I see that Rocky 8.x doesn’t.
You might be able to build it from a Fedora rpm although the oldest I see on rpmfind is for Fedora 39.

1 Like

I did find an rpm for F34, (which usually works on Rocky 9 if you can get the srpm). https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/34/Everything/x86_64/os/Packages/w/wlr-randr-0-6.20200408git5ff601a.fc34.x86_64.rpm

That’s the rpm, not sure if the srpm is available. However, you might be able to build it from the source at github.

You need meson and wayland
I had to install rust-wayland-devel and meson, then tried the build instructions. I was trying on a VM with no GUI and so, the last instruction build/wlr-randr failed to connect to display but if you’ve got wayland running I’d think that would work.

Thanks! I also came across that but I got a little bit too confused with how to set it up and what the requirements were.

I fixed it in another way! In case somebody who has the same problem stumbles upon this thread:

I found this script which did the job of rotating with ./gnome-randr.py --output DP-1 --rotate left (note: you need to install pydbus).

After this I had some trouble with rotating the touchscreen device, but

sudo bash -c "cat > /etc/udev/rules.d/99-touchscreen-rotation.rules <<EOL
SUBSYSTEM==\"input\", ATTRS{name}==\"<Device Name>\", ENV{LIBINPUT_CALIBRATION_MATRIX}=\"0 -1 1 1 0 0\"
EOL"

did the trick :slight_smile: