LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-24-2005, 08:07 AM   #1
jhwhite
LQ Newbie
 
Registered: Aug 2005
Location: central North Carolina
Posts: 17

Rep: Reputation: 0
Set screen res to invalid value. No GUI


I've set up a Compaq laptop for dual boot between WinXP-HE and SuSE 9.3 and it looks like it works. But then I set the screen resolution to a bad value within the GUI (I set it to 1280x1024 when I wanted to change to 1280x768). Now the GUI no longer will comes up when I boot linux.

I looked in xorg.conf (and the backup copies of it) and they only list "default" for the screen resolution. Is there another configuration file somewhere where my erroneous entry is stored that I can edit to fix this problem.

Thanks for the help
joe
 
Old 08-24-2005, 11:01 AM   #2
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
In /etc/X11/xorg.conf, you should be able to find the following section.

Quote:
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768"
EndSubSection
EndSection
Look at DefaultDepth and find out at which depth it is defaulted to. Then, under SubSection "Display", look for the color depth, in my case, it is 24. Supported resolution is listed in "Modes". You can specify multiple screen resolution like this.

Quote:
Modes "1280x960" "1024x768" "800x600"
X reads the line from left to right. So, the default resolution must be listed as the first entry.

Good luck.

p.s. If you can't get it with this simple instruction, post your xorg.conf here so that we can have a better look into this.

Last edited by koyi; 08-24-2005 at 11:03 AM.
 
Old 08-24-2005, 08:59 PM   #3
jhwhite
LQ Newbie
 
Registered: Aug 2005
Location: central North Carolina
Posts: 17

Original Poster
Rep: Reputation: 0
thanks for the help, but I'm not sure that when I set the resolution to the improper value, it changed anything in the xorg.conf file. Below is the latter part of the file (typed in by hand since I don't yet have a way of getting stuff off the new laptop electronically).

Incidently, the line in the boot sequence that gives an error is:
initrd(hd0,2)/boot/initrd
and the error is something about an invalid argument.

----- latter part of xorg.conf -------------
....
Section "Monitor"
DisplaySize 300 180
HorizSync 30-33
Identifier "Monitor[0]"
ModelName "SAMSUNG MONITOR"
Option "DPMS"
VendorName "SEC"
VertRefresh 43-72
UseModes "Modes[0]"
EndSection

Section "Modes"
Identifier "Modes[0]"
EndSection

Section "Device"
BoardName "Framebuffer Graphics"
BusID "1:5:0"
Driver "fbdev"
Identifier "Device[0]"
VendorName "VESA"
EndSection

Section "Screen"
DefaultDepth 16
SubSection "Display"
Depth 16
Modes "default"
EndSubSection
Device "Device[0]"
Identifier "Screen[0]"
Monitor "Monitor[0]"
EndSection

Section "ServerLayout"
Identifier "Layout[all]"
InputDevice "Keyboard[0]" CoreKeyboard"
InputDevice "Mouse[1]" "CorePointer"
InputDevice "Mouse[3]" "SendCoreEvents"
Screen "Screen[0]"
EndSection

Section "DRI"
Group "video"
Mode 0660
EndSection

--------end ---------
 
Old 08-24-2005, 09:05 PM   #4
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,381

Rep: Reputation: 47
From the prompt type su then your password.
type nano /etc/X11/xorg.conf
next type
<ctrl key>+w and type in Modes "default"
then change the "default" to what koyi posted
Modes "1280x960" "1024x768" "800x600"

then you are going to want to type <ctrl>+x and choose Y to save and Y to overwrite.

Be sure you are editing the correct line though. This should overwrite whatever you did in Yast or whatever you used
 
Old 08-25-2005, 11:35 AM   #5
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
Quote:
Originally posted by jhwhite
thanks for the help, but I'm not sure that when I set the resolution to the improper value, it changed anything in the xorg.conf file.
It depends on what did you use to change the resolution. I am not sure about this but it seems that XFCE doesn't change the xorg.conf directly. It saves the config in another place(I didn't care to find out but I think it is under the home directory...). Not sure about YAST, GNOME, KDE, etc, though.

Quote:
Incidently, the line in the boot sequence that gives an error is:
initrd(hd0,2)/boot/initrd
and the error is something about an invalid argument.
Now I wonder if it is really the resolution that is causing the problem. Perhaps it is caused by another factor. What is the "invalid argument" that initrd is complaining about? Would you mind to post the error message?
Sure, only if the above posts didn't help you much.
 
Old 08-25-2005, 10:06 PM   #6
jhwhite
LQ Newbie
 
Registered: Aug 2005
Location: central North Carolina
Posts: 17

Original Poster
Rep: Reputation: 0
From previous post by koyi:
-----
Now I wonder if it is really the resolution that is causing the problem. Perhaps it is caused by another factor. What is the "invalid argument" that initrd is complaining about? Would you mind to post the error message?
------
I went back and looked at the error and I was probably wrong about initrd giving the error. It may be that the initrd line was the last thing executed successfully. When I boot, this is what I see (with allowance for typos):

kernal (hd0,2)/boot/vmlinuz root=/dev/hda3 vga=794 selinux=0 splash=Silent Console=tty0 resume=/dev/hda2
[Linux-bzImage, setup=0x1600, size=0x18b5f6]
initrd (hd0,2)/boot/initrd
[Linux-initrd@0x17cfa000, 0x1e5f39 bytes]

You passed an undefined mode number.
Press <RETURN> to see video modes available, <SPACE> to continue or wait 30 secs
<end of transcription from screen>
I press the space bar at this point and boot continues to a console type login prompt.

I tried using "sax2 -a" to create a new xorg.conf which appeared successful, but the system behaved the same with the new one when it rebooted.

There's probably a simple fix for this for a person that knows something about linux but that's not me. I've used Unix before, even writing some C code under it, but I've never done anything on the administration side so I definitely qualify as a newbie.

So... since I haven't added any user files to the system, I'm going to just redo the installation. Either way, (repeating the installation or finding the corrupted config file) I'm going to learn something from the process and that's the idea.

Thanks for the help. This site is a great source of info.
 
Old 08-26-2005, 06:44 AM   #7
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
Quote:
Originally posted by jhwhite
kernal (hd0,2)/boot/vmlinuz root=/dev/hda3 vga=794 selinux=0 splash=Silent Console=tty0 resume=/dev/hda2
[Linux-bzImage, setup=0x1600, size=0x18b5f6]
initrd (hd0,2)/boot/initrd
[Linux-initrd@0x17cfa000, 0x1e5f39 bytes]

You passed an undefined mode number.
Press <RETURN> to see video modes available, <SPACE> to continue or wait 30 secs
<end of transcription from screen>
If you have already formatted your hard disk and redone the installation, this may not matter anymore. But I think this error is caused by the "vga=794" line on the boot command.

Try this if you still can.

1. At the Grub boot screen when you can select which OS to boot. Press "e" to edit the boot parameter.
2. At the line starts with "kernel", press "e" again to edit the line.
3. Now, move the cursor with the arrow keys and delete the parameter "vga=794". Then press "Enter".
4. Now the line should look like:
Code:
kernel (hd0,2)/boot/vmlinuz root=/dev/hda3 selinux=0 splash=Silent Console=tty0 resume=/dev/hda2
5. Press "b" to boot.

See if the error still shows up or not.
However, this will only get rid of the above error message. It may not help with the X problem...

Good luck.
 
Old 08-26-2005, 10:12 PM   #8
jhwhite
LQ Newbie
 
Registered: Aug 2005
Location: central North Carolina
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for the tip. I have reformatted the linux partitions and reloaded linux. The system seems to be be working again. I'll go back and check what it is using for that line in the boot script to see if that is different now to see if that was indeed the problem. In the meantime, I'm going to be really careful about configuration changes that I make until I better understand how to fix things when I break them.
thanks
joe
 
Old 08-27-2005, 09:51 AM   #9
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
Just for your information, the vga parameter given to the kernel at boot time specify the mode of the framebuffer used when the computer boots up. I am not sure if this is the correct explanation so if anyone has something to say please feel free to do so.

More information can be found here:
http://www.faqs.org/docs/Linux-HOWTO...WTO.html#ss5.3

If you are interested you can read the whole article. But to make it simple, let's look at an example. If you specify "vga=0x31A", then the screen display will be 1280x1024@16bits. But remember that this has nothing to do with X itself. In your case, it is specified as "vga=794". As you should have already noticed, this is just the difference of a hex value and a decimal value. So, no big deal here.

I will suggest that you check that the settings you changed last time to see what it actually changes. Does it change the resolution in X or it changes the resolution of the framebuffer?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
screen res? chazzwozzer Red Hat 0 12-17-2004 02:05 PM
Screen Res AGilley007 Debian 3 09-17-2004 07:00 PM
screen res without X class_struggle Linux - Newbie 1 08-27-2004 05:33 AM
Screen Res. KarmaKill Slackware 4 07-04-2004 07:18 AM
TV-Out Screen Res Mikel Sevrel Linux - Software 1 06-11-2004 03:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration