Failed to get size of gamma for output default when trying to add new screen resolution
Solution 1
You don't need sudo
to register the new mode with xrandr
, try without sudo.
Then you'll have to apply the new resolution with:
xrandr --addmode <your_connection_type> 1200x1000_60.00
Where <your_connection_type>
is usually VGA1, DP1 or HDMI1. Check the output of xrandr
to know the exact name of the connected output.
Solution 2
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 saved my life, I just want to share that.
open the file
sudo nano /etc/default/grub
find the line
#GRUB_GFXMODE=640x480
edit 640x480 to your resolution eg: 1920x1080, remove the #
for example:
GRUB_GFXMODE=1920x1080
Update by the command
sudo update-grub
Then reboot your computer.
sudo reboot
Reference: https://blog.csdn.net/u013764485/article/details/78007370
Solution 3
I ve been pulling my hair out with this issue for some time. In my case I am running Kali Linux as a Live CD in VirtualBox and want to change the screen resolution.
:~$ xrandr --newmode "1200x900_60.00" 88.50 1200 1272 1392 1584 900 903 907 934 -hsync +vsync
Then check if the mode has been added:
:~$ xrandr
Screen 0: minimum 64 x 64, current 640 x 480, maximum 16384 x 16384
VGA-0 connected 640x480+0+0 0mm x 0mm
640x480 60.0*+ 60.0*
1600x1200 60.0
1440x1050 60.0
1280x960 60.0
1024x768 60.0
800x600 60.0
1200x900_60.00 (0x1b2) 88.5MHz
h: width 1200 start 1272 end 1392 total 1584 skew 0 clock 55.9KHz
v: height 900 start 903 end 907 total 934 clock 59.8Hz
Next assign it to the video output. This was listed in the previous step and in this case is VGA-0. With a LiveCD it may also be Default
:~$ xrandr --addmode VGA-0 1200x900_60.00
:~$ xrandr
Screen 0: minimum 64 x 64, current 640 x 480, maximum 16384 x 16384
VGA-0 connected 640x480+0+0 0mm x 0mm
640x480 60.0*+ 60.0*
1600x1200 60.0
1440x1050 60.0
1280x960 60.0
1024x768 60.0
800x600 60.0
1200x900_60.00 59.8
If you get the error:
xrandr: Failed to get size of gamma for output default
Then try restarting X Server:
:~$ killall Xorg
And the new resolution now appears in the Monitor Setting resolution options.
Solution 4
If you have an nVidia or ATI GPU, have you tried changing your driver, either from proprietary to non-proprietary or vice versa?
My system:
~$ inxi -G
Graphics: Card: NVIDIA C61 [GeForce 7025 / nForce 630a]
X.Org: 1.15.1 drivers: nouveau (unloaded: fbdev,vesa) Resolution: [email protected]
GLX Renderer: Gallium 0.4 on NV4C GLX Version: 2.1 Mesa 10.1.3
Depending on what kernel/distribution I am running, sometimes the proprietary nVidia 304 driver works, on others, e.g. Bodhi 3.0, with the same setup, can fail to read properly the size of the screen and also fail to read the gamma.
You can try to set your output with the following line, which will at least fix your error report, but may not fix your output:
xrandr --output default --gamma 0:0:0 --mode 1200x1000
You may also want to install the inxi utility and post the output of inxi -G
here for more help.
Solution 5
Just install NVIDIA driver
sudo apt-get update
sudo apt-get install inxi
Then in the next command, replace 361 with the right driver. You can find this from the NVIDIA site or inxi -G
.
sudo apt-get install nvidia-361
Once you update, run
sudo killlall Xorg
Related videos on Youtube
Arsen Zahray
Updated on September 18, 2022Comments
-
Arsen Zahray over 1 year
I'm trying to adjust resolution on my new MSI GT70 2OC. In settings, only one resolution is available: 1920x1080. This is fine, except that I need to decrease the resolution and make it more rectangular for the laptop to work well with my old PL-550 tablet.
Here's what I do:
cvt 1200 1000 60 # 1200x1000 59.91 Hz (CVT) hsync: 62.19 kHz; pclk: 99.50 MHz Modeline "1200x1000_60.00" 99.50 1200 1280 1400 1600 1000 1003 1013 1038 -hsync +vsync sudo xrandr --newmode "1200_1000_60" 99.50 1200 1280 1400 1600 1000 1003 1013 1038 -hsync +vsync xrandr: Failed to get size of gamma for output default
How do I get past this step?
UPDATE Here's the output of
xrandr
:xrandr: Failed to get size of gamma for output default Screen 0: minimum 1920 x 1080, current 1920 x 1080, maximum 1920 x 1080 default connected primary 1920x1080+0+0 0mm x 0mm 1920x1080 0.0*
-
Sylvain Pineau about 10 yearsI'm pretty sure that this msg (the gamma size) is harmless, did you try to apply the new mode with
xrandr --addmode
? -
Arsen Zahray about 10 yearsyes, you were absolutely right! But, now I'm getting another message.
1200x1000 doesn't fit between 1920x1080 and 1920x1080
. Any idea what I can do about that? -
Arsen Zahray about 10 yearsI'm getting that message when I'm trying to change the resolution to 1200x1000 in the settings
-
kurdtpage over 6 years"VGA-1" worked for me (note the dash)
-
J. Starnes over 6 yearsWelcome to Ask Ubuntu! In its current form your answer is not as good as it could be. Could you review How to Write a Good Answer, and Style guide for questions and answers. For example you could add how to identify "orphaned dependencies" . - From Review
-
aerin over 6 yearsrunning your command broke my Ubuntu.
-
Bhaskar over 4 yearsIDK why but this worked like a charm!
-
Mike Lowery almost 4 yearsHad a similar issue upgrading openSUSE where my old NVIDIA card was no longer supported and I still had the proprietary G03 drivers installed from the previous version. After trying several things without success, I finally uninstalled those files and rebooted. The system then came up using the correct resolution under the nouveau driver.
-
Mike Lowery almost 4 yearsNote where the
xrandr
output says "default connected primary". The word default should instead say something like "VGA-1" or "HDMI-1", otherwise something is not configured correctly (or at least that was my experience having outdated NVIDIA drivers installed). -
DalyaG almost 4 yearsThanks!!! You saved my day!!
-
metsburg over 3 yearsThis works perfectly! Thanks a lot.
-
metamaker over 2 yearsI don't know what happened in case of Aerin, but in my case linux properly added all display modes after
killall Xorg
. -
SAIF AHMED ANIK over 2 yearsThis solution works, if your driver is selected as
X.org X server
-
Paolo about 2 yearsNot working for me on ubuntu 20.04
-
swallowroot about 2 yearsWorked fine for me! Luckily, this time I didn't have to install Ubuntu again :-)