Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6015

Wayland, how to force a custom Display resolution?

$
0
0

I've been using X11 for many years and xrandr has been a great tool.

I am able to set a custom resolution to my display (not officially supported resolution) by using the code blow. However Wayland doesn't have xrandr.

How can I force a custom unsupported resolution in Wayland?

Here is my xrandr code that works well in Xorg.

#!/bin/bash# Function to get the currently connected display nameget_connected_display() {  xrandr --query | grep -w "connected" | awk '{print $1}'}# Set custom resolutioncustom_resolution="3840x720"# Set rotationrotation="inverted"# Get the currently connected displaydisplay_name="$(get_connected_display)"# Add the custom resolution using xrandrxrandr --newmode "$(cvt 3840 720 60 | grep -oP '(?<=Modeline ).*')"# Add the custom mode to the displayxrandr --addmode "$display_name" "$custom_resolution"# Apply the custom resolution and rotation to the displayxrandr --output "$display_name" --mode "$custom_resolution"

So far I've tried setting up the resolution at boot time, but it has no effect.I'd appreciate help if somebody actually forced a resolution in Wayland and had it working properly.


Viewing all articles
Browse latest Browse all 6015

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>