# x window启动问题，请大家帮忙看看

## javashen

笔记本的显卡是ati hd 4500，安装的是xorg-server 1.6.5-r1，没有写xorg.conf文件，在安装radeon的情况下，xwindow可以启动，如果安装radeon或fglrx，启动时日志如下：

(II) Loading extension XFree86-DRI

(II) LoadModule: "dri2"

(WW) Warning, couldn't open module dri2

(II) UnloadModule: "dri2"

(EE) Failed to load module "dri2" (module does not exist, 0)

(==) Matched ati for the autoconfigured driver

(==) Assigned the driver to the xf86ConfigLayout

(II) LoadModule: "ati"

(WW) Warning, couldn't open module ati

(II) UnloadModule: "ati"

(EE) Failed to load module "ati" (module does not exist, 0)

(EE) No drivers available.

不知道为何没有xorg.conf情况下只能用radeon驱动？

那位大虾能贴一个使用fglrx和radeonhd的xorg.conf文件？

----------

## nefu

为什么没有人回答哦...  :Very Happy: 

----------

## lidashuang

是不是没编译进驱动？

----------

## jiazhaohang

fglrx

Catalyst is the name of the proprietary driver for AMD/ATI based chipsets for Linux and Windows. It is also known as fglrx and x11-drivers/ati-drivers in the Portage tree. Please Note that the current version of Fglrx does NOT support any cards that are not Directx Level 10 or above; anything x1950 or lower must use the Open Source drivers.

Contents [hide]

1 Installing fglrx

2 Configuring X

3 Tweaking xorg.conf

4 AIGLX with fglrx

5 Troubleshooting

5.1 Startup problems

5.1.1 AGP

5.1.2 Unable to modprobe fglrx

5.1.3 PreInitDAL failed

5.2 Crashes/freezes

5.2.1 X crashes when playing a video using Xv

5.2.2 System freezes after logout with GDM or KDM

5.2.3 Any 3D app crashes fglrx

5.2.4 Mplayer in full-screen

5.3 Runtime warnings/errors

5.3.1 libGL: failed to open DRM

5.3.2 No direct rendering

5.3.3 ACPI script missing finger command

5.3.4 Open ACPI failed (/var/run/acpid.socket) (No such file or directory)

5.3.5 Failed to load module "dri2" (module does not exist, 0)

[edit]Installing fglrx

Installing fglrx is relatively straightforward.

# emerge -av x11-drivers/ati-drivers

Or enable the fglrx video card, which pulls in x11-drivers/ati-drivers:

File: /etc/make.conf

...

VIDEO_CARDS="fglrx"

...

And then rebuild x11-base/xorg-server:

# emerge -av1 x11-base/xorg-server

[edit]Configuring X

AMD ships fglrx with a free tool to quickly get a working xorg.conf, which can also be used to further tweak the configuration.

# /opt/bin/aticonfig --initial --input=/etc/X11/xorg.conf

This backups your xorg.conf and modifies it for fglrx. Finally, eselect can be used to tell X.Org about fglrx:

# eselect opengl set ati

Now you can (re)start X, and things should be fine. If not, continue to #Troubleshooting.

[edit]Tweaking xorg.conf

Several tweaks are known in the community. Please note that these aren't default for a reason.

Fix me: add tweaks

[edit]AIGLX with fglrx

Using ati-drivers 8.433 or later, you can enable and use AIGLX and thus use compositing window managers like Compiz Fusion. Some users have reported instability, but you'll have to see for yourself. You have to modify

File: /etc/X11/xorg.conf

...

Section "Extensions"

        Option        "Composite"        "Enable"

EndSection

...

...

Section "ServerFlags"

        Option        "AIGLX"            "On"

EndSection

...

[edit]Troubleshooting

[edit]Startup problems

[edit]AGP

By default, the driver uses the Internal AGPGART. Sometimes the internal one doesn't work, and you will have to use the one provided with the kernel. Search your xorg.conf for the line that has the option "UseInternalAGPGART." Simply change the "yes" to "no."

Note: If you can't find it, add it. In the Section "Device" right under Driver "fglrx"

File: /etc/X11/xorg.conf

...

        Option "UseInternalAGPGART" "no"

...

Now simply add the modules to /etc/modules.autoload.d/kernel-2.6.

File: /etc/modules.autoload.d/kernel-2.6

...

agpgart

intel-agp # change intel-agp to your chipset. eg: via-agp, nvidia-agp sis-agp.

fglrx

...

Finally, run

# update-modules

Then you can reboot and everything should work. If you are having problems, check dmesg and /var/log/Xorg.0.log for more info.

[edit]Unable to modprobe fglrx

If the module cannot be loaded ("operation not permitted"), check that the kernel's Direct Rendering Manager is disabled:

Linux Kernel Configuration:

Device Drivers  --->

    Graphics support  --->

        < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  --->

If you are using a precompiled kernel you can try to unload the dri and radeon module before modprobing fglrx.

# modprobe -r dri radeon

# modprobe fglrx

[edit]PreInitDAL failed

This can happen if multiple monitors were detected, even though you don't have multiple monitors. To fix it, use aticonfig --enable-monitor and aticonfig --force-monitor to specify which monitors you use. Example, if you have a VGA + DVI card, but only use your VGA connection:

# aticonfig --enable-monitor=crt1 --force-monitor=crt1,notmds1

Some had success with disabling framebuffer in kernelconfig, recompile, reboot! This happend as i upgraded from 8.28.8 to 8.32.5.

[edit]Crashes/freezes

[edit]X crashes when playing a video using Xv

Even though Xv is scheduled for launch, the bindings don't work correctly yet. Add the following option to your Xorg.conf file in the device section:

File: /etc/X11/xorg.conf

...

 Option "TexturedVideo" "on"

...

[edit]System freezes after logout with GDM or KDM

If you use GDM modify /etc/X11/gdm/custom.conf

File: /etc/X11/gdm/custom.conf

...

[daemon]

AlwaysRestartServer=true

If you use KDM add to the [X-:*-Core] section the following

File: /usr/share/config/kdm/kdmrc

...

[X-:*-Core]

...

TerminateServer=true

...

[edit]Any 3D app crashes fglrx

If you are unable to use any 3d applications and get this error instead:

FGLTexMgr: open of shared memory object failed (Function not implemented)

__FGLTexMgrCreateObject: __FGLTexMgrSHMmalloc failed!!!

fglX11AllocateManagedSurface: __FGLTexMgrCreateObject failed!!

FGLTexMgr: open of shared memory object failed (Function not implemented)

__FGLTexMgrCreateObject: __FGLTexMgrSHMmalloc failed!!!

fglX11AllocateManagedSurface: __FGLTexMgrCreateObject failed!!

FGLTexMgr: open of shared memory object failed (Function not implemented)

__FGLTexMgrCreateObject: __FGLTexMgrSHMmalloc failed!!!

Then you do not have tmpfs mounted on /dev/shm, which the driver requires. To mount this, add to following line to /etc/fstab:

File: /etc/fstab

...

tmpfs     /dev/shm           tmpfs        defaults            0 0

Then just tell mount to update based on the new information:

# mount /dev/shm

[edit]Mplayer in full-screen

If you have problems with mplayer not playing in full screen, set

File: /etc/X11/xorg.conf

...

Option "VideoOverlay"       "on"

...

Into your device section.

[edit]Runtime warnings/errors

[edit]libGL: failed to open DRM

If you get this error (for example if you use glxgears):

libGL error: failed to open DRM

then you are trying to run as a user that doesn't have permission to use the DRI (root is the default allowed user). To let all users access the DRI, add the following section to your /etc/X11/xorg.conf:

File: /etc/X11/xorg.conf

...

Section "dri"

   Mode 0666

EndSection

...

Alternatively, you can use the group "video" to control access. If you want to do this, add the following section to your /etc/X11/xorg.conf:

File: /etc/X11/xorg.conf

...

Section "dri"

  Group "video"

  Mode 0660

EndSection

...

And then add the users which use X to the video group:

# gpasswd -a john video

[edit]No direct rendering

If fglrxinfo says "mesa3d.org" instead of "ATI" after A SUCCESSFUL modprobe of fglrx, for example like so:

display: :0.0 screen: 0

OpenGL vendor string: Mesa project: www.mesa3d.org

OpenGL renderer string: Mesa GLX Indirect

OpenGL version string: 1.2 (1.5 Mesa 6.2.1)

you may need to do

# emerge -av eselect-opengl

# eselect opengl set ati

# source /etc/profile

Also, make sure DRI is enabled and started with the proper permissions set in your xorg.conf as well, as explained in this section. A proper output looks like follows:

display: :0.0  screen: 0

OpenGL vendor string: ATI Technologies Inc.

OpenGL renderer string: MOBILITY RADEON X300 Generic

OpenGL version string: 2.0.5695 (8.23.7)

OpenGL should work properly now with DRI enabled. Check with glxinfo.

[edit]ACPI script missing finger command

If you get the following errors in /var/log/acpid:

/etc/acpi/ati-powermode.sh: line 8: finger: command not found

/etc/acpi/ati-powermode.sh: line 10: finger: command not found

Install the netkit-fingerd package, which provides the finger command.

# emerge -av netkit-fingerd

[edit]Open ACPI failed (/var/run/acpid.socket) (No such file or directory)

ACPI service is probably not runing.

# /etc/init.d/acpid start

[edit]Failed to load module "dri2" (module does not exist, 0)

This is normal. Fglrx doesn't use the dri and dri2 modules.

Categories: Articles that need to be fixed | Graphics Cards

----------

## geraint0923

 *javashen wrote:*   

> 笔记本的显卡是ati hd 4500，安装的是xorg-server 1.6.5-r1，没有写xorg.conf文件，在安装radeon的情况下，xwindow可以启动，如果安装radeon或fglrx，启动时日志如下：
> 
> (II) Loading extension XFree86-DRI
> 
> (II) LoadModule: "dri2"
> ...

 

我曾经也遇到过这样的问题，我当时是直接使用fglrx的官方闭源驱动，安装完后马上启动X无法启动，后来google了一下，需要使用aticonfig命令将相关的参数设置到/etc/X11/xorg.conf里面去，之后就能够启动了

----------

