HOWTO: Common X Issues

From Sabayon Wiki
Jump to: navigation, search
i18n: en tr

Common X Issues

In this document we try and answer common questions and issues that are asked about X issues.

Adding Control Alt Backspace to restart X

This option is performed on a per user basis. In other words, for each user who gets the ability to ctrl|alt|bckspc to restart X this has to be done.

Per User

As the user in question issue

 $ echo "setxkbmap -option terminate:ctrl_alt_bksp" >> ~/.bashrc 

The user will need to log out and back in for this to take effect.

Globally

This one takes some editing, it may look tricky but it's not. We have to make a change to HAL, specifically /etc/hal/fdi/policy/10-keymap.fdi. This process will be done as root (not sudo), so open a terminal and go root (su -).

#nano /etc/hal/fdi/policy/10-keymap.fdi

You should see something like:

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
      <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <merge key="input.xkb.rules" type="string">base</merge>

      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.xkb.model" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.xkb.model" type="string">evdev</merge>
      </match>

      <merge key="input.xkb.layout" type="string">us</merge>
      <merge key="input.xkb.variant" type="string" />
    </match>
  </device>
</deviceinfo>

We need to add just one line to this. *hint its near the bottom*. Find:

<merge key="input.xkb.variant" type="string" />

and add below it.

<merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>

So that now that section looks like:

      <merge key="input.xkb.variant" type="string" />
	  <merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>

You can now close and save the file. Using nano ctrl x starts the save process, read the prompts at the bottom, leave the file name alone and answer yes that you want to overwrite the file.

Problematical Resolution

Some monitors report their DDC information incorrectly which in turn tells HAL all sorts of lies and wont allow you to set your resolution correctly. To fix this we tell HAL to stop trying to figure it out and set things ourselves. This process will be done as root (not sudo), so open a terminal and go root (su -).

#nano /etc/X11/xorg.conf

Find Section "ServerFlags" it should look something like this:

Section "ServerFlags"
     Option    "AllowMouseOpenFail"    "true"                  
EndSection   

Add: Option "AutoAddDevices" "false" so that it looks similar to:

Section "ServerFlags"
     Option    "AllowMouseOpenFail"    "true"  
     Option    "AutoAddDevices"           "false"                
EndSection   

You can now close and save the file. Using nano ctrl x starts the save process, read the prompts at the bottom, leave the file name alone and answer yes that you want to overwrite the file.

Manually Editing Screen Resolution

This process will be done as root (not sudo), so open a terminal and go root (su -).

Introduction

#nano /etc/X11/xorg.conf

Find Section "Screen" Looks alot like this:

Section "Screen"

    Identifier    "Screen 0"
    Device        "SabayonVga0"
    Monitor       "Generic Monitor"
    Option       "AddARGBGLXVisuals" "true"

    DefaultDepth 24

    SubSection "Display"
        Depth           8
        ViewPort        0 0
        #Modes          "1024x768" "800x600" "640x480"
    EndSubsection

    SubSection "Display"
        Depth           16
        ViewPort        0 0
        #Modes          "1024x768" "800x600" "640x480"
    EndSubsection

    SubSection "Display"
        Depth           24
        ViewPort        0 0
        #Modes          "1024x768" "800x600" "640x480"
    EndSubsection

EndSection

For the sake of this example we will just be showing edits to the last section. First we must note that Default Display tells the X server which resolution section to use, this is bit depth or number of colors. In the windoze world 24 is the same as saying millions of colors. It looks like this

    DefaultDepth 24

And it controls this section

    SubSection "Display"
        Depth           24
        ViewPort        0 0
        #Modes          "1024x768" "800x600" "640x480"
    EndSubsection

The Edit

Lets say that we want to add a resolution of 1280x720. The first thing we need to do is uncomment the Mode line by removing the # from the beginning. So:

        #Modes          "1024x768" "800x600" "640x480"

becomes

        Modes          "1024x768" "800x600" "640x480"

Then we want to add our new resolution of 1280x720. So:

        Modes          "1024x768" "800x600" "640x480"

becomes

        Modes          "1280x720" "1024x768" "800x600" "640x480"

This leaves us with this section looking like:

     SubSection "Display"
        Depth           24
        ViewPort        0 0
        Modes          "1280x720" "1024x768" "800x600" "640x480"
    EndSubsection

You can now close and save the file. Using nano ctrl x starts the save process, read the prompts at the bottom, leave the file name alone and answer yes that you want to overwrite the file.

We have now added a functional resolution to our computer. To activate it all you have to do is restart the X server itself.

Restarting X Manually

This process will be done as root (not sudo), so open a terminal and go root (su -) and then issue the following command.

# /etc/init.d/xdm restart

If for some reason X fails to restart, as sometimes happens when you command X to restart while inside an X environment, the key combination of: <crtl alt f1> will take you to a terminal. Log in as root and issue the command again. Your X session will be found on f7 <ctrl alt f7>.

nVidia Specific

NEEDS ADDING

ATi Specific

NEEDS ADDING

Credits

Azerthoth - for getting tired of X questions

yngwin - for the global ctrl alt bckspc fix