Change display resolution on linux

How do I change the screen resolution using Ubuntu command line?

I installed Ubuntu and the resolution of the desktop is so big that it only shows about 50% of the screen, but is shows up normal while using command line. What should I type in the command line to change the desktop screen resolution?

What do you mean by «while using command line»? That is, when and how to you get to the command line?

4 Answers 4

Enumerate the names of all your video outputs, and the possible resolutions for those currently connected to a monitor:

Choose the name of the output you wish to change the resolution of, and:

xrandr --output --mode 1024x768 

Note: If running from a text terminal, that is not running in gfx environment, you’ll have to add a -d :0 parameter, i.e:

xrandr -d :0 -q xrandr -d :0 --output --mode 1024x768 

xrandr —output `xrandr | grep » connected»|cut -f1 -d» «` —mode 1920×1080 if you want a one-liner that auto-detects output.

Create a new resolution using cvt

$> cvt 1600 900 75 1600x900 74.89 Hz (CVT 1.44M9) hsync: 70.55 kHz; pclk: 151.25 MHz Modeline "1600x900_75.00" 151.25 1600 1704 1872 2144 900 903 908 942 -hsync +vsync 

Add a new mode to the existing list (newmode is the name and remaining portion is)

$ sudo xrandr --newmode "1600x900_75.00" 151.25 1600 1704 1872 2144 900 903 908 942 -hsync +vsync 
$ xrandr | grep -e " connected [^(]" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/" Virtual1 

Add new display mode where is the output from the previous command

$ sudo xrandr --addmode 1600x900_75.00 

This will add the new resolution to your existing list of supported resolutions. You can then choose the right option from the «display settings» or the following command

$ xrandr --output Virtual1 --mode "1600x900_75.00" 

To make this change permanent,

$ cat> ~/.xprofile sudo xrandr --newmode "1600x900_75.00" 151.25 1600 1704 1872 2144 900 903 908 942 -hsync +vsync sudo xrandr --addmode Virtual1 1600x900_75.00 xrandr --output Virtual1 --mode "1600x900_75.00" 

The command to change the resolution works, however the permanent part doesn work for me. The .xprofile has the command but the resolution is not set automatically after the reboot.

The answers here don’t seem to help my situation. The above does not change the size of my cursor or how fuzzy my screen is. Is there a hardware check that someone can suggest?

upvoted for the command for finding the current display. The top answer just says to do xrandr -q , the output of which can be difficult to parse visually when your screen’s resolution is stuck at the wrong size.

Читайте также:  Linux 777 на файл

I know it is an old question but, for me, the simple stuff was to do:

$ xrandr -q SZ: Pixels Physical Refresh 0 1024 x 768 ( 271mm x 201mm ) 75 70 60 1 800 x 600 ( 271mm x 201mm ) 85 75 72 60 56 2 640 x 480 ( 271mm x 201mm ) 85 75 72 60 *3 832 x 624 ( 271mm x 201mm ) *74 4 720 x 400 ( 271mm x 201mm ) 85 5 640 x 400 ( 271mm x 201mm ) 85 6 640 x 350 ( 271mm x 201mm ) 85 

Or something equivalent. The * marks the screen resolution currently used. To change it to one of the supported resolutions from the list above simply run the command:

and the resolution is changed.

Sometimes when there are a lot of refresh rates (the numbers to the right in the above sample results from xrandr -q ), you need to specify the refresh rate. In that case, you should run the command:

If you have multiple outputs on your board, or the device is not reacting, then you can extend the above line with output. The value for the output is still found with xrandr -q , in my case HDMI-0 . The command therefore becomes:

xrandr -s 800x600 -r 85 --output HDMI-0 

Источник

Change the resolution or orientation of the screen

You can change how big (or how detailed) things appear on the screen by changing the screen resolution . You can change which way up things appear (for example, if you have a rotating display) by changing the rotation .

  1. Open the Activities overview and start typing Displays .
  2. Click Displays to open the panel.
  3. If you have multiple displays and they are not mirrored, you can have different settings on each display. Select a display in the preview area.
  4. Select the orientation, resolution or scale, and refresh rate.
  5. Click Apply . The new settings will be applied for 20 seconds before reverting back. That way, if you cannot see anything with the new settings, your old settings will be automatically restored. If you are happy with the new settings, click Keep Changes .

Orientation

On some devices, you can physically rotate the screen in many directions. Click Orientation in the panel and choose from Landscape , Portrait Right , Portrait Left , or Landscape (flipped) .

If your device rotates the screen automatically, you can lock the current rotation using the button at the bottom of the system menu . To unlock, press the button

Resolution

The resolution is the number of pixels (dots on the screen) in each direction that can be displayed. Each resolution has an aspect ratio , the ratio of the width to the height. Wide-screen displays use a 16∶9 aspect ratio, while traditional displays use 4∶3. If you choose a resolution that does not match the aspect ratio of your display, the screen will be letterboxed to avoid distortion, by adding black bars to the top and bottom or both sides of the screen.

Читайте также:  Лучший linux ноутбук 2020

You can choose the resolution you prefer from the Resolution drop-down list. If you choose one that is not right for your screen it may look fuzzy or pixelated .

Native Resolution

The native resolution of a laptop screen or LCD monitor is the one that works best: the pixels in the video signal will line up precisely with the pixels on the screen. When the screen is required to show other resolutions, interpolation is necessary to represent the pixels, causing a loss of image quality.

Refresh Rate

The refresh rate is the number of times per second the screen image is drawn, or refreshed.

Scale

The scale setting increases the size of objects shown on the screen to match the density of your display, making them easier to read. Choose 100% or 200% .

Источник

How to Set A Custom Screen Resolution in Ubuntu Desktop

Is your screen (or external monitor) resolution is low? thus making the items on your screen look larger and less clear? Or do you want to simply increase the current maximum resolution or add a custom resolution?

In this article, we will show how to add missing or set custom display resolution in Ubuntu and its derivatives such as Linux Mint. By the end of this article, you will be able to set to a higher resolution, making content on your screen appear sharper and clearer.

Changing the Resolution or Orientation of the Screen Using Displays

Normally, to change the resolution or orientation of the screen, you can use the Displays graphical user interface tool (open the Activities overview and type Displays, click to open it or System Menu then type Displays and open it).

Note: In case you have multiple displays connected to your computer (as shown in the following image), if they are not mirrored, you can have different settings on each display. To change the settings for a display device, select it in the preview area.

Next, select the resolution or scale you want to use, and choose the orientation then click Apply. Then select Keep This Configuration.

Change Screen Resolution in Ubuntu

Changing the Resolution or Orientation of the Screen Using Xrandr

Alternatively, you can also use the powerful xrandr tool (a command-line interface to RandR (Resize and Rotate) X Window System extension) which is used to set the size, orientation and/or reflection of the outputs for a screen.

You can also use it to set the screen size or list all active monitors as shown.

$ xrandr --listactivemonitors

To show the names of different outputs available on your system and resolutions available on each, run xrandr without any arguments.

List Available Screen Resolutions in Ubuntu

Set Screen Resolution in Ubuntu

To set the resolution for a screen for an external monitor named DP-1 to 1680×1050, use the —mode flag as shown.

$ xrandr --output DP-1 --mode 1680x1050

You can also set the refresh rate using the —rate flag as shown.

$ xrandr --output DP-1 --mode 1680x1050 --rate 75

You can also use the —left-of , —right-of , —above , —below , and —same-as options to arrange your screens either relatively to each other.

Читайте также:  Linux who uses file

For example, I want my external monitor (DP-1) to be positioned left of the Laptop screen (eDP-1) in correspondence to the actual physical positioning:

$ xrandr --output DP-1 --left-of eDP-1

Keep in mind that any changes made using xrandr will only last until you log out or restart the system. To make xrandr changes persistently, use the xorg.conf configuration files for Xorg X server (run man xorg.conf for details on how to create a xorg.conf file) – this is the most effective method.

You can also use the ~/.xprofile file (add xrandr commands in it), however, there are some disadvantages of using this method, one is that this script is read fairly late in the startup process, thus it will not alter the resolution of the display manager (if you use one e.g lightdm).

How to Add Missing or Set Custom Display Resolution Using xrandr

It is possible to add a missing or custom display resolution e.g 1680 x 1000 to Displays panel, for a specific display device (DP-1), as explained below.

Add Missing Display Resolution in Ubuntu

To add a missing or custom display resolution, you need to calculate the VESA Coordinated Video Timing (CVT) modes for it. You can do this using the cvt utility as follows.

For example, if you need a horizontal and vertical resolution of 1680 x 1000, run the following command.

Next, copy the Modeline (“1680x1000_60.00″ 139.25 1680 1784 1960 2240 1000 1003 1013 1038 -hsync +vsync) from the output of the cvt command and use it to create a new mode using the xrandr as shown.

$ xrandr --newmode "1680x1000_60.00" 139.25 1680 1784 1960 2240 1000 1003 1013 1038 -hsync +vsync

Then add the new mode to the display.

$ xrandr --addmode DP-1 "1680x1000_60.00"

Add Missing Resolution in Ubuntu

Now open the Displays and check if the new resolution has been added.

Verify Resolution

The above changes are only temporary and work for the current session (they last until you log out or restart the system).

To add the resolution permanently, create a script called external_monitor_resolution.sh in the directory /etc/profile.d/.

$ sudo vim /etc/profile.d/external_monitor_resol.sh

Then add the following lines in the file:

xrandr --newmode "1680x1000_60.00" 139.25 1680 1784 1960 2240 1000 1003 1013 1038 -hsync +vsync xrandr --addmode DP-1 "1680x1000_60.00"

Save the changes and exit the file.

For more information on how xrandr works and how to use it, read its man page:

That brings us to the end of this article. If you have any thoughts to share or queries, reach us via the feedback form below.

Источник

Оцените статью
Adblock
detector