SDB:Grafische kaarten instellen

(Doorverwezen vanaf SDB:Configuring graphics cards)
Ga naar: navigatie, zoeken

openSUSE X Window Graphics instellen edit


Symptoom

Bij het installeren van openSUSE kan de automatische configuratie van het X systeem gedeeltelijk zijn mislukt. Dit resulteert in ofwel een zwart scherm na het opnieuw opstarten of de verkeerde resolutie wordt op de monitor getoond.

Dit artikel is nog maar gedeeltelijk vertaald. Als u mee wilt helpen met vertalen lees dan Wiki vertalen naar het Nederlands.

This guide is for all current and supported openSUSE versions up to and including openSUSE-11.3.


Cause

Typically the cause is your graphics are not configured properly. The reason for the misconfiguration can vary, dependant upon your openSUSE version.


Solution

This section provides some guidance on how to sort out your graphic problem. It is recommended one determine their openSUSE version and read up on some practical graphic theory before proceeding to solve their problem.

Determine openSUSE version

It is very important you know what openSUSE version you are using. This is simple to do. Either this can be read from clicking on the "My Computer" icon on one's desktop, and reviewing the section under "OS Information" next to "System", or instead simply open a terminal and type:

cat /etc/SuSE-release

You need to know which openSUSE version in order to select the optimal solution to solve your problem.

Practical Graphic Card Theory in openSUSE

It is also important to determine what graphic hardware one has on their PC, and what graphic driver one is using on their PC. There is guidance on that given in this forum guide which will soon be converted to an openSUSE Graphic Card Practical Theory wiki. If you are not logged in to the openSUSE forums you may need to click on that link a second time.

It is recommended you read that, and in particular pay attention to the section for your graphic card manufacturer (typically ATI, nVidia, Intel or VIA), prior to returning to this page to recover/configure your system's graphics.

Once you have determined

  • your openSUSE version,
  • your graphic hardware, and
  • your in use graphic driver [whether it works or does not work],

please proceed to the next steps in this guide.

Experienced Linux users should note that in many cases an /etc/X11/xorg.conf file is not needed for openSUSE-11.2 / 11.3.

Without SaX2

Versie: 11.3As of openSUSE-11.3, the legacy graphic configuration wizard "sax2" is no longer included with openSUSE, hence this section provides various suggestions how to restore one's graphics on openSUSE-11.3 when there is a graphic configuration problem. Users of openSUSE-11.2 or earlier please go down to the With SaX2 section below.

1st thing to try (nomodeset)

  • The 1st thing to try is to boot from grub with boot code: nomodeset . This is per the guidance in the openSUSE-11.3 release notes. ie in grub's option line enter:
nomodeset

New users, to explain better for you, please note you enter this boot code in the very first openSUSE menu you see when you switch ON your PC. Just start typing and you will see the letters for 'nomodeset' appear in the options line of the menu.

Boot with nomodeset boot code

Then after entering that, press <enter> and let your PC boot. Hopefully that will be sufficient and you will have a functional desktop at that time. The openSUSE-11.3 release notes provide more detail, especially on how to make this permanent. If this works, you "may" wish to stop here.

2nd thing to try (failsafe/safe-settings boot)

  • The 2nd thing to try (if the above did not work) is to try booting from grub with either (1) if installation failed with the safesettings (selection under the grub F5 "kernel default" menu item; or (2) if from an installed system with the boot option failsafe. Hopefully that will allow you to boot to a functional desktop.

If this works, you "may" wish to stop here. But for users with installed systems, whether that succeeds or not, you may wish to read on to see if you can better optimise your system.

3rd thing to try (use installation config file)

  • The 3rd thing to try is boot to run level 3 (a full screen text mode) and try to use the installation graphic configuration file xorg.conf.install as a temporary measure. You can do this by typing 3 when the very first openSUSE menu appears, and you should see a 3 in the options line.
Boot-to-run-level-3

Then press <enter> and your PC should boot to a full screen text mode with a login prompt. You are now in run level 3. Login as a regular user and then type:

su -c 'cp /etc/X11/xorg.conf.install /etc/X11/xorg.conf'

and enter the root/administrator user password when prompted for a password.

New users note that Linux is case-sensitive and so be accurate when typing uppercase and lower case characters, as they are treated differently. X11 is NOT the same as x11.

Typically the installation configuration file will use the fbdev graphic driver. In some cases the xorg.conf.install file will NOT exist, and of course if that is the case, then this step will not work. After doing the preceding, to test if this works, you can reboot your system by typing:

su -c 'shutdown -r now'

Hopefully that will allow a boot to a graphical X window with the fbdev driver. If this works, you "may" wish to stop here. However that driver is VERY low quality and you may wish to continue to the next step, even IF you have that functioning.

4th thing to try (edit /etc/X11/xorg.conf.d/ directory)

  • The 4th thing to try is to edit the configuration file for X window graphics to attempt to force a boot to a specific graphic driver. If you have not read the practical theory guide referenced above, PLEASE do so now, else this step will be difficult to understand.

Again, boot to run level 3 like the 3rd step above. Check if there is an /etc/X11/xorg.conf file, and if there is you need to move that file so it does not interfer with the configuration you are to setup. Hence if there there is such an xorg.conf file, then change the name of that file to something different, such as:

su -c 'mv /etc/X11/xorg.conf /etc/X11/xorg.conf.myoldbackup'
New users - again note that Linux is case-sensitive and so be accurate when typing uppercase and lower case characters, as they are treated differently. X11 is NOT the same as x11.

Then edit the /etc/X11/xorg.conf.d/50-device.conf file, adding an entry for your chosen graphic driver. You will need to do this edit from a text editor (such as the mc editor(recommended - see link for installation/use details) or the vi editor or the nano editor or joe editor ... and there are many other editors) with root permissions.

For example, to make the change, if the mc editor is installed, type:

su -c 'mcedit /etc/X11/xorg.conf.d/50-device.conf'
enter root password when prompted, and make the needed edits, and exit the mc editor afterward, being very careful as one is using this editor/file-manager with root permissions.

Tip: Prior to doing the above, to see what graphic drivers are available for use on one's openSUSE-11.3, there is guidance at the start of the openSUSE Video Hardware Compatibility List (HCL)

For example, you could change that file to:

Section "Device"
  Identifier "Default Device"
   
  #Driver "radeon"
  Driver "nv"
 
  ## Required magic for radeon/radeonhd drivers; output name
  ## (here: "DVI-0") can be figured out via 'xrandr -q'
  #Option "monitor-DVI-0" "Default Monitor"
   
EndSection

where in the example above the line Driver nv was added to try force the load of the open source "nv" graphic driver for nvidia cards. It is important one read the practical theory guide referenced above to understand what graphic drivers may be available.

Waarschuwing: Nvidia graphic card users who discovered that the "nouveau" driver did not work for them, should pay attention to the openSUSE-11.3 release notes and as appropriate blacklist the "nouveau" driver in the /etc/modprobe.d/50-blacklist.conf file. This can be done with root permissions by typing:
        echo "blacklist nouveau" >> /etc/modprobe.d/50-blacklist.conf
It may also be necessary to run "yast" (you can run yast in text mode with root permissions if X window not available) and navigate to yast > System > /etc/sysconfig Editor > System > Kernel > NO_KMS_IN_INITRD and change it to "yes". This takes a minute or two to save once changed is submitted. (see below image examples).

For users trying to blacklist "nouveau" driver, examples of how to specify NO_KMS_IN_INITRD from a text yast are here, illustrated sequentially below (note one must also blacklist nouveau as described above). So to edit the /etc/sysconfig start yast from a text login by typing:

su -c yast

Use the spacebar, tab key, enter key, and arrows to navigate yast in text mode, and then follow the example screens.

Enter /etc/sysconfig Editor
Locate system in sysconfig Editor
set NO_KMS_IN_INITRD to YES

In case a more complex edit is needed (hopefully not needed), then another example of an edit in the /etc/X11/xorg.conf.d/ directory (but this time to configure a monitor instead of specifying a graphic driver) is an openSUSE forum example of customizing the 50-monitor.conf file. Note one might have to click on that link twice to connect to the proper page.

And then after making any such edit(s)/change(s), as a regular user again reboot as before with the

su -c 'shutdown -r now'

command and hopefully your PC will boot to X window graphical desktop and if this works, you "may" wish to stop here.
.
.

5th thing to try (Xorg -configure creation of a legacy xorg.conf file)

  • The 5th thing to try is to try to create your own version of the "classic/legacy" xorg.conf custom configuration file for the graphics. This is more precisely known as the /etc/X11/xorg.conf file. In fact this step does in part what the old sax2 configuration wizard used to do for openSUSE (but this is less capable). Some users may even have a copy of their old xorg.conf from a previous Linux install that they might try (although it may not work with openSUSE-11.3). Again, if you have not read the practical theory guide referenced above, PLEASE do so now, else this step will be difficult to understand.

For this step, boot to run level 3 like the 3rd step above. But this time, create a draft xorg.conf file by typing:

su -c 'Xorg -configure'

That will create the file /root/xorg.conf.new.

New users note that Linux is case-sensitive and so be accurate when typing uppercase and lower case characters, as they are treated differently. Xorg in the command is NOT the same as xorg in the subsequent xorg.conf.new file name.

You now need to move that file to the proper location so it is used by X when starting, and you need to rename that file. You can do so by typing:

su -c 'mv /root/xorg.conf.new /etc/X11/xorg.conf'

If you are lucky, you will then be able to reboot (as described above) by typing su -c 'shutdown -r now' and you might successfully boot to an X window desktop. However its also possible you may need to change the driver in that /etc/X11/xorg.conf file, and to do so you need to open it with a text editor (such as the mc editor(recommended - see above fourth step for example of its use) or the vi editor or the nano editor or joe editor ... and there are many others) with root permissions and then change the driver. For example you may need to change "nouveau" to "nv" in the device section of that file, such that the "nv" driver is used instead of the "nouveau" driver.

Again, per step#4 above, nVidia graphic card users may need to black list the "nouveau" driver and change NO_KMS_IN_INITRD to "yes" with the sysconfig editor (see step#4 above).

And then after making such an edit/change, as a regular user again reboot as before with the

su -c 'shutdown -r now'

command and hopefully your PC will boot to X window graphical desktop and if this works, you "may" wish to stop here.

6th thing to try (proprietary graphic driver)

Again, per step#4 above, nVidia graphic card users may need to black list the "nouveau" driver in the /etc/modprobe.d/50-blacklist.conf file, for example with root permissions by typing:

        echo "blacklist nouveau" >> /etc/modprobe.d/50-blacklist.conf

and also change NO_KMS_IN_INITRD to "yes" with the sysconfig editor (see step#4 above).

If instead your PC has an Intel or a VIA graphic card or other graphic card, then you need to again consult with the practical theory guide to determine what your options are for the VIA and Intel graphics devices.

7th thing to try (experts only - udev edits)

  • The 7th thing to try - Try Udev edits as last resort.
Waarschuwing: This UDEV section is under development and not in a state yet where it should be followed. Due to complexity only some references have been provided here for the time being (until this section can be written properly). In addition, this section will ultimately be written for Linux experts only, and not for new nor average users
/sbin/udevd -V

udevadm test /class/input/eventX

udevadm info -e | grep ID_INPUT (KEYBOARD, MOUSE, KEY, TOUCHPAD, ...)

Does re-plugging the input devices makes them appear? If they can't be removed/connected, try:

udevadm trigger -v --subsystem-match=input


THE ABOVE UDEV SECTION NEEDS LOTS MORE WORK ....



With SaX2

Versie: 11.1, 11.2

This section is for users who have an openSUSE version that is 11.2 or earlier, where the SuSE-GmbH developed sax2 graphical configuration wizard is still available. Note that some of the "steps" above used for openSUSE-11.3 (such as steps #2, #3, and #5) are also applicable to older openSUSE versions.

ATI or nVidia graphic card

If you have an ATI or nVidia graphic card you can follow the details of the older openSUSE wiki for Configuring Graphic Cards which was mostly limited to users of those cards in its guidance.

Configure all graphic cards using sax2 wizard

Users of openSUSE-11.2 and earlier, to configure X window graphics, can boot to runlevel 3 (as described in the 3rd thing to try under openSUSE-11.3 above), login as a regular user, and then 1st backup any existing /etc/X11/xorg.conf file.

su -c 'cp /etc/X11/xorg.conf /etc/X11/xorg.conf.mybackup.txt'

and then run the program sax2 to configure one's graphics.

New users note that Linux is case-sensitive and so be accurate when typing uppercase and lower case characters, as they are treated differently. X11 is NOT the same as x11.

Note that sax2 has many possible input arguments in order to better tune the xorg.conf file that it creates. For example one can specify which graphic card to use (if one's PC has more than one graphic card/device) or one can specify which graphic driver to use.

To see what graphic devices one has installed, one can type:

su -c 'sax2 -p'

To see what graphic drivers are available for use on one's openSUSE, there is guidance at the start of the openSUSE Video Hardware Compatibility List (HCL)

After deciding what driver one wishes to configure their openSUSE to use (say for example "vesa"), then to instruct sax2 to create an xorg.conf file for the 1st graphic device (chip 0 as reported in the above command) using the vesa graphic driver, one can send the command:

su -c 'sax2 -r -m 0=vesa'

where that is 'zero equals vesa' , and then test for X window start as a regular user (do not try as root/admin) by typing:

startx

Again, one can restart the PC at any time from run level 3 with the command

su -c 'shutdown -r now'



See also

This wiki was created to address an action associated with openSUSE bug report 608237. An related issue is also in openSUSE feature tracking: openFATE #308357: Replacement for Sax2 in 11.3.


References

Below are some references to other wiki, which provide useful information on configuring one's graphics in openSUSE.

  • Configuring graphics in Dual Head mode for openSUSE-11.2 and earlier, although likely applicable to openSUSE-11.3 (link to this reference wiki location to be updated eventually as part of wiki transistion process)
  • Multiple Screens Using XRandR for openSUSE-11.2 and earlier, although likely applicable to openSUSE-11.3 (link to this reference wiki location to be updated eventually as part of wiki transistion process)
  • Configuring openSUSE graphic cards is an older wiki on the same subject, but with less technical content (as to different options/steps available).
  • Configuring graphic cards through the command line interface is an older wiki for openSUSE-11.2 and earlier (likely applicable in part to 11.3) (link to this reference wiki location to be updated eventually as part of wiki transistion process)
  • Monitor Settings is a general write up (with minimal specifics) on applying custom monitor settings (link to this reference wiki location to be updated eventually as part of wiki transistion process)
  • 3D Acceleration is a simple guide on how to enable 3D acceleration on Gnome and KDE4 (link to this reference wiki location to be updated eventually as part of wiki transistion process)
  • Graphic card troubleshooting was written with openSUSE-11.1 and 11.2 in mind and has not been updated to reflect changes as of openSUSE-11.3 (especially wrt the nouveau driver requiring blacklisting). Hence care must be applied when following that guide (link to this reference wiki location to be updated eventually as part of wiki transistion process)
  • openSUSE Hardware Compatibility List (HCL) for Video cards provides a link to data provided by users on the compatibility of their video cards with openSUSE Linux.