Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yanwei07/30fe19a50ec58ed4712df1a7b39e4360 to your computer and use it in GitHub Desktop.
Save yanwei07/30fe19a50ec58ed4712df1a7b39e4360 to your computer and use it in GitHub Desktop.
How to Set A Custom Screen Resolution in Ubuntu Desktop
1. run command: xrandr
it output current screen resolution as well as available solutions. All we need here is the display device name.
examle device name : virtual1.
2. Run command to calculate VESA CVT mode lines by given resolution which you will add value, example :
sudo cvt 1600 900
if your device support this resolution, terminal would output it's ability. look follow output:
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
3. run command:
sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
4. Now add the new created mode for your display device:
sudo xrandr --addmode virtual1 "1920x1080_60.00"
5. Finally Apply the new resolution in the Display settings.( set from destop UI)
6. To make Ubuntu remember the new created screen resolution at next start,
you have to edit the .profile via command:
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
sudo xrandr --addmode virtual1 "1920x1080_60.00"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment