User Tools

Site Tools


Advertising

monitor_resolution

How to manually set a monitor resolution

Manual way

1. Check present resolution:

 xrandr -q

An example output is:

 VGA1 connected (normal left inverted right x axis y axis)
 1024x768       60.0 
 800x600        60.3     56.2 
 848x480        60.0 
 640x480        59.9 
 DP1 disconnected (normal left inverted right x axis y axis)

2. Generate ‘modeline’ using ‘gtf’ command:

 gtf width height refresh-frequency

Example:

 gtf 1366 768 60

The result is:

 1368x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 85.86 MHz
 Modeline "1368x768_60.00" 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync

Where is:

  • 1366 - width
  • 768 - height
  • 60 - refresh-frequency

3. Set your resolution copping the last output of gtf command, starting after Modeline:

 xrandr --newmode "1368x768_60.00" 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync
 xrandr --addmode VGA1 1368x768_60.00
 xrandr --output VGA1 --mode 1368x768_60.00

It is only temporary solution, after rebooting all the changes will be lost.


To make it permanent, do:

1. Crate a new file in your home directory, for example .mymonitor:

 nano .mymonitor

2. Copy previous 3 commands you used for manually setting the monitor, and paste onto the file:

 #! /bin/bash
 xrandr --newmode "1368x768_60.00" 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync
 xrandr --addmode VGA1 1368x768_60.00
 xrandr --output VGA1 --mode 1368x768_60.00

3. Make the file executable:

 chmod +x .mymonitor

4. Add the ~HOME/.mymonitor file to the system startup.

More information about XRandR can be found via commands:

 xrandr --help
 man xrandr

Randr/XRandr GUIs

There are a few frontends for Rand/XRandr, such as:

  • LXrandr

  • KDE Workspace Randr
  • Arandr

To install arandr use this command:

  sudo apt-get install arandr

Then open a terminal and enter:

  arandr
monitor_resolution.txt · Last modified: 2016/12/15 22:27 by crypto