How do I configure Ubuntu for a 21:9 screen?
Solution 1:
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 X
xY
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
Solution 2:
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.