Xrandr errors. BadName (named color or font does not exist) [closed]
Asked Answered
G

3

69

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.

Grigg answered 12/5, 2009 at 8:17 Comment(6)
have you solved this? I'm having a similar issue.Svend
Not yet. I cannot understand what is going wrong. I wrote a crappy script to change default fonts, different Xorg server configs and xrandr modes , and always failed. Sorry.Grigg
It's quite late but the thing is that my VGA output was absolutely burned :)Grigg
Would be good if this was moved to askubuntu because I spent ages looking there before I found this!Sip
I spend 2 hour to solve similar problem and problem was in vga cable. Replace vga cable I can change resolution to 1920x1080 without using xrandr or xorg it's very strange.Fenestrated
Same issue but solved it by: xrandr --newmode "1920" 220.64 1920 2056 2264 2608 1080 1081 1084 1128 -HSync +Vsync - Added quotes around the mode and made it shorter. No idea why thou, but it worked.Crawley
K
84

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.

Keramics answered 5/8, 2010 at 12:58 Comment(3)
your reply solved it for me. The name was 1920x1080_ok and I renamed it to 1920x1080-okFlossieflossy
Worked for me - I also had an underscore in the name (the default name produced by cvt)Sip
This should be marked as the answerCloutman
C
15

I had a similar problem, I believe it was because I had already created that setting before (then rebooted). If I skip that stage and go straight to:

$ xrandr --addmode LVDS1 1280x720

in the terminal it does it straight away, maybe we were trying to create something that already exists in our system? If it's doing it on the first try though I can't come up with an explanation, sorry, I'm new to working with ubuntu code, 9.04 worked perfectly, upgrading to 10.10 is a bit more of a headache!

Hope it works for someone else.

Compact answered 30/10, 2010 at 15:25 Comment(0)
S
3

A late chime in, but try using arandr instead. It may life easier using a visual configuration tool rather than the arcane configuration options of xrandr.

Season answered 22/8, 2011 at 4:55 Comment(2)
ARandR only offers some functionality of xrandr, so this suggestion is not helpful in this instance.Foot
Even though arandr has less functionality (just a simple example, it doesn't show the refresh rate) I was able to solve my problem. I couldn't solve it using xrandr. Would anyone have a reasonable explanation why that is ? AFAIK, arandr is just a UI in front of xrandrCasting

© 2022 - 2024 — McMap. All rights reserved.