38

I'm running Ubuntu 16.04.5 LTS on this system

Processor: Intel Core i5-7400

Mainboard: H110M-Gaming3-CF

The problem is the highest resolution it can go up to is 1024x768, which is terrible. How can I set my resolution to a higher resolution (i.e. FHD which fits my screen)? Thanks.

1
  • Please edit your post and show sudo lshw -C display
    – waltinator
    Commented Sep 21, 2018 at 19:45

4 Answers 4

97

Ubuntu or the other versions of it like (k,l,x,edu,etc.,) are required to add the resolution we want to set on some monitors.

So follow my steps:-

  1. Open a Terminal by CTRL+ALT+T

  2. Type xrandr and ENTER

  3. Note the display name usually VGA-1 or HDMI-1 or DP-1

  4. Type cvt 1920 1080 (to get the --newmode args for the next step) and ENTER

  5. Type sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync and ENTER

  6. Type sudo xrandr --addmode VGA-1 "1920x1080_60.00" and ENTER (replace VGA-1 with your display type (step 3) like HDMI-1 or DP-1)

  7. Now close the terminal and go to Settings >> Display settings and change it to 1920x1080

  8. Enjoy FHD.

To make the above settings stick when you restart your computer, do the following.

For integrated displays

  • goto your terminal and type vim ~/.profile ENTER
  • Paste in the shell command from step 5 and 6, then save.

For external displays

  • create a script called external_monitor_resolution.sh in the directory /etc/profile.d/. using sudo vim /etc/profile.d/external_monitor_resol.sh.

  • Paste in the shell command from step 5 and 6, then save.

(Note: if using sudo would require you typing a password, your system might freeze on startup while waiting for you to input a password. So when pasting do away with the sudo) Something like this:

xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode VGA-1 "1920x1080_60.00"` 

and ENTER (replace VGA-1 with your display type (step 3) like HDMI-1 or DP-1)

18
  • 3
    Thanks a lot! It's DP-1, I had been trying VGA-1 like forever
    – Tri Nguyen
    Commented Sep 14, 2018 at 6:37
  • 1
    My screen went to FHD right after the last command, no restart or Setting > Display needed.
    – Tri Nguyen
    Commented Sep 14, 2018 at 9:37
  • 1
    Oh if you don't want that to happen just goto Terminal and type gedit ~/.profile and add the lines from step 4 and 5 line by line. Peace!
    – AbdulR
    Commented Sep 14, 2018 at 9:44
  • 1
    Having the same problem on my laptop. Unfortunately, adding the three lines above (like e.g. TriNguyen in comment above) resulted in ubuntu not loading at all: no loading screen, just black. I had to type ctrl-alt-F2 and log in via terminal, change the .profile back, and then it worked. It is just very strange and frustrating that ubuntu does not add the res. choices in settings. Any new information into fixing this problem, or is making xrandr mods permanent like in the above comment the best one? Commented Dec 14, 2019 at 12:06
  • 2
    Instead of going to Settings >> Display (in my case, with kubuntu, I did not have the new mode) you can type xrandr --output VGA-1 --mode 1920x1080_60.00
    – xiawi
    Commented Apr 8, 2020 at 20:17
3

Answer from @ARTube perfect and guys who are facing the problem after editing .profile please follow the comment from Christopher.L

Then add the 5th and 6th line to your .profile without sudo command and save then restart it will work fine.

eg:

xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync 
xrandr --addmode VGA-1 "1920x1080_60.00"
3

A better way than creating a script would be to configure X properly.

  1. Reboot in recovery mode
  2. Create a new xorg.conf file Xorg -configure
  3. Reboot in graphical mode.
  4. From a terminal, generate the proper settings for your desired resolution using gtf command gtf 1600 1200 60.
  5. Copy the output and using your favorite editor add it to the section Monitor of the file we create step 2 Ex: sudo vi /root/xorg.conf.new
  6. Move the file to /etc/X11 folder sudo mv /root/xorg.conf.new /etc/X11/xorg.conf
  7. Reboot.

And that's it should now be able see your new resolution in your display settings.

The full procedure is described here

1

Based on @AbdulR's solution, I built a simple script that may be useful to automate the creation of the new mode (I named it "fixvga.sh"):

#!/bin/bash
DEVICE=$1
if [ "$1" == "" ] ; then 
    DEVICE="DP-1"  
fi
MODELINE=\"$(cvt 1920 1080 | grep -e "^#" -v | cut -d '"' -f 2-)
MODENAME=$(echo $MODELINE | cut -d " " -f 1)
MODEPARAMS=$(echo $MODELINE | cut -d " " -f 2-)
sudo xrandr --newmode $MODENAME $MODEPARAMS
sudo xrandr --addmode $DEVICE $MODENAME

Then, from the terminal, simply type:

./fixvga.sh VGA-1

Remember to replace "VGA-1" with the display you want to fix (in my case, "DP-1", which I made the default). After that, on Display Settings, you may be able to choose the 1920x1080 resolution on your display (as long as it supports it).

Enjoy!

You must log in to answer this question.

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