XFree86 resolution question.
January 28, 2004 11:17 AM   Subscribe

Linux / XFree86 question: Where is the actual resolution that X selects by default defined? [more inside]

I've been trying to figure this out for a long, long time. Obviously, the list of possible resolutions / depths are stored in the /etc/X11/XFree86Config-4 file, but where is the system told which of the list of valid resolutions to select when X is started? Reason being, I have a line for 1280x1024 resolution in the above configuration file, but all X ever seems give me is 1024x768. Running Knoppix HD-install (Debian) on an Nvidia card.
posted by Jimbob to Computers & Internet (10 answers total)
 
i might be wrong about this, not knowing which nVidia card you have, but have you tried installing the nVidia drivers for linux from here?

this could be your problem.
posted by callicles at 11:24 AM on January 28, 2004


I have installed those drivers, and that part seems to be working fine (OpenGL is great, I get the "NVidia" splash screen when I start X), apart from the ability to select sensible resolutions. My experience with various graphical X-configuration utilities, by the way, is that they tend to switch off the accelerated nVidia drivers whenever I let them loose on my XFree86Config-4 file, so I'm a bit scared of them.
posted by Jimbob at 11:35 AM on January 28, 2004


As I understand, when X11 first starts up, it tries all of the video modes listed in your config file. That explains the momentary black screen you get get (accompanied on older monitors sometimes by popping and static) just before you get the default X11 crosshatch. The X11 daemon remembers from this startup test which video modes are available to it; the rest of the modelines are ignored. Once X11 is up and running, you can switch between the available video modes by pressing ctrl-alt-+ and ctrl-alt--, where the + and - keys are the ones on the numpad, not on the regular number row. So try this. If that gives you no satisfaction, you might have to do some modeline editing to get the correct scan rates for your 1280x1024 mode, which is being rejected by X11 at startup for some reason. This is a dark art, and I haven't done it in years (choosing instead to rely on various graphical X-configuration utilities), but I'm sure you can find help on Google.
posted by mr_roboto at 11:57 AM on January 28, 2004


I've always thought, and have always done it thus:

In the "Screen" section, I say what is the DefaultDepth I want (normally 16), and then, make a subsection that looks like:
Subsection "Display"
Depth 16
Modes "1152x864" "1024x768"
EndSubSection
The resolution that X starts in is the first mode listed (of course you can switch between the two modes with Ctrl-Alt-- and Ctrl-Alt-+). (Note, this is for X4, although my memory is that X3 worked almost the same).
posted by skynxnex at 12:01 PM on January 28, 2004


Mr_roboto: Okay, I think I understand (but surely there would be a simpler way for X to do it?) By the way, is there any particular graphical X-configuration utility you reccomend? In the past, I've had experience with the ones that come built into Lycoris Desktop/LX, and Mandrake, but both seemed to generate the configuration file from scratch, therefore wiping out the important lines defining the accelerated nVidia server, DRI extensions etc.

Skynxnex: Yeah I have that set up already - under "Display" I have the list of resolutions, depths etc. and the "1280x1024" is the first on the list, but it's never selected. I think there must be something wrong with it's modeline and, like Mr_Roboto says, X skips it because it doesn't work with the monitor.
posted by Jimbob at 12:05 PM on January 28, 2004


By the way, is there any particular graphical X-configuration utility you recommend?

I use the one that comes with Mandrake: is it called DrakeX? But yeah, you're right, it will overwrite your entire config file. What you might try doing is backing up your current config file, running the graphical configuration tool to create a new config file, and then comparing the modelines in the two files. You can then add any new 1280x1024 modelines that the configuration tool came up with to your old config file (with the lines for the nVidia server, etc.) manually. Then just move the old file to where the new file is, overwriting the new file, and restart X.

but surely there would be a simpler way for X to do it?

Uh-huh. And when have you known X to use the simple way to do anything?
posted by mr_roboto at 12:49 PM on January 28, 2004


The XF86 logfile should give you a hint what's happening; for example, it displays a clear message if it decides it can't use one of the resolutions you selected. You can probably find the logfile at /var/log/XFree86.0.log .

If you are forced to delve into the dark art of modeline hacking, you may find videogen helpful.
posted by Galvatron at 1:16 PM on January 28, 2004


The first resolution listed on the Modes line is the resolution set by default. The others are only used if you Ctrl-Alt-Plus and Ctrl-Alt-Minus to them or as fallbacks.

If you're not getting that resolution, the X driver (or framebuffer kernel driver, if you're using fb) could be buggy, the Modeline for the mode may be wrong (unlikely; the days where you had to fiddle with non-VESA modelines are long, long past unless you have truly ancient video hardware), or you don't have sufficient video memory for it, or -- if you're loading the DDC module -- your monitor is disrecommending it. Have a look in the XFree86.log and see what's happening when X is started.
posted by majick at 7:29 PM on January 28, 2004


Try x586config. It's pretty good at writing out the correct config files as long as you know your monitors refresh rates and your card info. If that doesn't work you can try XFree86 --configure which makes X autoprobe your hardware and write out a sample config file.
posted by PenDevil at 2:31 AM on January 29, 2004


Make that xf86config...
posted by PenDevil at 2:32 AM on January 29, 2004


« Older Document Management Solutions   |   How should I move on from spinning records at... Newer »
This thread is closed to new comments.