Open DRI in Linux (Reprinted from Minzhu's pickles)
Source: Internet
Author: User
Open DRI in Linux (Reprinted from Minzhu's pickles)-Linux general technology-Linux technology and application information. The following is a detailed description. Author: Minzhu's pickles
This post is a process I have experienced when installing Compiz today (a 3D desktop environment similar to Bery, but may be replaced by Bery in the future. The content described here is currently only for my own work environment: X24 + Fedora6 + gnome
Compiz is included in Fedora6, but the Compiz version that comes with the original installation disk is too low. You need to update it. I am used to deleting it before installing it and running it as root:
Yum remove compiz
Yum install-y compiz
Remember to connect to the Internet at this stage.
Enable Compiz in Gnome:
System> preferences> desktop Effect
Click "enable desktop effect", but an error is reported, indicating that the desktop cannot be run.
Since Compiz is based on XGL, I run the following command line:
Glxgears
Normal, the gear is active, but the speed is very slow.
Because OpenGL on linux is Mesa, it relies heavily on the underlying DirectRenderInterface (DRI) and graphics card driver.
Run the following command:
Lsmod
See
DRM: Radeon
It indicates that the video card driver is normal, and DRI is faulty.
View
/Var/log/Xorg.0.log
The following information is found:
....
(=) RADEON (0): Using 24 bit depth buffer
(EE) RADEON (0): Static buffer allocation failed. Disabling DRI.
(EE) RADEON (0): At least 9216 kB of video memory needed at this resolution and depth.
....
(WW) RADEON (0): Direct rendering disabled
....
The 3rd line clearly shows that the X24 graphics card's built-in memory (8 Mb) is not enough, and the demand for video memory is determined by the resolution and color number set on the desktop, my current is:
1024x768 24 bit color
I changed the 24-bit color to 16-bit, restarted the XWindow, and solved the problem.
(Please note that you can manually add the following content at the end of the/etc/X11/xorg. conf file as root:
Section "DRI"
Group "video"
Mode 0660
EndSection
To ensure that all users can use DRI.
Because DRI is normal, this is a test
Glxgears
It's much faster.
System> preferences> desktop Effect
Everything is normal. You can rotate the desktop in 3D mode, and the effect of dragging the window is much more vivid.
I'm so glad that I finally knew where the problem was.
I made the following attempts:
1. [root @ localhost/] # ln-s/usr/lib/dri/r300_dri.so/usr/lib/xorg/modules/dri/r300_dri.so
According to the above statement, it may be that my dri is not configured, but when I connect with the above command, the prompt file already exists, so this should not be the problem. In addition, I checked the relevant files under/var/log and checked the error information. The dri part was successfully loaded. If it does not exist, the path cannot be loaded because it is incorrect.
2. [root @ localhost luyaotang] # LIBGL_DEBUG = verbose glxinfo
Name of display: 0.0
LibGL: XF86DRIGetClientDriverName: 5.2.0 r300 (screen 0)
LibGL: OpenDriver: trying/usr/lib/dri/r300_dri.so
LibGL error: dlopen/usr/lib/dri/r300_dri.so failed (/usr/lib/dri/r300_dri.so: undefined symbol: _ glapi_get_dispatch)
LibGL error: unable to find driver: r300_dri.so
LibGL: XF86DRIGetClientDriverName: 5.2.0 r300 (screen 0)
LibGL: OpenDriver: trying/usr/lib/dri/r300_dri.so
LibGL error: dlopen/usr/lib/dri/r300_dri.so failed (/usr/lib/dri/r300_dri.so: undefined symbol: _ glapi_get_dispatch)
LibGL error: unable to find driver: r300_dri.so
Display: 0 screen: 0
Direct rendering: No
Server glx vendor string: SGI
Server glx version string: 1.2.
There are still problems with loading the library files, but it is not because the path does not exist. Baidu does not find the file, but GOOGLE does find it. In fact, Google is necessary to use Linux. The fglrx configuration, or the driver itself conflicts with our radeon and needs to be uninstalled.
3. [root @ localhost luyaotang] # yum remove kmod-fglrx xorg-x11-drv-fglrx
After this step, the problem persists.
4. Take a try and remove the configuration related to fglrx from/etc/profile. d.
[Root @ localhost luyaotang] # mv/etc/profile. d/ati-fglrx.sh/btdown/
5. Try again.
[Luyaotang @ localhost ~] $ Glxinfo | grep direct
LibGL warning: 3D driver claims to not support visual 0x4b
Direct rendering: Yes
3D acceleration has been successfully enabled.
6. Test the acceleration score. I don't know if I do not test it. I smiled at the test and found that there were more than 3 K. I didn't configure more than 1 K before:
[Luyaotang @ localhost ~] $ Glxgears
LibGL warning: 3D driver claims to not support visual 0x4b
15743 frames in 5.0 seconds = 3148.550 FPS
16727 frames in 5.0 seconds = 3345.365 FPS
16730 frames in 5.0 seconds = 3345.780 FPS
16725 frames in 5.0 seconds = 3344.950 FPS
16719 frames in 5.0 seconds = 3343.772 FPS
16729 frames in 5.0 seconds = 3345.648 FPS
16730 frames in 5.0 seconds = 3345.866 FPS
16711 frames in 5.0 seconds = 3342.129 FPS
16729 frames in 5.0 seconds = 3345.748 FPS
/=====================================/
/Etc/X11/xorg. conf configuration file
Xorg configuration created by system-config-display
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.