[Openchrome-users] No 3D support for chrome9 ?
Rona Dini Hari
rona_dinihari
Thu Feb 19 07:13:46 PST 2009
> "openchrome_dri.so" appears to be in the correct directory
> (I installed the latest mesa library), but I cannot find a trace
> of via_agp.so. Should this shared library come from the
> openchrome driver or from the mesa project?
I'm using chrome9 kernel dri driver and X11 chrome9 driver from via.linux website . I mixed old openchrome technique with via.linux packs installation guide. I'll put my note about it below. But if you wanna try out, you have to decide things on your own, since the kernel versions and X11 versions differences. Meaning if it looks different then you might have to find out by your self to fit it in yours.
You can also ask for support from via.linux website. They'll answer quickly if it isn't too much. I have my openSUSE 11.0 installation smooth but a bit unstable with openSUSE 11.1. The X11 from both distro works differently. When i asked for support with 11.0 they reply within 1 day. But right now it's been more than a week for support with the new 11.1 X11.
I'm using compiz with restrained configurations. 3D games works too but not always. I play emulated psx/ps-one games, BZ-Flage, Gl-117, Metal Warriors. Those titles works. I'm trying to work out UFOAI but i'm stuck, perhaps it's UFOAI team's own problem.
> Maybe I don't get 3D acceleration because my chip is not supported?
I'm not really sure about it either. From what i've read from via website (via main site), you can use directx 9 with ms-windows but nothing says about a real 3D functions inside the chip, just a 2D acceleration.
openSUSE 11.0 Chrome9 HOWTO
=========================
This HOWTO is about using Via driver for Via Chrome9 based display chipset with openSuSE 11.0. The work is actually very simple. The thing which makes it hard is the different releases of the same thing. I have to do some trial and error to find the right ones.
There are three kind of binary to use. The kernel AGP and DRM driver, kernel framebuffer driver, and the Xorg driver. Download them, make a working directory for this, and extract the package in it.
You have to prepare the kernel development packages. In OpenSuSE 11.0 it's very easy:
1. Run yast2 (X mode) or yast (terminal mode)
2. open 'Software Management'
3. make sure 'Filter' is set to 'Patterns'
4. look for 'Linux Kernel Development'
5. Install the whole thing inside the category.
The kernel DRI driver
---------------------
The kernel DRI driver is a patched original kernel DRI driver - VIA-chrom9-patch-for-openSUSE11.0rc1.tar.gz. Download the patch first:
1. Goto 'http://linux.via.com.tw/'
2. Set 'OS' to 'OpenSuSE11.0 RC1'
3. Set 'Platform' to 'CN896-VT8251'
4. Wait for a moment then you can download 'chrom9-patch (41.8K)'. The file should be VIA-chrom9-patch-for-openSUSE11.0rc1.tar.gz.
Now patch, compile and install kernel AGP and DRM modules. If have difficulty about this you may contact me again. If you start with fresh source installation it should works correctly:
1. Extract VIA-chrom9-patch-for-openSUSE11.0rc1.tar.gz in to your prefered directory
~/usr/src/> tar -xzvf VIA-chrom9-patch-for-openSUSE11.0rc1.tar.gz
2. Extract kernel AGP patch
~/usr/src/> cd VIA-chrom9-patch-for-openSUSE11.0rc1/VIA-AGP-patch -for-openSUSE11.0rc1
~/usr/src/VIA-chrom9-patch-for-openSUSE11.0rc1/VIA-AGP-patch -for-openSUSE11.0rc1/>tar -xzvf via-agp-patch-2.6.25.4-8.tar.gz
3. Extract kernel DRM patch
~/usr/src/VIA-chrom9-patch-for-openSUSE11.0rc1/VIA-AGP-patch -for-openSUSE11.0rc1/via-agp-patch-2.6.25.4-8/> cd ../../VIA-chrome9-DRM-patch-for-openSUSE11.0rc1
~/usr/src/via/VIA-chrom9-patch-for-openSUSE11.0rc1/VIA-chrome9-DRM-patch-for-openSUSE11.0rc1>
~/usr/src/VIA-chrom9-patch-for-openSUSE11.0rc1/VIA-AGP-patch -for-openSUSE11.0rc1/>tar -xzvf via-chrome9-drm-patch-2.6.25.4-8.tar.gz
3. Change to user root,go to linux source directory, Patch kernel AGP and DRM.
~/usr/src/VIA-chrom9-patch-for-openSUSE11.0rc1/VIA-AGP-patch -for-openSUSE11.0rc1/via-chrome9-drm-patch-2.6.25.4-8/> su
~/usr/src/VIA-chrom9-patch-for-openSUSE11.0rc1/VIA-AGP-patch -for-openSUSE11.0rc1/via-chrome9-drm-patch-2.6.25.4-8/> cd /usr/src/linux
/usr/src/linux/> patch -p0 < ~/usr/src/VIA-chrom9-patch-for-openSUSE11.0rc1/VIA-AGP-patch -for-openSUSE11.0rc1/via-agp-patch-2.6.25.4-8/via-agp.patch-2.6.25.4-8
/usr/src/linux/> patch -p0 < ~/usr/src/VIA-chrom9-patch-for-openSUSE11.0rc1/VIA-AGP-patch -for-openSUSE11.0rc1/via-chrome9-drm-patch-2.6.25.4-8/via-chrome9-drm.patch-2.6.25.4-8
4. Copy default kernel compile options
/usr/src/linux/> cp ../linux-obj/i586/default/.config
5. Compile kernel AGP modules (if you were asked about a new via kernel driver during compilation answer 'm' to compile via driver as module)
/usr/src/linux/> make drivers/char/agp/
/usr/src/linux/> make drivers/char/agp/agpgart.ko
/usr/src/linux/> make drivers/char/agp/via-agp.ko
6. Compile kernel DRM modules
/usr/src/linux/> make drivers/char/drm/
/usr/src/linux/> make drivers/char/drm/drm.ko
/usr/src/linux/> make drivers/char/drm/via_chrome9.ko
7. Install kernel AGP and DRM modules
/usr/src/linux/> cp drivers/char/agp/{agpgart,via-agp.ko}.ko /lib/modules/`uname -r`/kernel/drivers/char/agp/
/usr/src/linux/> cp drivers/char/drm/{drm,via_chrome9.ko}.ko /lib/modules/`uname -r`/kernel/drivers/char/drm/
/usr/src/linux/> depmod -ea
/usr/src/linux/> modprobe via-agp
/usr/src/linux/> modprobe agpgart
/usr/src/linux/> modprobe via_chrome9
/usr/src/linux/> modprobe drm
8. If there aren't any problem up to point 7, tell kernel to load it up every time it boots. Edit /etc/sysconfig/kernel and fill in the option.
/usr/src/linux/> vi /etc/sysconfig/kernel
MODULES_LOADED_ON_BOOT="agpgart via_agp via_chrome9 drm"
Frame Buffer Driver
------------------
Now for the framebuffer part, You have to extract, put files in /usr/src/linux, build the driver, install the driver, replace the VESA framebuffer (vesafb) with via frambuffer (viafb) driver module, modify some files to make memory space and load the driver at boot. A word of WARNING, it may FREEZE/LOCKUP your system if the values are wrong:
1. Change the working directory to yours
2. Extract viafb-2604-2.6.25-rc6-v16.tar.gz:
tar -xzvf viafb-2604-2.6.25-rc6-v16.tar.gz
3. Change to /usr/src/linux:
cd /usr/src/linux
4. Copy 'Documentation' and 'via' to /usr/src/linux:
cp -r /yourworkdir/Documentation /usr/src/linux
cp -r /yourworkdir/via /usr/src/linux/drivers/video/
5. Modify Makefile and Kconfig under /usr/src/linux/drivers/video (Taken from 'Step 3' of /usr/src/linux/Documentation/fb/viafb.txt):
add line to Makefile
"obj-$(CONFIG_FB_VIA) += via/"
add below lines to Kconfig
config FB_VIA
tristate "VIA UniChrome (Pro) and Chrome9 display support"
depends on FB && PCI
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
select FB_SOFT_CURSOR
help
This is the frame buffer device driver for Graphics
chips of VIA UniChrome Family(CLE266, PM800 / CN400 / CN300,
P4M800CE / P4M800Pro / CN700,
VN800 / CX700 / VX700, K8M890,
P4M890 / CN896 / P4M900, VX800)
Say Y if you have a VIA UniChrome graphics board. To compile
this driver as a module, choose M here: the module will be
called viafb.
6. Prepare kernel compile:
cd /usr/src/linux/
cp ../linux-obj/i586/default/.config .
7. Compile viafb:
make drivers/video/via/
(Answer m when asked about a new module)
make drivers/video/via/viafb.ko
8. Install the newly built viafb.ko:
md /lib/modules/`uname -r`/kernel/drivers/video/via
cp drivers/video/via/viafb.ko /lib/modules/`uname -r`/kernel/drivers/video/via/
depmod -ea
9. Modify /etc/sysconfig/console, /etc/X11/xorg.conf, /boot/grub/menu.lst:
/etc/sysconfig/console (Change parameters to yours):
...
FB_MODULES="viafb viafb_lcd_panel_id=19 via_fb_accel=0 viafb_active_dev=LCD+CRT viafb_display_hardware_layout=1 viafb_video_dev=LCD viafb_lcd_port=DFP_HIGHLOW"
...
/etc/X11/xorg.conf (Note the memory size, match it with BIOS):
...
Section "Device"
BoardName "Framebuffer Graphics"
BusID "1:0:0"
Identifier "Device[0]"
VendorName "VESA"
Driver "via"
Option "LCDPort" "DFP_HIGHLOW"
Option "NoDDCValue" "on"
Option "VideoRAM" "0x16000000"
EndSection
...
/boot/grub/menu.lst (Note the memory size, match it with BIOS):
...
title openSUSE 11.0 - 2.6.25.18-0.2-default - Test
root (hd0,0) kernel /boot/vmlinuz-2.6.25.18-0.2-default root=/dev/sda1 resume=/dev/sda2 splash=silent showopts elevator=cfq sysrq=1 nosmp vga=0x3b7 vmalloc=256MB mem=512M
initrd /boot/initrd-2.6.25.18-0.2-default
10. reboot.
Xorg X11 Driver
---------------
For the Xorg driver module:
1. Download chrome9.83-242-u804.tar.gz from via linux website (with option OS Ubuntu 8.04 LTS, Platform CN896+VT8251)
2. Extract chrome9.83-242-u804.tar.gz then go to extracted folder
~/usr/src/> tar -xzvf chrome9.83-242-u804.tar.gz
3. Log out from desktop manager
4. Login as user root from terminal using <CTRL><ALT><F1|...|F6>
5. Stop xdm
~/> service xdm stop
6. Change to extracted folder
cd chrome9.83-242-u804/
7. Install libGL.so.1.2.via_chrome9 in /usr/lib
~/usr/src/via/chrome9.83-242-u804> cp libGL.so.1.2.via_chrome9 /usr/lib/libGL.so.1.2.via
~/usr/src/via/chrome9.83-242-u804> cp /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1.2.bak
~/usr/src/via/chrome9.83-242-u804> rm /usr/lib/libGL.so.1
~/usr/src/via/chrome9.83-242-u804> rm /usr/lib/libGL.so.1.2
~/usr/src/via/chrome9.83-242-u804> ln -s /usr/lib/libGL.so.1.2.via /usr/lib/libGL.so.1.2
~/usr/src/via/chrome9.83-242-u804> ln -s /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1
8. Install via_chrome9_dri.so in /usr/lib/dri
~/usr/src/via/chrome9.83-242-u804> cp via_chrome9_dri.so /usr/lib/dri/via_chrome9_dri.so
9. Install via_drv.so in /usr/lib/xorg/modules/drivers/
~/usr/src/via/chrome9.83-242-u804> cp via_drv.so /usr/lib/xorg/modules/drivers/via_drv.so.via
~/usr/src/via/chrome9.83-242-u804> cp /usr/lib/xorg/modules/drivers/via_drv.so /usr/lib/xorg/modules/drivers/via_drv.so.bak
~/usr/src/via/chrome9.83-242-u804> rm /usr/lib/xorg/modules/drivers/via_drv.so
~/usr/src/via/chrome9.83-242-u804> ln -s /usr/lib/xorg/modules/drivers/via_drv.so.via /usr/lib/xorg/modules/drivers/via_drv.so
10. Setup xorg to use via xorg driver. If it's not working well go to step 11.
~/usr/src/via/chrome9.83-242-u804> sax2 -m 0=via
11. Check xorg.conf
~/usr/src/via/chrome9.83-242-u804> su
~/vi /etc/X11/xorg.conf
...
Section "Device"
BoardName "Framebuffer Graphics"
BusID "1:0:0"
Identifier "Device[0]"
VendorName "VESA"
Driver "via"
Option "LCDPort" "DFP_HIGHLOW"
Option "NoDDCValue"
Option "VideoRAM" "0x16000000"
EndSection
...
12. Start xdm
~/> service xdm start
13. Check installation
~/> glxinfo | grep rendering
direct rendering: Yes
~/> glxgears
Test
----
> glxinfo | grep -i render
direct rendering: Yes
OpenGL renderer string: S3/VIA Graphics Chrome9 HC IGP
> glxgears
4921 frames in 5.0 seconds = 984.152 FPS
Selalu bersama teman-teman di Yahoo! Messenger. Tambahkan mereka dari email atau jaringan sosial Anda sekarang! http://id.messenger.yahoo.com/invite/
More information about the Openchrome-users
mailing list