As of May 31, 2023, we have updated our Code of Conduct.

Hot answers tagged

59 votes

How to disable global <Super>-p shortcut?

On Ubuntu 18.04, I found two different keybindings for SUPER+P, which can be disabled with dconf-editor. First, you need to install dconf-editor, if it's not already installed. This can be done in ...
David's user avatar
  • 691
44 votes

How do I save my new resolution setting with xrandr?

The accepted answer applies the same configuration regardless of the status of connected displays. This didn't work for me, as I'm connected to different displays at work and at home. autorandr allows ...
Teodor's user avatar
  • 553
39 votes
Accepted

How do I save my new resolution setting with xrandr?

You have several choices but perhaps the easiest is to place your command exactly as you have given above in your $HOME/.xprofile file. From this location it will be executed every time you login. By ...
andrew.46's user avatar
  • 36.7k
30 votes

Failed to get size of gamma for output default when trying to add new screen resolution

I tried almost all the answers with xrandr in English version, and I always have the same error message xrandr: Failed to get size of gamma for output default. Then, there is one solution in Chinese ...
Weijie Sun's user avatar
29 votes
Accepted

How to use "xrandr --gamma" for Gnome "Night Light"-like usage?

December 9, 2018 Update - sct I found source code for program sct which allows user to set color temperature. It has "cribbed the code" from redshift and provides mapping for red, green and ...
WinEunuuchs2Unix's user avatar
27 votes
Accepted

How to change display's position from command line?

Try this: xrandr --output eDPI1 --mode 1024x768 --pos 0x0 --rotate normal --output HDMI2 --mode 1366x768 --pos 1024x384 --rotate normal
Sergiy Kolodyazhnyy's user avatar
26 votes

How to run xrandr commands at startup in Ubuntu

Adding complicated commands to Startup Applications In General, you can add commands to run on start up (log in) by choosing: Dash > Startup Applications > Add. In this case, you have a complicated ...
Jacob Vlijm's user avatar
  • 82.1k
23 votes

How do I set a custom resolution?

How to set a custom resolution previously specified. After executing the other steps defined to create the resolution, run: xrandr -s 1680x1050
GuiRitter's user avatar
  • 331
21 votes

Mouse flickering on one of my two screens

Changing the scaling factor from 1x1 to 0.9999x0.9999 did the trick for me xrandr --output eDP-1 --scale 0.9999x0.9999
Aurélien Gasser's user avatar
20 votes

Xrandr message: Rate 144.0 Hz not available for this size

I had the same problem with my 144hz monitor. You might try using a full set of parameters. For example, to get my 2560x1440 screen to operate at 144hz, I had to do the following: Run xrandr to find ...
dwightjl's user avatar
  • 310
19 votes
Accepted

How can I list connected monitor(s) with xrandr?

I am not sure how you are going to apply it in your application ("enable a user to have their desired resolution without requiring graphics drivers" ?), but: A terminal command to list connected ...
Jacob Vlijm's user avatar
  • 82.1k
17 votes
Accepted

Why do xrandr errors "BadMatch", "BadName", "Gamma Failed" happen?

Minimum Info You are going to ask a question then add the link generated by this command sudo apt-get install pastebinit; sudo sh -c "lsb_release -sd; dmidecode -s system-product-name; echo ==; ...
user.dz's user avatar
  • 46.9k
14 votes

How do I set a custom resolution?

How to set a custom resolution previously specified when running multiple monitors. After executing the other steps defined to create the resolution, run: xrandr --output DVI-0 --mode 1680x1050 ...
zwessels's user avatar
  • 267
14 votes
Accepted

What does grep do?

From man grep (emphasis mine): grep searches the named input FILEs (or standard input if no files are named, or if a single hyphen-minus (-) is given as file name) for lines containing a match to ...
muru's user avatar
  • 191k
14 votes
Accepted

External monitor turns off for several seconds every 5-10 minutes

If your screen is switching off it might be struggling to keep sync with the output signal. There are two main reasons for this , the first is refresh rates being too high for the screen to keep up ...
Amias's user avatar
  • 5,177
13 votes

How to disable global <Super>-p shortcut?

Here's how to disable it with gsettings from your terminal gsettings set org.gnome.mutter.keybindings switch-monitor "[]" If you want to restore the shortcut gsettings set org.gnome.mutter....
Slim's user avatar
  • 447
12 votes

How do I set a custom resolution?

Thanks to thom and thirdender this is basically a single command configuration based on the most voted answer. RES="1920 1200 60" && \ DISP=$(xrandr | grep -e " connected [^(]" | sed -e "s/\([...
Tanasis's user avatar
  • 466
11 votes

How to run xrandr commands at startup in Ubuntu

According to this at the Now automate it on login section, I have made my own script 45custom_xrandr-settings and placed it into /etc/X11/Xsession.d/. It works fine for me under Ubuntu 14.04 LTS. You ...
ioaniatr's user avatar
  • 1,211
11 votes
Accepted

When will xrandr version 1.5.1 be available in Ubuntu?

Actually, unlike libXrandr.so.2, the xrandr program is far from being mission-critical. It's just an X client — an unprivileged app you could install into your home directory to avoid clobbering the ...
Ruslan's user avatar
  • 1,573
10 votes

What does grep do?

When you do: xrandr | grep " connected " you are basically redirecting the standard output (file descriptor 1, /dev/stdout) of xrandr to the standard input (file descriptor 0, /dev/stdin) of grep, ...
heemayl's user avatar
  • 89.8k
10 votes

Increment Brightness by value using xrandr

Copy bash script below to a file called bright Then mark it executable with chmod a+x bright Bash Script #!/bin/bash MON="DP-1-1" # Discover monitor name with: xrandr | grep " ...
WinEunuuchs2Unix's user avatar
9 votes

How to standby a monitor using xset in multi monitor setup?

Controlling individual monitors is not possible with xset ( and X11 actually) As the title suggests, it is not possible for reasons of how xset is built and due to the X11 functions it uses. If we ...
Sergiy Kolodyazhnyy's user avatar
8 votes
Accepted

Run script when monitor is connected

An alternative way to run a command if a screen is connected or disconnected An alternative solution would be to run a tiny background script. Running the script below in the background, I could not ...
Jacob Vlijm's user avatar
  • 82.1k
8 votes

How can I list connected monitor(s) with xrandr?

You can use the bash command with popen: import os list_display = os.popen("xrandr --listmonitors | grep '*' | awk {'print $4'}").read().splitlines() # or based on the comment of this answer ...
Antoine Boucher's user avatar
8 votes
Accepted

144Hz monitor stuck at 60Hz

Sometimes, you need to add the command in your configuration including all the parameters. I had the same issue. Adding xrandr --output DVI-I-2 --mode 1920x1080 --rate 144.00, where you of course ...
cbll's user avatar
  • 1,540
7 votes

How do I resolve desktop larger than screen?

NOTE: I'm answering this question because it is the first result that appears in a google search. I had this same problem and I spent ages searching for a way to fix it within Ubuntu to no avail. ...
Bamboo's user avatar
  • 171
7 votes
Accepted

Output of xrandr shows 1024x768+1366+0; what does it mean and can I change it?

As Muru mentions, the 1366 is the horizontal offset of your screen. How to read the output of xrandr An example: Imagine your two screens, placed together into a frame. Together, they will make a ...
Jacob Vlijm's user avatar
  • 82.1k
7 votes

Visual fatigue in Ubuntu

59.79 is really 60. Sometimes refresh rates are off of 60 by a tiny bit, but it shouldn't matter. Any visual fatigue you're experiencing could be fixed by using a different desktop environment, such ...
TheWanderer's user avatar
  • 19.3k
7 votes

How do I save my new resolution setting with xrandr?

The following simple configuration works for me, and when connected, my monitor automatically uses the correct resolution without any manual intervention. sudo nano /etc/X11/xorg.conf Note that this ...
Ben Mares's user avatar
  • 195
7 votes

Can I make a screen switch from one computer to another by cli?

If making the screen sleep works, then almost certainly the toggle- script below will work: #!/bin/bash # --- set your monitor below monitor=VGA-0 # --- if [ -z "$(xrandr | grep $monitor | grep +)" ];...
Jacob Vlijm's user avatar
  • 82.1k

Only top scored, non community-wiki answers of a minimum length are eligible