Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Howto get SIS630+DRI+OpenGL working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
ChojinDSL
l33t
l33t


Joined: 07 Jul 2003
Posts: 783

PostPosted: Sat Apr 09, 2005 5:41 am    Post subject: Howto get SIS630+DRI+OpenGL working Reply with quote

The SIS630 grafx chip is nothing to write home about. Its opengl performance is abysmal on anything above 800x600. For what seems like an eternity I was never able to get accelarated opengl working on my laptop using this chipset.
At one point (a long while back) I got it working under a 2.4 kernel and by following the instructions at www.winischhofer.net. The procedure involved some manual copying of .so files and such. But then I did some updates (most notably xfree to xorg) and I wasnt able to get it working again...until now that is.

My laptop runs a 2.6 kernel. The gentoo kernel to be specific. I have found that basically, its quite easy to get opengl working. There are just a few things to watch out for.

It used to be that you had to to enable sisfb (the sis framebuffer) in order for it to work. Or at least it said so in winischhofer's docs. Well that seems not be the case anymore. I dont have it compiled as a module or into the kernel. Instead I have a standard vesafb compiled.

So basically here are the steps, but I dont know if each of this is required or not, I just know this is what I have, and it works:

1. In your kernel config, compile agpgart and agp for sis as a module.

2. Activate DRI support and select sis, as a module. (This seems to be required.)

3. Use Xorg!! (This also seems to be requirement.)

4. Copy the relevant parts from xorg.conf

Code:

Section "Module"
    Load        "dbe"     # Double buffer extension

    SubSection  "extmod"
    EndSubSection

    Load        "type1"
    Load        "speedo"
    Load        "freetype"
    Load        "xtt"

    Load       "glx"
    Load       "GLcore"
    Load   "record"
   Load   "bitmap"
    Load    "extmod"
   Load   "synaptics"
EndSection


Section "Files"

    RgbPath   "/usr/X11R6/lib/X11/rgb"

    FontPath   "/usr/share/fonts/75dpi/:unscaled"
    FontPath   "/usr/share/fonts/100dpi/:unscaled"
    FontPath   "/usr/share/fonts/100dpi"
    FontPath   "/usr/share/fonts/75dpi"
    FontPath   "/usr/share/fonts/CID"
    FontPath   "/usr/share/fonts/Speedo"
    FontPath   "/usr/share/fonts/TTF"
    FontPath   "/usr/share/fonts/Type1"
    FontPath   "/usr/share/fonts/corefonts"
    FontPath   "/usr/share/fonts/cyrillic"
    FontPath   "/usr/share/fonts/encodings"
    FontPath   "/usr/share/fonts/freefont"
    FontPath   "/usr/share/fonts/local"
    FontPath   "/usr/share/fonts/misc"
    FontPath   "/usr/share/fonts/terminus"
    FontPath   "/usr/share/fonts/ttf-bitstream-vera"
    FontPath   "/usr/share/fonts/ukr"
    FontPath   "/usr/share/fonts/unifont"
    FontPath   "/usr/share/fonts/util"
    FontPath   "/usr/share/fonts/artwiz"
   
EndSection

Section "ServerFlags"

EndSection

Section "InputDevice"
    Identifier   "Keyboard1"
    Driver   "kbd"
    Option "AutoRepeat" "500 30"
    Option "XkbRules"   "xorg"
    Option "XkbModel"   "pc102"
    Option "XkbLayout"   "de"
EndSection


Section "InputDevice"
    Identifier   "Mouse1"
    Driver   "mouse"
    Option "Protocol"    "auto"
   Option "Device" "/dev/input/mice"
    Option "ZAxisMapping" "4 5"
EndSection



Section "Monitor"
    Identifier  "LCD"
    HorizSync   31.5 - 57.0
    VertRefresh 50-70
    DisplaySize 305 228
   Option "DPMS"
EndSection

Section "Device"
    Identifier   "Standard VGA"
    VendorName   "Unknown"
    BoardName   "Unknown"
    Driver     "vga"
EndSection


Section "Device"
    Identifier  "SIS630"
    Driver      "sis"
   Option   "MaxXFBMem" "12288"   

    Option "fifo_aggressive"
    Option "fast_vram"
    Option "pci_burst_on"
    Option "UseSSE" "yes"
    Option "BenchmarkMencpy" "yes"
    Option "EnableSiSCtrl" "yes"
    Option "AGPSize" "32"
    Option "DRI" "on"
    Option "RenderAcceleration" "on"
EndSection

Section "Screen"
    Identifier  "Screen 1"
    Device      "SIS630"
    Monitor     "LCD"
    DefaultDepth 16

    Subsection "Display"
        Depth       8
        Modes       "1024x768" "800x600" "640x480" "640x400"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1024x768" "800x600" "640x480" "640x400"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "1024x768" "800x600" "640x480" "640x400"
        ViewPort    0 0
    EndSubsection
EndSection


Section "ServerLayout"
    Identifier  "Simple Layout"
    Screen "Screen 1"
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection

 Section "DRI"
    Mode 0666
 EndSection



It might or might not be necessary to run in 16bit as opposed to 24bit color.
On laptops, the sis630 uses shared memory. I have it set in my bios to 32mb. I think my xorg.conf reflects this.

One thing that used to trip me up was that in some old gentoo howto's, you were supposed to NOT enable DRI in the kernel and instead emerge xfree-drm, well needless to say, for this, you should NOT emerge xfree-drm!

In the past and in most other distros, I have found that even if glxinfo reports that direct rendering is working, once you run glxgears or any other opengl app for that matter, you would only see a black window, sometimes if you resize it you were able to see some seriously corrupted grfx, e.g. polygons that seemed to stretch to a certain point or something like that.

Now if you check glxinfo, you should see that direct rendering is enabled, AND that in glxgears, the gears actually show up!

Oh and by the way, on my laptop with 32mb shared ram configured, my glxgears performance is about 398fps.
My laptop is a P3 1.1ghz with 512 mb ram.
Back to top
View user's profile Send private message
ChojinDSL
l33t
l33t


Joined: 07 Jul 2003
Posts: 783

PostPosted: Fri Apr 29, 2005 12:07 pm    Post subject: Reply with quote

******UPDATE*******

Ok, in the meantime Ive managed to break 3D accelaration with my SIS630 again. The same old story. Glxinfo reports direct rendering is on, but glxgears just shows a blank window, even though fps are counted at the console.

Ive spent ages trying to backtrack to find out what broke it in the first place, since I ugraded a few things in the meantime. Apparently the culprit is an upgrade of glibc!

My initial install was a stage3 using the 2005.0 universal livecd and the grp package cd.
I also used a gentoo-sources kernel and compiled it using genkernel. More specifically, using "genkernel --udev --menuconfig all"

Once I broke 3D accelaration, I tried reverting to previous versions of different packages, but in the end I simply re-installed from stage3, and then upgraded one major package after another, always rebooting and seeing if 3D was still working. So far I've noticed that a gcc upgrade is ok and a kernel upgrade is ok, but glibc upgrade breaks the 3D.
I still have to test and see if 3D will break if I keep the glibc version, but recompile it with different use flags or compiler flags. Also, Im gonna test and see if it makes any difference if Im using the grp package xorg or if I compile it myself with my own use flags and cflags.

Oh by the way, I've noticed that this post has had a lot of views, I would appreciate a few feedback posts telling me if you managed to get it to work or not.

******update******

I've upgraded gcc to the latest, but I've reverted glibc to the one that was used with the 2005.0 universal livecd during a stage3 install.
That was glibc-2.3.4.20040808-r1.
By reverting the glibc version, 3D is working again. Now to see what else will break it.

******another update******
I tried recompiling the afore mentioned glibc version with ntpl. This also breaks 3D. Geez, this sure is one moody 3D chipset. If your shopping for a new lappy, avoid the SIS630 like the plague!
Back to top
View user's profile Send private message
ryszardzonk
Apprentice
Apprentice


Joined: 18 Dec 2003
Posts: 182
Location: Rzeszów, POLAND

PostPosted: Mon May 02, 2005 3:28 pm    Post subject: SIS DRI Reply with quote

Hello

For long time my dri acceleration was broken on my sis630 based laptop. I was sure I tried it all changing to different kernel , Xorg, opengl-update or drm with no success. only time i had it working was around last summer and since about December I just gave up trying to get it back working. I am really glad that You traced it back to glibc.
The problem with reverting glibc is that everything builded agaist it should be rebuilded again with older version or stuff may brake.

Other problem is that my whole system is linked agaist glibc builded with "nptl only". Would it help if I re-emerge glibc with both "nptl" and "non-nptl" versions? Is there anything else that would need to be reemerged

Thanks in advance

P.S. Once more good job tracing back the problem 8)
_________________
Sky is not the limit...
Back to top
View user's profile Send private message
ChojinDSL
l33t
l33t


Joined: 07 Jul 2003
Posts: 783

PostPosted: Wed May 04, 2005 11:41 pm    Post subject: Reply with quote

No idea if ntpl can be used at all.
My laptop started with a fresh stage3 from the 2005.0 universal livecd.

I have no idea why this chipset is soooo damn picky and sensitive.
I can imagine that there is probably even more stuff that might affect it or not.
I would suggest, if you absolutely HAVE to get it to work, is to start off with a 2005.0 livecd, stage3 install and stick with provided glibc version. It sucks but what are you gonna do.

What I would really like to know is, why does it break with an update of glibc?
I mean the driver in xorg still builds, and glxinfo reports direct rendering to be working, but the actual window stays black.
I should probably notify Thomas Winischhofer (the author of the Open source SIS630 driver), of this.
Back to top
View user's profile Send private message
jhr0771
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2003
Posts: 90

PostPosted: Sun Feb 12, 2006 6:14 am    Post subject: Reply with quote

Thanks !!!, Its the first time a could make work my SiS630 card !!
Back to top
View user's profile Send private message
!equilibrium
Bodhisattva
Bodhisattva


Joined: 06 Jun 2004
Posts: 2109
Location: MI/BG/LC

PostPosted: Mon Jul 31, 2006 4:05 pm    Post subject: Reply with quote

here a more useful xorg.conf Device section:

Code:
Section "Device"
        Identifier  "Card0"
        Driver      "sis"
        VendorName  "SiS"
        BoardName   "SiS 630"
        BusID       "PCI:1:0:0"

        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        Option     "DRI"                "true"
        Option     "AccellMethod"       "EXA"
        Option     "TurboQueue"         "true"
        Option    "MaxXFBMem"          "12288"
        Option     "EnableSiSCtrl"      "true"
        Option     "fifo_aggressive"            "true"
        Option     "fast_vram"          "true"
        Option     "pci_burst_on"       "true"
        Option     "AGPSize"            "256"
        Option     "HWCursor"              "true"
        Option     "UseColorHWCursor"      "true"
        Option     "ColorHWCursorBlending" "true"
EndSection

_________________
Arch Tester for Gentoo/FreeBSD
Equilibrium's Universe

all my contents are released under the Creative Commons Licence by-nc-nd 2.5
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum