Xrandr errors. BadName (named color or font does not exist)

Jlbelmonte picture Jlbelmonte · May 12, 2009 · Viewed 72.6k times · Source

I was successfully using xrandr to extend my desktop in my work place with this little "script".

#!/bin/sh

xrandr --newmode 1920x1080  220.64  1920 2056 2264 2608  1080 1081 1084 1128  -HSync +Vsync
xrandr --addmode VGA 1920x1080
xrandr --output VGA --mode 1920x1080

Everything was going well till one day that magically stop working. When I try to use it. I just get this message.

X Error of failed request: BadName (named color or font does not exist)

The laptop display resizes in a strange way, but nothing happens with the extended monitor.

I've restored gnome desktop default config. I changed the font config, I tried with other layouts and monitors, but always occur the same.

Answer

Tom picture Tom · Aug 5, 2010

Have you tried using a different name for that mode? I was getting this error and tried using the name "1080p" (e.g. xrandr --newmode "1080p"...) instead of the "1920x1080" name that I usually use and it worked. I'm not sure what's causing the error, as the 1920x1080 mode isn't even listed by xrandr, nor can it be removed via --rmmode, but creating a new mode with a different name seemed to work for me.