LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I set the default resolution? (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-set-the-default-resolution-8886/)

DFrey 11-18-2001 04:03 PM

How can I set the default resolution?
 
I installed RH 7.1, and the video drivers from NVIDIA. So far no problems, all works well. Just one little nagging annoyance. X starts up in 640x480 and I'd like it to start in 1024x768. Now according to the man file on XF86Config, the first valid mode listed in the Display subsection is used as the default mode. Xconfigurator set it up with 640x480 as first, and 1024x768 as last. So I decided to reverse the order of the modes in order to make 1024x768 the default. I rebooted and now all the sudden, I'm getting errors with gdm. The message indicates that gdm was already running and was mysteriously killed. It tries to start 5 times, waits 3 seconds and tries again 5 times and so on. Eventually this process gets put to sleep for 5 minutes and gives me a chance to login through the console. I put back the original XF86Config file, and went into /var/run to delete gdm.pid, and then rebooted. But gdm was still failing to start. So, being a newbie I just decided to reinstall RH and the NVIDIA drivers. So I'm back to square one. How can I set the default resolution to 1024x768? Is there some command I can add to a script to change the mode?

webtoe 11-18-2001 04:35 PM

here is the section of Your XF86Config file you need to edit.

the DefaultDepth is the Default Depth of resolution. i have mine at 24bits (which is what you probably want). XFree will use the resolutions in that section as default starting with the first in the list. With mine this is 1024x768. just delete the ones that you don't want.

Code:

Section "Screen"
    Identifier  "Screen 1"
    Device      "GEFORCE 2 PRO"
    Monitor    "M70"
    DefaultDepth 24

    Subsection "Display"
        Depth      8
        Modes      "640x480" "800x600" "1024x768" "1280x1024"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth      16
        Modes      "640x480" "800x600" "1024x768" "1280x1024"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth      24
        Modes      "1024x768" "1280x1024"
        ViewPort    0 0
    EndSubsection
EndSection


DFrey 11-18-2001 05:13 PM

Thaks for the reply, but is there any way I can keep the 640x480 mode? I'd like to keep it for games. Perhaps there is a command to simulate a Ctrl/Alt/- ?

acid_kewpie 11-18-2001 06:25 PM

what do you mean simulate?? you can reverse teh res order in xf86config-4 and then just restart X, shouldn't be anything else to it than that. if the res doesn't work, it should use the next one anyway.

DFrey 11-18-2001 06:46 PM

Whenever I try to reverse the modes in the display subsection, X fails to start, actually gdm fails to start like I describe in the original post above. In the default config, all the modes work, I just don't like the order the modes are in. And whenever I change the order, gdm fails to start. I know that doesn't make sense, as I can't figure out what XF86Config-4 has to do with gdm starting. For example this doesn't work for me:
Code:

...
Section "Screen"
    Identifier  "Screen 1"
    Device      "NVIDIA TNT"
    Monitor    "Sony 100ES"
    DefaultDepth 24

    Subsection "Display"
        Depth      8
        Modes      "1024x768" "800x600" "640x480"
    EndSubsection
    Subsection "Display"
        Depth      16
        Modes      "1024x768" "800x600" "640x480"
    EndSubsection
    Subsection "Display"
        Depth      24
        Modes      "1024x768" "800x600" "640x480"
    EndSubsection
EndSection

but of course this does (but in an order I don't like):
Code:

...
Section "Screen"
    Identifier  "Screen 1"
    Device      "NVIDIA TNT"
    Monitor    "Sony 100ES"
    DefaultDepth 24

    Subsection "Display"
        Depth      8
        Modes      "640x480" "800x600"  "1024x768"
    EndSubsection
    Subsection "Display"
        Depth      16
        Modes      "640x480" "800x600"  "1024x768"
    EndSubsection
    Subsection "Display"
        Depth      24
        Modes      "640x480" "800x600"  "1024x768"
    EndSubsection
EndSection


acid_kewpie 11-19-2001 02:33 AM

you may need to change DefaultPdeth down to only 16, i'm not sure my geforce cards actually likes being in 24bpp either.

and xf86config-4 will affect gdm as gdm is an x application, so X is needed...


All times are GMT -5. The time now is 10:47 AM.