Failed to get size of gamma for output default when trying to add new screen resolution
Solution 1:
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 2:
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 3:
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.