I’ve been trying to change my colour display to 8-bit (256 colours) for an old game I want to play. Following these instructions: http://ubuntuforums.org/archive/index.php/t-42308.html I cd to /etc/X11 but there is no xorg.conf file! Are these old instructions - if so, what are the necessary steps these days?
Thanks.
OK, create one
xorg.conf is no longer present by default, but if there IS one (ie. you create one), it is recognised and acted upon
First, backup the old xorg.conf (if exists)… run this command anyway, just in case.
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
(obviously if there isn’t one the command will fail, but it won’t hurt to run it)
(note the capital X) … (for clarity, those are one’s in X11, not lower case L’s)
You are going to want to write these commands down, as you will be working WITHOUT a GUI for a while.
Open a console by hitting Ctrl+Alt+F4
(Note - At this point Ctrl+Alt+F7 will bring back your desktop, but it won’t after the next command until you restart gdm or reboot))
You should now be at a Black screen asking you to Log on:
So enter your username, and password…
You should end up at a $ prompt
Now you need to stop the X server (gnome desktop manager):
sudo service gdm stop
To create an xorg.conf.new (in you home directory):
sudo Xorg -configure
(note the capital X)
Restart gdm:
sudo service gdm restart
That should put you back at a graphical login screen… so log in, and you’re back at your desktop… and you can wait for your heart rate to drop
Now you need to copy the freshly created xorg.conf.new file (in your home directory) to /etc/X11 and rename it to xorg.conf… so open a terminal, and enter:
sudo cp ~/xorg.conf.new /etc/X11/xorg.conf
(again, note the capital X) … (for clarity, those are one’s in X11, not lower case L’s)
Now reboot… any problems with your graphics, just delete the /etc/X11/xorg.conf file and reboot.
You now have an xorg.conf you can edit
Thanks - I’ve managed to create the file. Unfortunately it hasn’t got the section the link above referred to. It looks like this:
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
Screen 2 "Screen2" RightOf "Screen1"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "built-ins"
EndSection
Section "Module"
Load "dri"
Load "glx"
Load "dri2"
Load "dbe"
Load "record"
Load "extmod"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Monitor"
Identifier "Monitor2"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "AccelMethod" # [<str>]
#Option "DRI" # [<bool>]
#Option "ColorKey" # <i>
#Option "VideoKey" # <i>
#Option "FallbackDebug" # [<bool>]
#Option "Tiling" # [<bool>]
#Option "Shadow" # [<bool>]
#Option "SwapbuffersWait" # [<bool>]
#Option "XvMC" # [<bool>]
#Option "XvPreferOverlay" # [<bool>]
#Option "DebugFlushBatches" # [<bool>]
#Option "DebugFlushCaches" # [<bool>]
#Option "DebugWait" # [<bool>]
#Option "HotPlug" # [<bool>]
#Option "RelaxedFencing" # [<bool>]
Identifier "Card0"
Driver "intel"
BusID "PCI:0:2:0"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "ShadowFB" # [<bool>]
#Option "Rotate" # <str>
#Option "fbdev" # <str>
#Option "debug" # [<bool>]
Identifier "Card1"
Driver "fbdev"
BusID "PCI:0:2:0"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "ShadowFB" # [<bool>]
#Option "DefaultRefresh" # [<bool>]
#Option "ModeSetClearScreen" # [<bool>]
Identifier "Card2"
Driver "vesa"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Card1"
Monitor "Monitor1"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen2"
Device "Card2"
Monitor "Monitor2"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Nothing about “DefaultDepth”
Is there a way to change color depth?
First, just in case you have any problem let me explain how to start in failsafe graphics mode.
Boot the PC and immediately keep tapping the “Shift” key
When you get to the GRUB menu, select the top option that ends with (recovery mode).
When prompted, select “failsafeX” graphics mode or similar… you will be asked if you want to start “just one session” in “low graphics mode”… make sure you’ve selected “just one session” and accept.
xorg.conf will be ignored for this boot, so you can then remove the line I’m about to tell you to add to xorg.conf
You need to add the line:
DefaultDepth 8
to the (one of the) Section “Screen” of xorg.conf, so YOUR xorg.conf reads -
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
Screen 2 "Screen2" RightOf "Screen1"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "built-ins"
EndSection
Section "Module"
Load "dri"
Load "glx"
Load "dri2"
Load "dbe"
Load "record"
Load "extmod"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Monitor"
Identifier "Monitor2"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "AccelMethod" # [<str>]
#Option "DRI" # [<bool>]
#Option "ColorKey" # <i>
#Option "VideoKey" # <i>
#Option "FallbackDebug" # [<bool>]
#Option "Tiling" # [<bool>]
#Option "Shadow" # [<bool>]
#Option "SwapbuffersWait" # [<bool>]
#Option "XvMC" # [<bool>]
#Option "XvPreferOverlay" # [<bool>]
#Option "DebugFlushBatches" # [<bool>]
#Option "DebugFlushCaches" # [<bool>]
#Option "DebugWait" # [<bool>]
#Option "HotPlug" # [<bool>]
#Option "RelaxedFencing" # [<bool>]
Identifier "Card0"
Driver "intel"
BusID "PCI:0:2:0"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "ShadowFB" # [<bool>]
#Option "Rotate" # <str>
#Option "fbdev" # <str>
#Option "debug" # [<bool>]
Identifier "Card1"
Driver "fbdev"
BusID "PCI:0:2:0"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "ShadowFB" # [<bool>]
#Option "DefaultRefresh" # [<bool>]
#Option "ModeSetClearScreen" # [<bool>]
Identifier "Card2"
Driver "vesa"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Card1"
Monitor "Monitor1"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen2"
Device "Card2"
Monitor "Monitor2"
DefaultDepth 8
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Now hit Alt+SysRq+K (or reboot) to restart the X server, and you should have 8bit colour depth (on Screen2).
Not the most graceful solution, so I’ll see if I can find something better.
How many graphics cords do you have… as you have 3 “Screen” sections in your xorg.conf ? … You’ll have to put that line in the correct one(s)… I’ve shown it for “Screen2” above.
Further Info -
xdpyinfo | grep "of root"
or
xdpyinfo
Will give your current colour depth as “24 planes” or “8 planes” etc.
OK, I added the line and when I rebooted the screen was totally buggered. I got back in as you instructed and got rid of the line. One question though: why does xorg.conf think I have three screens? I added that line to screen 0, since I only had one, but what difference would it have made?
I have no idea… what graphics card(s) do you have ? … is there a second GFX card on your motherboard, has it got multiple outputs such as either a dual head card with a HMDI output, or a laptop with its built in monitor and 2 external monitor outputs etc.
sudo lshw -C display
should give you a clues.
what difference would it have made?
It should have dropped you to 8bit colour (max 256 colours).
It gives me:
*-display:0
description: VGA compatible controller
product: Mobile GM965/GL960 Integrated Graphics Controller (primary)
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 03
width: 64 bits
clock: 33MHz
capabilities: msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:45 memory:fc000000-fc0fffff memory:d0000000-dfffffff ioport:1800(size=8)
*-display:1 UNCLAIMED
description: Display controller
product: Mobile GM965/GL960 Integrated Graphics Controller (secondary)
vendor: Intel Corporation
physical id: 2.1
bus info: pci@0000:00:02.1
version: 03
width: 64 bits
clock: 33MHz
capabilities: pm bus_master cap_list
configuration: latency=0
resources: memory:fc100000-fc1fffff
But I’m out of my depths here
I have no idea where the 3rd screen section is coming from, but that looks like you have 2 graphics outputs… Laptop, with external monitor socket ?
What exactly are you trying to achieve ?
An Intel GFX card is probably not the best card to be trying to change colour depth on in Linux… the Intel GFX drivers suck… if I remember correctly nVidia drivers would give you this option in their control applet.
Not that that helps you if you’re on a laptop.
OK, thanks for the help (I’m not planning on changing my driver for one game - in fact, when I bought this laptop I made sure I wasn’t wasting any money on a good driver as I’m not really a gamer ).
I’ve never used an external monitor, but maybe I’ve got a socket - does it look like a network socket but not as wide?
No, that sounds more like an RJ11 modem (telephone) socket:
http://linuxforums.org.uk/MGalleryItem.php?id=1181
a female D-sub 15 VGA (graphics) socket as fitted to most laptops looks like this:
http://linuxforums.org.uk/MGalleryItem.php?id=1191
Though occasionally you may see a DVI or more recently an HDMI socket.
ahh, yup I have that as well. Thanks for future reference.