Getting my sis graphics hardware acceleration to work - Mesa and DXX error
I am trying to enable 3d graphics card (sis 630/700 (I think))
I believed the steps to doing this were to compile DRM modules (video card drivers) and then make sure Mesa (or libGL) was using these. So far I have done the following: - Have compiled and successfully loaded a new kernel (2.4.35). - Used the new kernel to load some DRM kernel modules. - Accomplished all 3 prerequisites for installing Mesa-7.0.1 according to the web-sites instructions: 1. Getting the DRM kernel modules which Mesa directed me to, which seemed to compile successfully. They found my kernel config file. I downloaded several types of this, some provided for sis specifically, some were provided with XFree86 4.6.0, which I didn't end up compiling when I downloaded and compiled this graphical system, and one from DRM which I got from the direction of the Mesa instruction file (http://dri.sf.net/). The one I used, I believe, was the one that Mesa directed me to. I suppose there were also DRM modules compiled by my kernel? 2. glxproto.h 3. DRI-enabled X server There were a lot of other problems with compiling - glxproto.h WAS missing; a file (Mesa-7.0.1/src/glx/glxext.c) tried to include Xfixes.h and Xdamage.h, which didn't exist on my system. I simply commented out these lines, and it compiled. Another file (Mesa-7.0.1/src/mesa/drivers/dri/common/xmlconfig.c) called for a file expat.h which existed on my system in /usr/X11R6/include, but either Mesa or gcc was not finding these during compilation. I simply copied this file (expat.h) to Mesa-7.0.1/include, and after this Mesa compiled, I believe, completely. - Now my /var/log/XFree86.0.log seems to report that drm is finding my card and everything is set up for my graphics card to work with direct rendering. However, when I run glxgears or glxinfo, I am told " SiS DRI driver expected DDX version 0-0.8.x but got version 0.7.0 libGL warning: 3D driver returned no fbconfigs. libGL error: InitDriver failed libGL error: reverting to (slow) indirect rendering " I looked a bit at what this DDX is (/usr/X11R6/lib/X11/doc/ddx.txt), but couldn't make too much sense of it. I am still not very sure how the different parts of direct rendering work together - from kernel modules, to DRI libraries, to DRM modules (which I believe are kernel modules?) to Mesa and Mesa-dri libraries, and now to DDX. I've mostly used the Mesa compile instructions for help on how to do stuff, and the DRI instructions (http://dri.freedesktop.org/wiki/Building.html, I believe). The DRI instructions supposed a lot of things: it seemed to describe a version of Mesa I didn't have, and it explained how to get it using only specific packaging systems. It also seemed to be a set of instructions specifically for an X.org graphical system, and I have XFree86. Does anyone know why I get this DDX error message? Any thought on what part of my direct rendering isn't working, or how to find out what part isn't working? Is it because my graphical system is not compatible with my DRM modules? I am running on a DSL hardrive install (because I havn't yet bothered to order a fuller linux operating system). As I said above, I've installed XFree86 to replace the Xvesa that was provided, and I compiled a new kernel (2.4.35). Thanks for any help. Matthew |
Quote:
But it looks, from your results, that you are mistaken. |
dsl@box:~$ lspci
0000:00:00.0 Host bridge: Silicon Integrated Systems [SiS] 630 Host (rev 21) 0000:00:00.1 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev d0) 0000:00:01.0 ISA bridge: Silicon Integrated Systems [SiS] SiS85C503/5513 (LPC Bridge) 0000:00:01.1 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet (rev 83) 0000:00:01.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 07) 0000:00:01.3 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 07) 0000:00:01.4 Multimedia audio controller: Silicon Integrated Systems [SiS] SiS PCI Audio Accelerator (rev 02) 0000:00:01.6 Modem: Silicon Integrated Systems [SiS] AC'97 Modem Controller (rev a0) 0000:00:02.0 PCI bridge: Silicon Integrated Systems [SiS] Virtual PCI-to-PCI bridge (AGP) 0000:01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 630/730 PCI/AGP VGA Display Adapter (rev 21 |
Quote:
Good... now, read the man page for the sis driver: pay special attention to chapter 3. "300 series specific information". (The manual includes 630/730 in the "300 Series".) You also need to visit: http://www.winischhofer.at/linuxsisvga.shtml AFAIK: You will not be using mesa ... you want the sis driver with the sisfb framebuffer driver and a few additional xorg.conf entries. Now you are pointed in the right direction: have fun :) |
Thanks a lot, I will give it a try.
|
I am going to go try this, yet, so this may not be an issue, but will I need to reset the GL and glut libraries?
This may not even be a relevant question... |
I've tried out winischhofer's suggestions - some of it seems to be working, but my system is not finding sisfb in the kernel, both when it is compiled as a module and when compiled into the kernel. Right now my system does not show a console - the boot process leaves the screen blank until XFree86 comes up. As well, in the XFree86 log file, I am told sisfb is not being found. Other than that the log file seems to show no problems.
It seems like I lost my console when I turned off the VGA and vesa fb options in my kernel (which is 2.4.35). One thing to note is that the version of the X.org sis driver I downloaded doesn't match my version of XFree86 (4.6 with gcc 3.x) since there wasn't one for this new a version of XFree86. I have also turned my BIOS from a PCI graphic option to AGP, even though I didn't know what these are. Then, also in the BIOS, I gave it 32 MB of video memory, and it gave me the option of the memory address for this, which I left as is. Lilo passes the mem:12288 option, as does MaxXFBMem in the XF86Config-4 file. I thought this was important since I lost my "graphical" console (?). Any ideas on what might be wrong? I don't always understand all the options in the kernel configuration, so I wouldn't be suprised if these are out of line. I turned off all DRM and AGP modules for video cards other than sis. sis DRM is a module, and I think all other sis options are statically compiled. " * For 2.4: Enable "Prompt for development and/or incomplete code/drivers" in Code Maturity Level Options, "SiS Acceleration" or "SiS display support" along with your type of chipset in Console Drivers->Framebuffer support. If you happen to select Advanced Low Level Driver Options (which I do not recommend), you *must* select "8 bpp packed pixel support", "16 bpp packed pixel support" and "32 bpp packed pixel support" as well. * For 2.6: Go to "Device Drivers"->"Graphics Support" and enable "Support for framebuffer devices", "SiS acceleration" along with your type of chipset (for XGI, select "SiS315/330"). Then go to the sub-menu Console display driver support and enable "Framebuffer Console support". Leave "Select compile-in fonts" unchecked. Furthermore make sure that "VESA VGA graphics support" is disabled as well." - http://www.winischhofer.eu/linuxsispart4.shtml#download " # Enable SiS DRM support in the kernel configuration (under "Character Devices"). Choose the SiS DRM to be compiled as a module (not statically into the kernel). The module will be loaded automatically, no need to modprobe it. # Enable AGP support in your kernel configuration (not for PCI versions of SIS 300/305 cards). It is recommended to compile AGP statically into the kernel. Note: The AGP driver to use depends on what host chipset you have. On SiS 630/730 and assumingly 540, this is "SiS generic". If you use a SiS 300/305 (AGP) in a non-SiS mainboard, check the manufacturer of your AGP host controller. " - http://www.winischhofer.net/sisdri.shtml I am going to go over the kernel options again another day, maybe. I am not sure if I remember seeing that Framebuffer Console Support option. Does one of the kernel options specifically enable winischhofer's sisfb module? Thanks for any help, Matthew |
Quote:
|
sisfb in kernel
I installed a completely new kernel though - so that I would have the correct source tree for compiling my DRM modules.
Yeah, I might end up getting a more complete distro soon. I think it is a good idea, rather than trying to add stuff to DSL. |
I think I was wrong about modprobe - sisfb does seem to be found by my kernel.
{edit} After changing some things and running lilo, the X log file now indicated sisfb is being found, though modprobe and sisfbctrl both indicate otherwise. (end edit) Here are some messages from my system. It looks like dri is running, but glxinfo doesn't show it. Could the issue be with the GL libraries? Also, a modules called libvbe.a fails to load. Here is the dmesg messages: I've tried seperating the sis-related messages from the rest. Code:
Linux version 2.4.35 (root@box) (gcc version 3.3.4 (Debian 1:3.3.4-7)) #22 SMP Mon Aug 6 16:21:46 EDT 2007 |
Here is the X log file:
Code:
_ |
lilo.conf has in it:
append="hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi apm=power-off nomce noapic video=sisfb:mode:1024x768x16,mem:12288" XF86Config-4: Code:
Section "ServerLayout" glxinfo: Code:
name of display: :0.0 Code:
|
It's working!
I read the DRI troubleshooting, which told me how to read the error messages from GL. This indicated my dri driver wasn't compatible with my libGL files, so I re-installed XFree86 4.6, and then it worked. Thanks for your help. I am glad I finally got this working. |
I know my questions will quickly be drowned out by new posts, but I am going to keep posting.
Here is the text from this site: http://people.freedesktop.org/~ajax/dri-explanation.txt about DDX. --- Definitions People frequently get confused by the proliferation of acronyms surrounding OpenGL support on Linux. This document is a vain hope to reduce the confusion. Definitions are given in expository order rather than alphabetical; hopefully by the end you will understand better. Hey, I can dream. I'm focusing on Linux 2.6. OpenGL: 3D graphics specification from SGI, descended from an earlier product called IRIS GL, competitor of Direct3D and QuickDraw3D (deceased). Frequently abbreviated "GL", particularly on Linux, since "OpenGL" is a trademark, and use of the trademark requires passing a (non-free) conformance suite. GLX: GL is a graphics language, not a windowing system. "GLX" refers to the extension that binds GL to the X11 window system, enabling 3D drawing on X windows. GLX is an extension to the X protocol. There are similar bindings for other window systems too - WGL on Windows, AGL on MacOS. In X, the client side GLX library is called libGL, and the server side extension is called libglx. Direct rendering: There are two ways a GL program can get its drawing done. Either the client can do the drawing itself, or it can pass the GL requests to the server and have the server do the drawing. Server-side rendering is called "indirect rendering", and client-side rendering is called "direct rendering". Direct rendering is usually faster. This is especially true for Xorg, where the server's indirect renderer is entirely done in software. DRI: The Direct Rendering Infrastructure is a technology that enables direct rendering for GL programs on Linux and BSD operating systems. Mesa: Mesa is a work-alike implementation of GL written by Brian Paul and dozens of contributors. It contains a software rasterizer, a GL state machine, and bindings to several window systems including X and Win32. All the open- source DRI drivers are based on Mesa, as well as several closed-source DRI drivers. DRI driver: This is where all the excitement happens. The DRI driver is responsible for programming the 3D hardware. Usually DRI drivers use the Mesa state machine. In the DRI, the GLX client-side library loads a DRI driver, named something_dri.so. DRM driver: This is the kernel-side component of the DRI. The DRM is responsible for security and handling resource contention. Not particularly interesting, but mandatory. These are named something.ko in Linux 2.6. DDX driver: This is a part of the X server, responsible for the other sorts of X drawing like Render and Xv. The DDX has to be DRI-aware, but otherwise not much GL-related happens in the DDX. AGP: AGP is a fast version of the PCI local bus, with additional features for graphics hardware. The core AGP kernel module is called agpgart.ko. AGP chipset: Different motherboards have different chipsets and thus different implementations of the AGP feature set. You need the one corresponding to your motherboard chipset. This is probably not always the same as your video chipset. Via chipsets need via-agp.ko, etc. --- Configuration So what do you need? - Kernel: DRM driver corresponding to your video card AGP core support AGP chipset support corresponding to your motherboard For most supported cards, you have the DRM driver already. The exceptions as of 2.6.9-ish are mach64 and savage. For those, you need to build the DRM from CVS, as outlined on http://dri.freedesktop.org/wiki/Building . Every kernel since the dawn of time has the necessary AGP bits. Load the AGP core module. Load the AGP chipset module. Load the DRM module. Make sure /dev/dri/card0 exists and is writable by you. - Userspace: DRI driver DRI-aware DDX DRI-aware libGL For most supported cards, you have the userspace pieces already. The exceptions, as of Xorg 6.8, are again mach64 and savage. For those you need to build the Xorg server with "#define BuildDevelDRIDrivers YES" in host.def. Put Load "dri" and Load "glx" lines in xorg.conf. Make sure you're using the DRI-aware DDX driver and not vesa or fbdev or whatever. Start X. Make sure 'grep Direct /var/log/Xorg.0.log' says "Direct rendering enabled". Run glxinfo, and check that it says "direct rendering: Yes". Congrats, you win. Yes, it really is that easy. |
It seems like to get openGL version 2 - which I think will need to be through Mesa GL and dri, I will have to do something about my "DDX" driver. When I compile mesa linux-dri and install it, I still get an error about not having the right DDX version.
So either I will have to find out how to get a different DDX driver, or I may try to install X.org instead of XFree86. |
All times are GMT -5. The time now is 05:46 PM. |