LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-08-2007, 06:07 AM   #1
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 105

Rep: Reputation: 15
more colours under X


I recently upgraded my system to include a monitor and keyboard in addition to the glass teletype I have been using for donkey's years.

Now I have a 640x480 resolution. Not exactly stunningly high, I know, but it's the best my monitor copes with. But the problem is that I only seemed to be getting 256 colours, and I know that my monitor can do better. This must have to do with the configuration of X.

I don't fancy setting the whole thing up again (which is what the install scripts seem to do), but I want 65k colours. How do I do this? I looked in the "control centre" under the K menu, but saw nothing realted to the depth of colour.

Any ideas?
 
Old 03-08-2007, 06:18 AM   #2
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 105

Original Poster
Rep: Reputation: 15
Plus the "-bpp" switch only returns an error "couldn't get a file descriptor referring to the console".
Same as what happens when I try to start X on a text terminal.

EDIT: No it doesn't, it just does nothing.

Last edited by wilsonsamm; 03-08-2007 at 06:29 AM.
 
Old 03-08-2007, 07:19 AM   #3
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
I've an inkling this is how your xorg.conf is set up.

In mine, I have the following section describing how my display is configured:
Code:
Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     16
                Modes    "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" 
"640x480"
        EndSubSection
EndSection
Here, you can see that I have two colour modes: 24 bit and 16 bit. As far as I know, 16 bit is 65000 colours, so what you need to do is edit xorg.conf (in /etc/X11) to reflect what depth you want (make a backup first: cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak). Then, you need to set your DefaultDepth to 16 and restart your X server (crtl-alt-backspace).

I think that should do it.

edit: clarification

Last edited by pwc101; 03-08-2007 at 07:20 AM.
 
Old 03-08-2007, 08:04 AM   #4
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 105

Original Poster
Rep: Reputation: 15
Ah, thank you kindly.
I changed
DefaultDepth 8
to
DefaultDepth 16

and everything looks much much better.
No more does xmms redefine the entire palette of the screen.

Now I'm going to see what happens with
DefaultDepth 24
 
Old 05-19-2007, 09:45 AM   #5
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 105

Original Poster
Rep: Reputation: 15
Another upgrade: Slackware 11 and a monitor that's capable of resolutions like 1024x786.

Now, various relevant extracts from xorg.conf look like this:

DefaultDepth 24
Subsection "Display"
Depth 24
Modes "1024x768"
EndSubsection

And yet my resolution looks more like 640x480. How can I fix this problem?
 
Old 05-19-2007, 10:05 AM   #6
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
What graphics card are you using? Are you sure you've loaded the correct driver for it? Otherwise, if you could post the entire Screen section, maybe something will jump out at me...
 
Old 05-19-2007, 10:59 AM   #7
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 105

Original Poster
Rep: Reputation: 15
Here's my full screen section from /etc/X11/xorg.conf:
Code:
# **********************************************************************
# Screen sections
# **********************************************************************

# Any number of screen sections may be present.  Each describes
# the configuration of a single screen.  A single specific screen section
# may be specified from the X server command line with the "-screen"
# option.
Section "Screen"
    Identifier  "Screen 1"
    Device      "VESA Framebuffer"
    Monitor     "My Monitor"

# If your card can handle it, a higher default color depth (like 24 or 32)
# is highly recommended.

#   DefaultDepth 8
#   DefaultDepth 16
   DefaultDepth 24
#   DefaultDepth 32

# "1024x768" is also a conservative usable default resolution.  If you
# have a better monitor, feel free to try resolutions such as
# "1152x864", "1280x1024", "1600x1200", and "1800x1400" (or whatever your
# card/monitor can produce)

    Subsection "Display"
        Depth       8
        Modes "1024x768"
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes "1024x768"
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes "1024x768"
    EndSubsection
    Subsection "Display"
        Depth       32
        Modes "1024x768"
    EndSubsection

EndSection
I think I'm using the i810 driver.
How can I find out which gfx card I have? It's embedded onto the motherboard.

And a friend is giving me an nvidia graphics card soon. It has 32 "megs". I don't know much about the subject . . .
 
Old 05-19-2007, 11:29 AM   #8
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
As root, if you run
Code:
lspci > pci_info.txt
and then review the output (which has been redirected to a file called pci_info.txt) you should be able to find out what graphics card you have in your computer. There'll probably be a lot of information in that file, so you'll have to sift a bit!

There's a command in slackware (others?) called xorgconfig which asks you a series of questions about your graphics setup, some of which you'll know, some of which you will need to find out. Items you're likely to need to know are the horizontal and vertical refresh rates of you monitor. These should be available from the monitor manufacturer's website, although I find it easiest to use a live CD to determine the values (using its autogenerated xorg.conf as a template). This process should make you an xorg.conf with the parameters to make the 1024x768 resolution work. Please backup your current working xorg.conf before you do this!

Give that a go, and see if you get any luck
 
Old 05-19-2007, 01:05 PM   #9
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 105

Original Poster
Rep: Reputation: 15
Wow. The X server broke after trying to use xorgconfig to fix it and I was logged in through a serial connection trying to fix it.

Well, xorgconfig set my default driver to VGA which makes a screen at 320x200 at 8 bits' depth - even worse than before. So, I edited it, not really knowing what I was doing, but then all of a sudden - it worked again, AND at the proper resolution.

Thanks, chaps!
 
Old 05-19-2007, 02:43 PM   #10
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Good If it works, then it's good enough!

Glad it's sorted now.
 
Old 05-19-2007, 08:28 PM   #11
SlowCoder
Senior Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250

Rep: Reputation: 164Reputation: 164
"Gotta love it when a plans comes through ..." - A-Team
 
Old 05-21-2007, 11:26 AM   #12
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 105

Original Poster
Rep: Reputation: 15
I thôt the problem had been solved. It had indeed, but now another problem has arisen:

This new problem is this:

After each startup the startx command returns
Cannot move old log file ("/var/log/Xorg.0.log") to ("/var/log/Xorg.0.log.old).

And then init tries to shut down a process which doesn't exist.

I can fix it by reinstalling the X base package as root, but this needs doing each time I turn the computer on. Can anyone suggest a permanent fix?
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use colours in c++ ? twirl Programming 3 10-05-2005 10:09 PM
Eterm colours Shafted Debian 3 10-24-2004 02:22 PM
What do the colours mean in the terminal? alaskazimm Mandriva 2 07-04-2004 07:34 AM
ls and colours when listing destin Slackware 5 12-23-2003 06:43 AM
bash colours devinWhalen Linux - Newbie 6 12-02-2003 10:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:10 PM.

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