λ ryan. himmelwright. net

Custom Resolutions in Gnome Wayland

test

Downtown Durham NC

The other week, I worked from Red Hat Tower (Raleigh). In that office, IT is testing out a few flex-workstations with an ultra-wide monitor (Samsung S65UA), which I decided to try out. It was the first time I used a real ultrawide monitor for an entire workday. Since then, I have continued to occasionally experiment with working in a 21:9 aspect ratio… on my 16:9 monitors.

My Ultrawide Experience:

Ultrawide monitor I used at work
The Ultrawide monitor I used at work.

While using the ultrawide monitor for work, I learned that it fits many of my workflows. This is mostly because I always have my obsidian notes opened. The extra width allowed me to have a full window for whatever meeting or code I was working on, with the remaining space a perfect size for my notes. It’s also nice to have 3 full-ish windows for other tasks.

Since then, I’ve wanted to test the 21:9 workflow a bit more… but I don’t have an ultrawide monitor. However, I do still have my old, massive, 42.5" 4k monitor that we now use as a bedroom TV and second workstation.

I’ve done this before…

Looking through my post archives, one might notice that I’ve written about doing something very similar in the past. When the lg ud4279b was my main monitor, I used it as a canvas for what I called ‘sub monitor setups’. I even wrote a script to make doing so easy. Unfortunately, the method I used only works for X11, and not in Gnome+Wayland.

Setting a custom resolutions in Gnome Wayland

Now that I prefer using wayland (on Gnome) instead of x11, I have had a much harder time creating custom resolutions to fake an ultrawide monitor on large displays.

Luckily, I recently found this wonderful post, that finally helped me setup a workable solution on wayland gnome. They get all the credit. Here’s a rough outline of what I did.

My steps:

➭ ls /sys/class/drm/card*
➭ cat /sys/class/drm/card1-DP-1/modes
3840x2160
3840x2160
3840x2160
3840x1600
2560x1440
1920x1080
1920x1080
1920x1080
1280x720
1280x720
1024x768
800x600
720x480
720x480
640x480
640x480
640x480
GRUB_CMDLINE_LINUX="rd.luks.uuid=luks-5a3d262f-9081-41de-ab1d-0266cab3b7fc rhgb quiet video=DP-1:3840x1600@60"

Note: It’s a good idea to first backup this file before editing it.

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Things to note

While this works, it isn’t a perfect solution and there are a fewt things to be aware of:

Conclusion

Fake ultrawide monitor resolution
Fake ultrawide resolution on my large monitor, under Wayland Gnome.

While ultrawides might be well suited for my work tasks, I don’t think they are ideal for the rest of my personal monitor needs. Still, it’s fun to have the option to turn a large 16:9 into a fake ultrawide for when I just want to work with that type of display. And now, I don’t even have to leave my wayland session to do it!

Next Post:
Prev Post:

Adding --baseurl Argument to My Website Pytests The iPad Magic Keyboard Case