Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 05/05/2006, à 12:02

TidiusFF

Accélération 3D avec une carte VIA/SG3 UniChrome Pro IGP

Bonjour,

j'ai une carte graphique appelée par Windows VIA/SG3 UniChrome Pro IGP
Je voudrais savoir comment activer l'accélération 3D pour cette carte, car tout les jeux en 3D fonctionnent en ralenti, alors qu'un même jeu sous Windows marche correctement

Merci d'avance

Hors ligne

#2 Le 05/05/2006, à 20:29

TidiusFF

Re : Accélération 3D avec une carte VIA/SG3 UniChrome Pro IGP

smile UP big_smile

Hors ligne

#3 Le 06/05/2006, à 10:59

TidiusFF

Re : Accélération 3D avec une carte VIA/SG3 UniChrome Pro IGP

yikes UP

Hors ligne

#4 Le 06/05/2006, à 11:05

Stemp

Re : Accélération 3D avec une carte VIA/SG3 UniChrome Pro IGP


«La violence n'a jamais rien réglé» Gengis Khan 1162-1227
Blog | Crunchbang Linux | Arch Linux

Hors ligne

#5 Le 06/05/2006, à 13:13

TidiusFF

Re : Accélération 3D avec une carte VIA/SG3 UniChrome Pro IGP

Désolé mais je suis anglophobe tongue
Or le lien anglais me semble plus prometteur

Est qu'un anglophone pourrait explorer ces liens et m'indiquer des solutions?

Dernière modification par TidiusFF (Le 06/05/2006, à 14:29)

Hors ligne

#6 Le 07/05/2006, à 11:18

TidiusFF

Re : Accélération 3D avec une carte VIA/SG3 UniChrome Pro IGP

up
smile

Hors ligne

#7 Le 08/05/2006, à 10:54

TidiusFF

Re : Accélération 3D avec une carte VIA/SG3 UniChrome Pro IGP

roll UP

Dernière modification par TidiusFF (Le 08/05/2006, à 10:55)

Hors ligne

#8 Le 09/05/2006, à 17:31

TidiusFF

Re : Accélération 3D avec une carte VIA/SG3 UniChrome Pro IGP

lol up neutral

Hors ligne

#9 Le 09/05/2006, à 20:30

ludov

Re : Accélération 3D avec une carte VIA/SG3 UniChrome Pro IGP

Salut,

Unichrome

THIS DOCUMENT MIGHT CONTAIN OLDER AND DEPRECATED INFORMATION
Original document by Jaxon Lee.  Created: 2/1/05
Last edit: 2/13/05

VIA Unichrome and DRI HOWTO

(This document was produced as a tool to support both the end-users and the developers of the opensource unichrome drivers.  Clear and up-to-date documentation will only make the drivers more accessible to a wider range of users, thus providing developers with more feedback from users with a wider range of hardware.  Like the drivers, this HOWTO should be considered under heavy development.  It will evolve as the drivers evolve.)

I. Assumptions

a. At this point, it is assumed that you are NOT a newcomer to linux.  Installing all of the elements that will enable DRI is a task that will involve compiling and possibly troubleshooting from the command line.  At some date in the near future, all of the elements should be incorporated into their respective parent projects (2.6 kernel, X.org, etc.).  Until then, the end-user needs to put the pieces together.

b. You have at least a 2.6 kernel, your kernel sources, your xorg source files, and all standard linux developer tools.  I understand that this project works with a 2.4 kernel, but I haven't used the 2.4 kernel in about nine months, so I can provide little guidance in that area.   Also, many linux distributions (especially those that install off of live CD's) do not include the kernel sources or any compilers.  These obviously need to be installed before you proceed.

c. You need to have the hardware.  The Unichrome project supports the VIA unichrome 3D graphics controller.  These controllers are found in the VIA CLE266, KM400/KN400, K8M8000 and PM800/CN400 motherboard chipsets.  Commercially, these products include the VIA Epia-M systems and several laptops lines such as the lovely and economical Averatec 3200 series. (Can you guess what I have???)

II. Kit of Parts

a. The DRM kernel modules - These are called via.ko and drm.ko, respectively.  They will appear simply as "via" and "drm" after loading and listing with lsmod.  (The other two modules needed for DRM to function  [via_agp & agpgart] should already be loaded and configured if you're using any of the most popular linux distributions.  If they are not, this will require a kernel recompile to enable them, and that goes beyond the scope of this document.)  Several DRM modules are made available by the linux kernel, but Via is not one of them, at least not yet (2.6.11-rc2 has finally put it in).  So, essentially we must build it and put it in the right place.  Via DRM is not part of the Unichrome project.  It currently has a home at freedesktop.org, where you can download CVS snapshots.  The one I have tested and know is working is dated 2/12/2005.  Download it here:  http://dri.freedesktop.org/snapshots/

b. The Unichrome Xorg display driver - This package is listed on the Unichrome Sourceforge page:  http://sourceforge.net/projects/unichrome, under unichrome-xfree86.  (Don't let that heading discourage you; it works just fine with xorg!)  Get the release-30 file dated 1/26/2005.  This package will ultimately give you an xorg driver called via_drv.o.  By itself, it is a fine alternative to the vesa driver you are currently using.  It enhances video playback, and your screen can now blank-out.  But there is no DRI magic.  Yet!

c. The unichrome-3D-drivers - Here's the magic.  Get this package also from the Unichrome Sourceforge page.  The most recent is dated 2/12/2005.  The package includes two tiny files that make everything happen.  LibGL.so.1.2 and unichrome_dri.so.


III. Building everything

a. First make sure that your kernel sources are installed properly.  If they are not, this first piece won't work.  Untar your Via DRM module snapshot and disregard everything except for the /dripkg/drm/linux-core directory.  Go into this directory and type: make DRM_MODULES="via" (no need to be root).  Now sit back for about two minutes and watch the modules compile.  When this is finished, copy via.ko and drm.ko (as root) over into /lib/modules/2.6.xxx/kernel/drivers/char/drm/.  Type "depmod -a" to register the driver.  (Note: for 2.4 kernel users, user the /dripkg/drm/linux directory, and copy over the file via.o).  Now let's test our work with "modprobe via".  It should auto-load drm at the same time.  To see if the modules loaded without a hitch, type "dmesg" and check out what the kernel says.  Here's what mine says, and even though it looks a bit stomach-wrenching, it's fine:

[drm] Initialized drm 1.0.0 20040925
PCI: Unable to reserve mem region #1:4000000@d8000000 for device 0000:01:00.0
[drm] Initialized via 2.4.5 20050203 on minor 0: VIA Technologies, Inc. VT8378 [S3 UniChrome] Integrated Video
[drm] Used old pci detect: framebuffer loaded
agpgart: Found an AGP 3.5 compliant device at 0000:00:00.0.
agpgart: Device is in legacy mode, falling back to 2.x
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode

Any other error messages or something to indicate that DRM will not load, and you may have some kernel issues.  Head to the mailing lists mentioned in the Troubleshooting section.  Note: you should not have to manually load these modules in the future.  Startx will auto-load them as needed  However, if you use udev, you either need to modify udev's permissions config for /dev/dri/card0 which I'm not skilled enough to explain, or you need to load via through a local script at boot time and then manually change permission on /dev/dri/card0 BEFORE you load X.

b. Now it's time for the heavy lifting.  Remember we talked about having the xorg sources?  Well, break them out and let's compile them!  (Make sure they match your actual installed version.)  And also, break out the coffee and smokes because as they say in Arkansas, "It's gon be a minit".  Untar everything to a directory that should read "xc".  Go into xc and do a "make World".  Then, it's time for that extra venti mochachino latte with extra whip cream and about four Marlboro lights menthol (box please).  Ninety minutes later, either you will have finished, or compiling will stop with some cryptic error.  Either way, you should be in business.  Even if compiling errors-out, it should complete enough for you to do the next step.  Go into /xc/programs/Xserver/hw/xfree86/drivers.  Remove the "via" directory.  Now, untar your unichrome-r-30.  That's your new "via" directory.  Just rename it to "via" and slide it over into your /xc/programs/Xserver/hw/xfree86/drivers.  While still in the  /xc/programs/Xserver/hw/xfree86/drivers directory, remake the makefiles with "make Makefiles".  Then hop into your new "via" subdirectory and "make" and "make install" (as root).  If the planets have aligned, then a little file called via_drv.o was created and copied into /usr/X11R6/lib/modules/drivers.  If it is not there, copy it yourself.  Almost done!

c. Let's backup some files first.  Jump into /usr/X11/lib and copy libGL.so.1.2 into some safe place in your home directory.  Now, untar your opensource 3D driver package, `cause it's magic time!  Replace libGL.so.1.2 with the one in the package.  Then jump into /usr/X11/lib/modules/dri and copy over the unichrome_dri.so file.  You may want to create a symlink to unichrome_dri.so called via_dri.so, although I'm not sure this is necessary.  We are now done with tough stuff!


IV. Configuring

a. First, the permission issue.  This is a dirty hack, but I have not taken any time to learn the innards of udev.  As root, type "chmod 666 /dev/dri/card0".  This will enable a regular user to use dri.  I know I should fix it via udev's config, and I intend on figuring that out in the near future and posting an update to this HOWTO.  For now, I put this command after "modprobe via" in my /etc/rc.d/rc.local file.

b. Open up your /etc/X11/xorg.conf file and let's talk about driver configuration.  (Be good, and back it up first?)  You need to enable DRI with {Load "dri"}, but omit the braces.  This line usually comes after {Load "glx"}.  Then, we must call the driver properly and configure it with the correct options.  Here's my entry:

Section "Device"
    Identifier "VIA Unichrome"
    Driver "via"
    VendorName "VIA"
    BoardName "Unichrome (KM400)"
    Option "DisableIRQ"
    Option "EnableAGPDMA"
EndSection

The "Driver" and "Option" lines should be verbatim, but you can call the others what you like as long as you put everything together properly in the "Screen"' section.  Here's mine:

Section "Screen"
    Identifier  "Accelerated"
    Device "VIA Unichrome"
    Monitor "LCD"
    DefaultDepth 16
    Subsection "Display"
        Depth       16
        Modes "1024x768" "800x600" "640x480"
    EndSubsection
EndSection

And the "ServerLayout" activates my "Accelerated" display:

Section "ServerLayout"
    Identifier  "Simple Layout"
    Screen "Accelerated"
    InputDevice "Synaptics" "CorePointer"
    InputDevice "USB Mouse" "SendCoreEvents"
    InputDevice "Keyboard" "CoreKeyboard"
    InputDevice "USB Keyboard" "AlwaysCore"
EndSection

And finally, don't forget to change the permissions on DRI for X.  Somewhere in your xorg.conf, you should have:

Section "DRI"
    Mode 0666
EndSection

And that's it!  We're ready for 3D/DRI, right?


V. Testing and Troubleshooting

a. Make sure you are booting to the command-line at this point.  Booting graphically will obviously hurt our ability to troubleshoot.

b. Set your window manager to something like fluxbox so you don't have to wait 5 minutes for KDE to load.

c. Type "startx", cross your fingers, throw the chicken-bones, spin around in a circle, and toss salt over your shoulder.

d. If everything worked, you should have dri enabled.  Pull up a terminal and type "export LIBGL_DEBUG=verbose" (This is a holy mantra; do not forget it!) and then type "glxinfo".  If you're rocking, you'll see a "direct rendering: Yes."  If you see a "no" you should also see some reasons why.

e. The mighty program gxlgears will let you check your approximate framerate.  With a 16-bit resolution setting, your glxgears will be about 680fps.

f. Also, check your xorg.0.log file in /var/log/.  You should see cool stuff like:

(II) VIA(0): 3D Engine has been initialized.
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 6, (OK)
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 6, (OK)
drmOpenByBusid: Searching for BusID PCI:1:0:0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 6, (OK)
drmOpenByBusid: drmOpenMinor returns 6
drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
(II) VIA(0): [drm] DRM interface version 1.2
(II) VIA(0): [drm] created "via" driver at busid "PCI:1:0:0"
(II) VIA(0): [drm] added 8192 byte SAREA at 0xdebd3000
(II) VIA(0): [drm] mapped SAREA 0xdebd3000 to 0xb5c9c000
(II) VIA(0): [drm] framebuffer handle = 0xd8000000
(II) VIA(0): [drm] added 1 reserved context for kernel
(II) VIA(0): [dri] visual configs initialized.
(II) VIA(0): [drm] register handle = 0xde000000
(II) VIA(0): [drm] mmio Registers = 0xde000000
(II) VIA(0): [dri] mmio mapped.
(II) VIA(0): VIAInternalScreenInit
(II) VIA(0): Using XFree86 Acceleration Architecture (XAA)
    Screen to screen bit blits
    Solid filled rectangles
    8x8 mono pattern filled rectangles
    8x8 color pattern filled rectangles
    Solid Lines
    Dashed Lines
    Image Writes
    Offscreen Pixmaps
    Setting up tile and stipple cache:
        32 128x128 slots
        10 256x256 slots
        32 8x8 color pattern slots
(==) VIA(0): Backing store disabled
(II) VIA(0): [drm] drmAgpEnabled succeeded
(II) VIA(0): [drm] agpAddr = 0xe0000000
(II) VIA(0): [drm] agpBase = (nil)
(II) VIA(0): [drm] agpAddr = 0xe0000000
(II) VIA(0): [drm] agpSize = 0x01e00000
(II) VIA(0): [drm] agp physical addr = 0x00000000
(II) VIA(0): [dri] use agp.
(II) VIA(0): [drm] FBFreeStart= 0x00400000 FBFreeEnd= 0x01fbe000 FBSize= 0x01bbe000
(II) VIA(0): [dri] frame buffer initialized.
(II) VIA(0): X context handle = 0x00000001
(II) VIA(0): [drm] installed DRM signal handler
(II) VIA(0): [DRI] installation complete
(II) VIA(0): [dri] kernel data initialized.
(II) VIA(0): [drm] Initialized AGP ring-buffer, size 0x200000 at AGP offset 0x1e00000.
(II) VIA(0): direct rendering enabled

If not, again, you should at least see some valuable troubleshooting info.

g. If dri is not working, get thee to the mailing list archives.
Here: http://sourceforge.net/mailarchive/forum.php?forum_id=38837
And
Here:  http://sourceforge.net/mailarchive/forum.php?forum_id=38615

h. If you still are stumped, subscribe and post to the mailing list.  Be sure to have a copy of your glxinfo and xorg.0.log, as well as your system config, kernel version, and xorg version.

Un peu d'aide pour la trad :

http://www.systran.fr/index.html

http://www.google.fr/language_tools?hl=fr

good luck