15

I'm running Ubuntu 13.04 and the max resolution it's letting me choose for the monitor I currently have plugged in - a 1280x1024 monitor - is 1024x768. The description for the Monitor is "Unknown". See attached:

Unknown monitor

The monitor is an IBM ThinkVision L170P.

14
+50

From https://askubuntu.com/questions/139947/why-cant-ubuntu-12-04-detect-my-screen-resolution

Open your terminal and run this:

xrandr --newmode $(cvt 1280 1024 60 | grep Mode | sed -e 's/.*"/1280x1024/')
4
  • 7
    I had to do xrandr --addmode VGA1 1280x1024 as well but otherwise your solution worked!
    – neubert
    Dec 6 '13 at 7:04
  • 2
    xrandr --newmode $(cvt 1920 1080 60 | grep Mode | sed -e 's/.*"/1920x1080/')
    – atilkan
    Aug 21 '15 at 4:38
  • It worked, but why I have to run it every time the system starts?
    – Fahad Khan
    Oct 2 '15 at 5:18
  • after I did this, my monitors keep blinking out, I lose my second display then my background turns into a noisy pattern. Also, sometimes when I log out the next time I log in, it's almost a blank screen but I can get back in if I just type my password. Sep 18 '20 at 5:47
14

First type xrandr -q to see your valid screen outputs eg. VGA1/DVI-1 etc...
Then xrandr --addmode DVI-1 1600x1200
Then new option will appear in your Displays configuration
Tested on ubuntu 14.04 and 2 screens ;)
note this change is not persistent after restart. To make it persistent I made shell script which do above mentioned command xrandr --addmode... and then I add line to file /etc/lightdm as follows

[SeatDefaults]
display-setup-script=pathToYourScript

this way new resolution is added before desktop try to set it...

1
  • Just to add, make sure that "pathToYourScript" is executable. You can place it in /opt/ also. Mar 5 '16 at 7:58
6

For 1920x1080 res 60 Hz use following:

xrandr --newmode $(cvt 1920 1080 60 | grep Mode | sed -e 's/.*"/1920x1080/')
xrandr --addmode VGA-1 1920x1080

One may encounter different output names: VGA1, VGA-1, etc.

More info HERE.

2
  • This appears to duplicate the accepted answer plus the OP's comment, only this version has the wrong resolution.
    – fixer1234
    Nov 9 '18 at 9:03
  • The issue is that one comment mentiones VGA1 in addmode, in my case it's VGA-1 . And I have to get new resolution to work.It's just putting together nuances that may help others.
    – alex
    Nov 9 '18 at 15:16
2

Try installing mesa-utils using sudo apt-get install mesa-utils.

Once you have this installed reboot your machine. After rebooting the machine open a terminal and type glxinfo | grep render and glxgears

That should fix it.

2
  • I'm running Ubuntu LiveCD on this particular machine so that wouldn't work unfortunately :(
    – neubert
    Dec 6 '13 at 7:05
  • 2
    i don't think this is relevant. not working also.
    – atilkan
    Aug 21 '15 at 4:42
0

If setting the resolution from the UI doesn't "stay" and falls back to 1024 then setting it via xrandr may do the trick.

First get cvt modeline:

cvt 1920 1080 60.0

this will produce something similar to this:

# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz 
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576  1080 1083 1088 1120-hsync +vsync

now create a named mode and copy values after the Modeline "1920x1080_60.00" above:

xrandr --newmode "myMode" 173.00 1920 2048 2248 2576  1080 1083 1088 1120-hsync +vsync

check what's your display's code:

xrandr

//will produce something like:
//eDP-1 connected 1024x1080+0+0 (normal left inverted right x axis y axis) 381mm x 214mm
//800x600       60.32    56.25  
//848x480       60.00  
//640x480       59.94

the monitor code is eDP-1 in this case. Now add the newly created mode to the display:

xrandr --addmode eDP-1 myMode

And finally set that mode on the display:

xrandr --output eDP-1 --mode myMode

That last line actually does the difference.

0

Open terminal and type xrandr -q to see your connected screen (VGA-1 in my case). Then execute

nano /user/home/reschange.sh

and paste this:

#!/bin/bash

gtf 1920 1080 60
 
xrandr --newmode "1920x1080" 172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync

xrandr --addmode VGA-1 1920x1080

Save the file, make it executable:

chmod +x /user/home/reschange.sh

and run:

sudo ./user/home/reschange.sh

Done! You need to make this script running on startup if you don't want to run it manually every time you start the PC.

0

I had a problem with LG FLATRON E2241 in my ubuntu 20.04 and the resolution was on 1280x1024. I want to increase that to 1920x1080 so I used this command:

xrandr -q

The output was:

Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 16384 x 16384 eDP-1 connected (normal left inverted right x axis y axis) 1920x1080 60.00 + 59.97 59.96 59.93
1680x1050 59.95 59.88
1600x1024 60.17
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.02
1440x900 59.89
1400x900 59.96 59.88
1280x960 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1360x768 59.80 59.96
1280x800 59.99 59.97 59.81 59.91
1152x864 60.00
1280x720 60.00 59.99 59.86 59.74
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
960x540 59.96 59.99 59.63 59.82
800x600 60.00 60.32 56.25
840x525 60.01 59.88
864x486 59.92 59.57
800x512 60.17
700x525 59.98
800x450 59.95 59.82
640x512 60.02
720x450 59.89
700x450 59.96 59.88
640x480 60.00 59.94
720x405 59.51 58.99
684x384 59.88 59.85
680x384 59.80 59.96
640x400 59.88 59.98
576x432 60.06
640x360 59.86 59.83 59.84 59.32
512x384 60.00
512x288 60.00 59.92
480x270 59.63 59.82
400x300 60.32 56.34
432x243 59.92 59.57
320x240 60.05
360x202 59.51 59.13
320x180 59.84 59.32
HDMI-1 disconnected (normal left inverted right x axis y axis) DP-1 connected primary 1280x1024+0+0 (normal left inverted right x axis y axis) 477mm x 268mm 1280x1024 75.02* 60.02
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94
720x400 70.08
HDMI-2 disconnected (normal left inverted right x axis y axis) DP-2 disconnected (normal left inverted right x axis y axis) DP-3 disconnected (normal left inverted right x axis y axis) DP-4 disconnected (normal left inverted right x axis y axis)

After finding my plugged monitor in the list I used this command:

xrandr --addmode DP-1 1920x1080

This added the resolution on my list and then I activated that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.