Advertisement

[Linux] Error when switching to higher resolutions

Started by March 31, 2007 07:30 PM
4 comments, last by Zakwayda 17 years, 7 months ago
Hi all, I've run into an apparent problem with my Linux system configuration that I thought someone here might be able to help with (as this post will probably reveal, I'm fairly new to Linux). I originally posted this over at LinuxQuestions.org (as it seemed like it might be more 'on topic' in the hardware forums there), but didn't get any replies. The problem I've encountered is that whenever an application attempts to switch to a resolution higher than the current desktop resolution, the application quits with the following error:
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  134 (XFree86-VidModeExtension)
  Minor opcode of failed request:  10 (XF86VidModeSwitchToMode)
  Value in failed request:  0x4c
  Serial number of failed request:  112
  Current serial number in output stream:  114
At first I thought it was due to a problem with my code (I'm using SDL), but I've since observed that the same thing happens with other games as well. My Google search on the topic did turn up this thread on another forum (it appears to refer to the exact same problem), but I haven't been able to find a solution. I'm using Fedora 5, and the card is an Intel i810. Here's the xorg.conf file:

# Xorg configuration created by system-config-display

Section "ServerLayout"
	Identifier     "single head configuration"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"

# Multiple FontPath entries are allowed (they are concatenated together)
# By default, a font server independent of the X server is
# used to render fonts.
	FontPath     "unix/:7100"
EndSection

Section "Module"
	Load  "dbe"
	Load  "extmod"
	Load  "fbdevhw"
	Load  "glx"
	Load  "record"
	Load  "freetype"
	Load  "type1"
	Load  "dri"
EndSection

Section "InputDevice"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
#	Option	"Xleds"		"1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
#	Option	"XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults).  For example, for a non-U.S.
# keyboard, you will probably want to use:
#	Option	"XkbModel"	"pc102"
# If you have a US Microsoft Natural keyboard, you can use:
#	Option	"XkbModel"	"microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
#	Option	"XkbLayout"	"de"
# or:
#	Option	"XkbLayout"	"de"
#	Option	"XkbVariant"	"nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
#	Option	"XkbOptions"	"ctrl:swapcaps"
# Or if you just want both to be control, use:
#	Option	"XkbOptions"	"ctrl:nocaps"
#
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option	    "XkbModel" "pc105"
	Option	    "XkbLayout" "us"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "IMPS/2"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5"
	Option	    "Emulate3Buttons" "yes"
EndSection

Section "Monitor"

 ### Comment all HorizSync and VertSync values to use DDC:
 ### Comment all HorizSync and VertSync values to use DDC:
 ### Comment all HorizSync and VertSync values to use DDC:
 ### Comment all HorizSync and VertSync values to use DDC:
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Dell E171FP"
	DisplaySize  340	270
 ### Comment all HorizSync and VertSync values to use DDC:
	HorizSync    30.0 - 80.0
	VertRefresh  56.0 - 76.0
	Option	    "dpms"
EndSection

Section "Device"
	Identifier  "Videocard0"
	Driver      "i810"
	VendorName  "Videocard vendor"
	BoardName   "Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Videocard0"
	Monitor    "Monitor0"
	DefaultDepth     24

	SubSection "Display"
		Viewport   0 0
		Depth     16
		Modes    "1280x1024"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Modes    "1280x1024"
	EndSubSection
EndSection

Section "DRI"
	Group        0
	Mode         0666
EndSection

I tried adding to and re-arranging the modes listed in the 'screen' section, but this had no effect. Any tips or suggestions as to how I might go about solving this problem? Thanks, Jesse
Looks to me (and I'm not an expert, but I do encounter with video problems a lot) like the X client code is trying to use an XF86 extension but the server is an x.org server.

If you're going to use an x.org server, you might want to find or build client libraries that use x.org extensions. There's no reason to believe one vendor's extensions are supported or compatible with another vendor's extensions.

I suspect the problem lies in SDL. Can you get a newer version? Can you check the changelogs for a switch to x.org extensions from XFree86?

--smw

Stephen M. Webb
Professional Free Software Developer

Advertisement
Quote: Original post by Bregma
Looks to me (and I'm not an expert, but I do encounter with video problems a lot) like the X client code is trying to use an XF86 extension but the server is an x.org server.

If you're going to use an x.org server, you might want to find or build client libraries that use x.org extensions. There's no reason to believe one vendor's extensions are supported or compatible with another vendor's extensions.

I suspect the problem lies in SDL. Can you get a newer version? Can you check the changelogs for a switch to x.org extensions from XFree86?

--smw
Thanks for the reply Bregma. I figured it was an SDL problem as well, but applications that don't use SDL appear to exhibit the same behavior, so I'm not sure.

You've given me some things to look into though, so I'll do some more research.

Thanks for the help! :)
Hmm, it looks to me as if the only supported resolutions for your xserver are 1280x1024x16 and 1280x1024x24. Since the "DefaultDepth" is 24, your default resolution is 1280x1024x24.
Now, a look at the specs of your monitor (found here) shows me, that the possible resolutions for that monitor are:

1280 x 1024 (SXGA)
1024 x 768 (XGA)
800 x 600 (SVGA)
640 x 480 (VGA)

So it is not possible to switch to a higher resolution, because your default resolution is already the highest possible supported by your monitor (and even if your monitor supported a higher resolution, it would still be out of range for the xserver, because it is not specified in your xorg.conf).

But maybe I misread the problem (again) and you know that already. So I will now just tell you my experience with xserver-xorg:

I use Xorg with XFree86-VidModeExtension (in combination) too and changing resolutions (to higher or lower resolutions of my current desktop resolution) works fine, so I think, that your problem is not using XFree86-VidModeExtension in combination with Xorg.

The "Screen" section of my xorg.conf:

Section "Screen"        Identifier      "Default Screen"        Device          "AsusN6200"        Monitor         "EizoFlexScanF67"        DefaultDepth    24        SubSection "Display"                Depth           1                Modes           "1024x768" "800x600" "640x480"        EndSubSection        SubSection "Display"                Depth           4                Modes           "1024x768" "800x600" "640x480"        EndSubSection        SubSection "Display"                Depth           8                Modes           "1024x768" "800x600" "640x480"        EndSubSection        SubSection "Display"                Depth           15                Modes           "1024x768" "800x600" "640x480"        EndSubSection        SubSection "Display"                Depth           16                Modes           "1024x768" "800x600" "640x480"        EndSubSection        SubSection "Display"                Depth           24                Modes           "1024x768" "800x600" "640x480"        EndSubSectionEndSection


I can switch back and forth between the different screen resolutions without a problem (btw. you can use 'Ctrl-Alt--' and 'Ctrl-Alt-+' to switch the xserver to a higher or lower resolution respectively as a shortcut).

To be able to use different resolutions, they must all be listed in the 'Modes' field of the current specified depth or you'll get an "out of range" error.

I had a lot of trouble with my xserver when I started with linux, mostly because I wanted to do everything by myself (e.g. fill out all the conf files by hand). So if you're fairly new to linux, I would suggest using your package management system to re-/configure the packages (e.g. 'dpkg-reconfigure xserver-xorg'), instead of editing the config file directly by hand; this can save you a lot of trouble unless you know exactly what you're doing.

I hope this is somehow helpful. ;)
Since I've compiled manually Xorg from source, I can assure you that using parts of XFree86 is indeed the default (=> couldn't possibly be a problem).

I believe the error is quite sraight-forward. Look at your Screen section. There are only two subsections. If you know what your monitor is capable of, simply add more resolutions and colour depths. I think the previous post quoted some info from Dell's website about your monitor's capabilities. Add them (most probably yout monitor supports these resolutions in all colour depths) by simply copy-pasting and editing the resolution and the colour depth. When you're done, save your xorg.conf, close the applications that might save some data and restart your X server (this is probably done by pressing Ctrl+Alt+Backspace, see Fedora's online documentation, as I haven't used Fedora for quite a time). Don't forget to make a backup copy of your existing and working xorg.conf. This is done by (before you save it) typing (as a superuser)
cp -v /etc/X11/xorg.conf /etc/X11/xorg.conf.working.default
in a console window. If you've done some errors while editing xorg.conf, then restoring the original (and working) xorg.conf is just a matter of
cp /etc/X11/xorg.conf.working.default /etc/X11/xorg.conf
(of course, as a superuser).

Why is that? Well, Xorg uses a configuration file that tells the server your hardware's details. It's dumb, if you ask me, but that's the way it works. So, if you do not tell it (it's a very good idea to think of your computer as a moron) exactly (with some exceptions) what your monitor is capable of, it wouldn't know how to use it. In your case, you've told him to use one and only one resolution, so the moron uses one and only one resolution, despite the fact it is capable of much more. Usually, GNU/Linux distributions do the autodetection of your hardware specs with external scripts/programs, then write the xorg.conf accordingly, and the casual user might never know of xorg.conf's existence. The fact that Fedora configured so poorly your system surprises me a lot. Even Debian, which was considered "a geek's distribution" not long ago, handles the autodetection much better.

Hope that helps.
Thanks to both of you for your replies.

I think I did try adding the resolutions manually at one point, but I may not have done it correctly. I'll try your suggestions and see if I have any better luck.

Thanks again.

This topic is closed to new replies.

Advertisement