Skip to content
Abraham Nnaji
  • Home
  • About
  • Writing
  • Work
  • Resume
  • Contact
← All writing

note

Fixing an ultrawide monitor resolution on Ubuntu

20 Feb 2019updated 28 Nov 20261 min · 144 wordslinuxubuntu

A flat diagram of a 21:9 ultrawide monitor with a dashed rust inner rectangle stretching outward via neon green-yellow arrows, linked to a three-row mode selector card with its bottom row highlighted.
← PreviousFixing a broken JAVA_HOME path for Gradle on UbuntuNext →Writing a linked list in Go

Recruiting, a question about a post, or a soccer take. Email works best.

nnaji.abraham+web@gmail.com
  • LinkedIn
  • GitHub
  • Twitter/X
  • Medium
  • Spotify
  • YouTube
  • RSS

status: building engineering platforms

© 2026 Abraham Nnaji · BC, Canada · no tracking
Note

2026 note

This was written for Ubuntu 16.04 on X11, where xrandr can add modes. Current Ubuntu releases default to Wayland, where xrandr modelines do not apply, and newer kernels and drivers usually detect ultrawide modes without help. Check your display settings first.

NOTE: Articles published by me are for my record keeping and references to issues I faced and how I solved them, but are also available for the public to view them.

Display port or HDMI on Linux device settings not showing the resolution for your monitor.

This is the code I used to fix mine, gotten from this link on Ask Ubuntu.

Open the terminal and run this:

bash
gtf 2560 1080 50
text
# 2560x1080 @ 50.00 Hz (GTF) hsync: 55.60 kHz; pclk: 188.60 MHz
  Modeline "2560x1080_50.00"  188.60  2560 2704 2976 3392  1080 1081 1084 1112  -HSync +Vsync

After that run the following:

bash
xrandr --newmode "TEST" 188.60  2560 2704 2976 3392  1080 1081 1084 1112  -HSync +Vsync
xrandr --addmode HDMI-3 "TEST"
xrandr --output HDMI-3 --mode "TEST"

HDMI-3 should be changed to whatever port xrandr displays.

Next, run sudo gedit ~/.xprofile (or nano or vim) to make this script that autoloads the resolution when the system starts.

bash
#!/bin/sh
MODE_NAME="ULTRAWIDE"
OUTPUT="HDMI-3"
CONNECTED_OUTPUT=$(xrandr --current | grep -i $OUTPUT | cut -f2 -d' ')
 
if [ "$CONNECTED_OUTPUT" == "connected" ];
then
# SET 2560x1080 50 HZ
xrandr --newmode "$MODE_NAME" 188.60  2560 2704 2976 3392  1080 1081 1084 1112  -HSync +Vsync
xrandr --addmode HDMI-3 "$MODE_NAME"
xrandr --output HDMI-3 --mode "$MODE_NAME"
xrandr --output HDMI-3 --primary
else
   echo "ULTRAWIDE IS NOT DETECTED !"
fi