24

I have an ultra wide screen, 21:9 resolution, AOS. There's no option for 21:9 in the Ubuntu display settings though so I have to have the monitor set to 16:9 which kind of defeats the purpose of having an ultra-wide screen! If the monitor is set to 21:9 the desktop is stretched significantly.

Anyone know how to add the 21:9 settings into Ubuntu?

8
  • 1
    You may read this: askubuntu.com/questions/19954/…
    – Takkat
    Jan 31, 2016 at 8:05
  • Also check this: askubuntu.com/questions/356200/…
    – Szczepan
    Aug 25, 2016 at 15:41
  • If you have an Nvidia video card and installed its driver, you can run Nvidia X Server Settings from your list of applications and set your desired resolution there.
    – Dante
    Aug 25, 2016 at 17:14
  • 3
    This question needs improvements: workstation or laptop brand/model, including information about graphic card, version of Ubuntu, and screen brand/model.I own a Thinkpad E531 laptop with only the integrated intel gpu of the coreI5 cpu. Ubuntu 16.04 was able to detect and use an Asus 21:9 screen without any issue, plus the screen of the laptop at the same time.
    – ttoine
    Aug 26, 2016 at 15:28
  • 1
    I think everything is needed to answer this question is in here. Sadly, I don't have the time to try it myself.
    – user308164
    Aug 26, 2016 at 16:52

7 Answers 7

16
+250

Along the lines of this, I was able to find some information:

This link helped me.

In short: run xrandr and cvt like you did, then create the following file:

/usr/share/X11/xorg.conf.d/10-monitor.conf

In the file change the parameters in < > according to your specs:

Section "Monitor"
  Identifier "Monitor0"
  <INSERT MODELINE HERE>
EndSection
Section "Screen"
  Identifier "Screen0"
  Device "<INSERT DEVICE HERE>"
  Monitor "Monitor0"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Modes "<INSERT MODENAME HERE>"
  EndSubSection
EndSection

Here's what you should do:

For the modeline, first run this command:

cvt <X> <Y> <R>

Where XxY is your resolution and R is your refresh rate.

To test the resolution, first do this:

xrandr --newmode <MODELINE>

Be sure to remove the Modeline keyword.

Then, copy the output and replace the placeholder with it.

For the device, run xrandr|tail -n+2|head -n1|cut -d\ -f1, and replace the placeholder with its output. Keep the quotes.

For the modename, run cvt <X> <Y> <R>|cut -d\ -f2, replacing the last placeholder with the output of this command. As before, keep the quotes.

After that, do this:

xrandr --addmode <DEVICE> <MODENAME>

Replace <DEVICE> and <MODENAME> appropriately. Then, to test your resolution, do this:

xrandr --output <DEVICE> --mode <MODENAME>

If you encounter problems with the new resolution, please log out and then back in (worst case scenario: press Ctrl+Alt+Delete and then Enter to sign out.)

If you didn't encounter problems, save the file, then restart X. To do this, first press Ctrl+Alt+F1, login as an 'Administrator' account, then run these commands:

killall Xorg
X
2
  • It worked. Thanks a lot. Also I think it's better if we put there xrandr command in ~/.profile if we want keep this config next time we boot.
    – realhu
    Nov 23, 2017 at 10:38
  • 1
    I got an error like this: $ xrandr --addmode HDMI-0 2560x1080_60.00 X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 18 (RRAddOutputMode) Serial number of failed request: 29 Current serial number in output stream: 30
    – hamx0r
    Apr 27, 2020 at 21:14
5

For a while i used an ultrawide LG Screen

I've had some luck using cvt to generate custom modelines which pushed the refresh up to 44hz which seemed to be a sweet spot in terms of being the most my graphics card (intel 4000 + GeForce GT 750M in optimus) could output reliably. It will take around 10 to 20 seconds to sync and if you have the refresh rate too high the screen will periodically blank and resync. If it doesn't work it will not damage your monitor like the old CRT's did so experiment away. I was able to get 44hz to stay synced solidly all day.

The cable that came with my monitor could not handle this but the 'amazon basics high speed hdmi with ethernet' cable i bought for a few quid could so its worth trying a few cables if this isn't working straight away.

display port is the best choice over hdmi if you have the option, if you use display port you need to change the port identifier in this script.

If you use HDMI you might need to ensure your monitor is in HDMI 1.4a or HDMI2 mode if it supports it, the default HDMI 1.3 sometimes isn't enough for superwide screens.

Heres the script i wrote for setting up my screen, it should work for any combinations of resolutions, just edit the RESOLUTION line.

#!/bin/bash

# setup my massive monitor at 45hz if its plugged in

RESOLUTION="3440 1440 44" 
OUTPUT="HDMI-0"

CONNECTED=$(xrandr --current | grep -i $OUTPUT | cut -f2 -d' ')

if [ "$CONNECTED" = "connected" ]; then
    MODELINE=$(cvt $RESOLUTION | cut -f2 -d$'\n')
    MODEDATA=$(echo $MODELINE | cut -f 3- -d' ')
    MODENAME=$(echo $MODELINE | cut -f2 -d' ')

    echo "Adding mode - " $MODENAME $MODEDATA
    xrandr --newmode $MODENAME $MODEDATA
    xrandr --addmode $OUTPUT $MODENAME
    xrandr --output $OUTPUT --mode $MODENAME
else
    echo "Monitor is not detected"
fi

Experiment with this until you have a stable setting , then you follow the procedure described by @Έρικ Κωνσταντόπουλος to add it to your xorg setup.

FWIW i returned my ultrawide screen and went for 4k ilyama 40 incher which is a 16:9 as i preferred more hight. It was cheaper as well.

2
  • The script immediately worked for me. The reason the other answers failed for me was the refresh rate was capped at 44. 44+ led to a crtc error when changing resolutions.
    – Marcus
    Apr 16, 2021 at 13:16
  • In my case iiyama g-master gb3466WQSU I was unable tu run 3440x1440 @ 60hz via HDMI. I switch to USB-C dongle to HDMI and that works fine...
    – Gelldur
    Jun 1, 2021 at 17:52
2

For Nvidia Cards

  1. IMPORTANT: Ensure you're using a display port cable from your PC to your monitor.

  2. Then you need the proper drivers:

  3. After you reboot launch the Nvidia Control Panel from the dash. The latest versions of the Nvidia drivers include native support for 21:9, on my system it just worked:

enter image description here

1
  • I also updated my graphic card and everything worked fine.
    – neves
    Oct 17, 2016 at 4:23
1

I'm using Elementary OS, based on Ubuntu.. I have a Ultra Wide monitor (LG 29") and the maximum I had in my display was 1920x1080 (16:9) which makes everything oval (not good).

So using the following commands, I've added the 2560x1080 (21:9) and it got much better! Check the link bellow for the source and reference:


# Get more details about my display
xrandr

# AND
cvt 2560 1080 50

Then

sudo xrandr --newmode "2560x1080_50.00"  188.75  2560 2712 2976 3392  1080 1083 1093 1114 -hsync +vsync

sudo xrandr --addmode eDP-1 "2560x1080_50.00"

Source: https://medium.com/@AbhiXpert/add-change-the-custom-resolution-of-your-display-using-xrandr-on-ubuntu-18-04-in-a-minute-338caec6e29

It worked for me and hope it help you guys

1
  • I have the LG 29WN600 and these steps work! The difference is refresh rate should be set to 50 instead of 60 like other guides.
    – AnT
    Jan 2, 2022 at 16:39
0

use Xrandr: cvt or gtf "(x axis) (y axis) (refresh rate)"

input the Output of the above command

xrandr --newmode "(resolution output of gtf or cvt)"

xrandr --addmode "(connection) (Xaxis)x(Yaxis)_(refresh rate)"

don't forget you need a HDMI 2.1 cord... you'll get weird timings otherwise I've had the screen tear in half, checkerboarding across the screen.

0

Adding to EKons answer for Ubuntu 20.4 (as I can't comment).

I tried to use the permanent 10-monitor.conf file setup, but was unable to login after as it led me to a login-bootloop. Also happened after trying to change file permissions. Only way out was to delete the file via console or start Ubuntu using wayland.

Another issue was the naming of the config that was not supported so I had to shorten it.

My none-permanent solution is now a bash script that was made executable and looks like this:

#!/bin/bash

xrandr --newmode "5120_30" 292.75  5120 5360 5888 6656  1440 1443 1453 1468 -hsync +vsync
xrandr --addmode HDMI-1 5120_30
xrandr --output HDMI-1 --mode 5120_30
-2

There is nothing to do, it should just work out of the box. Just plug the HDMI cable, and the screen should work.

Please have a look at the screenshot below. enter image description here

On the left, the default 1366x768 screen of the laptop. On the right, the 21:9 screen. See that the resolution and ratio is detected on the display setup.

The laptop is a Lenovo E531, with a Core i5, with integrated Intel GPU. No extra graphic card.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .