VirtScreen icon indicating copy to clipboard operation
VirtScreen copied to clipboard

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

Open xnuken opened this issue 6 years ago • 16 comments

I cannot seem to make a virtual screen i am on arch running kernel 5.0.8

Creating a Virtual Screen... Error: ['xrandr', '--newmode', '1440x900_virt', '106.50', '1440', '1528', '1672', '1904', '900', '903', '909', '934', '-hsync', '+vsync'] X Error of failed request: BadName (named color or font does not exist) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 16 (RRCreateMode) Serial number of failed request: 45 Current serial number in output stream: 45

xnuken avatar Apr 21 '19 14:04 xnuken

Same error on Manjaro:

['xrandr', '--newmode', '1367x1024_virt', '115.50', '1368', '1448', '1592', '1816', '1024', '1027', '1037', '1063', '-hsync', '+vsync'] X Error of failed request: BadName (named color or font does not exist) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 16 (RRCreateMode) Serial number of failed request: 37 Current serial number in output stream: 37

Rafael-Martins avatar Apr 22 '19 23:04 Rafael-Martins

Did you find a fix?

xnuken avatar Apr 29 '19 13:04 xnuken

Hi guys, could you tell me the desktop environment (e.g. Gnome, KDE...) you use?

kbumsik avatar May 30 '19 07:05 kbumsik

I am using kde

xnuken avatar Jun 09 '19 20:06 xnuken

I'm having the same error using Gnome. Some Google suggested that, for some reason, it's caused by an underscore in the mode name. Sure enough, running xrandr --newmode "1368x1024_virt" 115.50 1368 1448 1592 1816 1024 1027 1037 1063 -hsync +vsync (the same command VirtScreen runs) fails, while running xrandr --newmode "1368x1024-virt" 115.50 1368 1448 1592 1816 1024 1027 1037 1063 -hsync +vsync (same thing but with the _ replaced with -) worked fine.

beiju avatar Jun 09 '19 23:06 beiju

Thank for your great job first, and I wonder is there any progress about this, I have the same mistake on ubuntu 18.04. @kbumsik

penguinbing avatar Sep 19 '19 12:09 penguinbing

xrandr does not like the name for the mode, reran the exact command in terminal just replacing the name and it runs fine.

aTosser avatar Oct 16 '19 19:10 aTosser

Any chance you could change the suffix VIRT_SCREEN_SUFFIX = "_virt" to VIRT_SCREEN_SUFFIX = "-virt" ? in xrandr.py

Josempita avatar Nov 06 '19 10:11 Josempita

I also got the same problem on ubuntu 18.04

tiengtinh avatar Mar 23 '20 04:03 tiengtinh

Ping! Same on Ubuntu 20.04, Gnome 3.36

EriKWDev avatar Apr 13 '20 14:04 EriKWDev

Same issue on Ubuntu 20.04 no solution yet!

ashishpatel1992 avatar Jul 11 '20 12:07 ashishpatel1992

Any solution for this?

Curently same error on pop_os 20.10

BenHall-1 avatar Jan 07 '21 18:01 BenHall-1

same problem

zhouguannan avatar Mar 02 '21 09:03 zhouguannan

Hey,

Y'all might want to check ~/.profile of your user account --uid 1000 for something like this:

xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync xrandr --addmode LVDS-1 1920x1080_60.00 xrandr --output LVDS-1 --mode "1920x1080_60.00"

Comment all three of those out or remove from .profile and add to .xprofile instead if not already there. I duplicated the problem the other day while force setting my resolution on my laptop and stumbled across your forum while looking for the cause of that same annoying error message.

Hope this helps.

Viper702 avatar Jul 09 '21 15:07 Viper702

THANK YOU!!!!!!!!!!

LeKing233 avatar May 24 '22 11:05 LeKing233

I'm having the same error using Gnome. Some Google suggested that, for some reason, it's caused by an underscore in the mode name. Sure enough, running xrandr --newmode "1368x1024_virt" 115.50 1368 1448 1592 1816 1024 1027 1037 1063 -hsync +vsync (the same command VirtScreen runs) fails, while running xrandr --newmode "1368x1024-virt" 115.50 1368 1448 1592 1816 1024 1027 1037 1063 -hsync +vsync (same thing but with the _ replaced with -) worked fine.

Confirmed again on 07/10/2023 - in this case, here it is verbatim:

after


$ cvt 2160 1215 90
# 2160x1215 89.93 Hz (CVT) hsync: 115.29 kHz; pclk: 341.25 MHz
# Modeline "2160x1215_90.00"  341.25  2160 2328 2560 2960  1215 1218 1223 1282 -hsync +vsync

then

$ xrandr --newmode "2160x1215_90.00"  341.25  2160 2328 2560 2960  1215 1218 1223 1282 -hsync +vsync
$ xrandr --addmode DP-1  "2160x1215_90.00"

doesn't work, but -

xrandr --newmode "2160x1215-90.00"  341.25  2160 2328 2560 2960  1215 1218 1223 1282 -hsync +vsync
xrandr --addmode DP-1 "2160x1215-90.00" 

works.

mant-is avatar Jul 11 '23 02:07 mant-is