LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Direct Rendering Infrastructure DRI on VIA\S3 Savage (https://www.linuxquestions.org/questions/linux-hardware-18/direct-rendering-infrastructure-dri-on-via%5Cs3-savage-168951/)

azeemarif 08-03-2005 02:31 AM

This thread is such a wonderful resource for the people stuck with S3 graphics card for enabling DRI in Linux. Thanks to /bin/bash for starting this thread.

Since the time I read this thread the very first time, to the present, I had to enable DRI for S3 Savage graphics card many a times (sometimes because of new installation and sometimes because of kernel compilation).

I have learned few lessons during the process. I have put this knowledge in a post in my blog .

I hope it helps.

springshades 08-03-2005 06:37 AM

Has anyone heard of DRI working when loading X with the startx command but NOT working when loading with the kdm command? This also means that it doesn't work if I load up in run level 5, but it will work if I load in run level 3 and then type in startx.

I'm using Mandriva LE 2005 (10.2). I have a compaq presario 721 with a Savage Twister K.

Any ideas what the difference between the kdm and startx commands could be that would totally foobar up dri?

azeemarif 08-03-2005 07:15 PM

springshades


The problem you mentioned seems to be "libGL Hell" (Similar to DLL hell on windows).

In simple words, you might have more that 1 copy of libGL (or any other essential part of DRI), and starting X in run level 5 and run level 3 might have linked to the different libs or modules.

Please perform a simple test...

In run level 3, check if the command "glxinfo |grep direct" gives an answer "yes". It means DRI is enabled. Now please run the command "ldd glxinfo" and save the output.

In run level 5, check if the command "glxinfo |grep direct" gives an answer "No". It means DRI is not enabled. Now please run the command "ldd glxinfo" and save the output.

Compare these two outputs of "ldd glxinfo" command. If they point to different libraries .. then there lies the problem (for the solution to this problem, check my last post).

springshades 08-04-2005 01:54 PM

Thanks for the info azeemarif.

I'll let you know if things work out in a few days. I started updating my computer and there was an update to Xorg that messed up dri. I'll have to finish updating (to make sure that I finish messing things up before starting to fix them) and then set up dri again. Then I'll check on whether libGL hell is my problem. Thanks.

knowerrors 08-05-2005 05:28 PM

/bin/bash
"Glad to hear you got it working. Just to give you something to compare to. While running KDE in 24bit 1280 x 1024 resolution I get ~ 450FPS. In XFCE I can get >480FPS. Also have 2G P4 w/512M ram if that matters?"

Wow, thats amazing, in KDE with 24 bit, 1024x768, I get 250fps, my system is Athlon XP 1800 with 512M DDRram. Wonder why yours is so much faster?

springshades 08-06-2005 05:11 PM

Well, something in the update that I did seems to have fixed MOST of the issues that I had with DRI. I can now boot into run level 5 with dri support for my card working. I'm not going to complain about the few issues left (I have to restart the X server once each time I start my computer because after a certain amount of time, I have a small graphical glitch and my keyboard stops working. Restarting X fixes it and the problem doesn't happen until the next time I boot my computer.

BTW, my issues were pretty weird. It actually sounds like it might not have been libGL hell. In glxinfo, dri was always listed as enabled. There was some bug that caused any application that used it to simply error out. Glxinfo gave some of the information, but most of the way through it gave a segment fault. Glxgears gave a segment fault immediately. Most of the 3D games I tried froze the entire system and needed a hard reset.

/bin/bash 08-07-2005 02:18 PM

Quote:

Wow, thats amazing, in KDE with 24 bit, 1024x768, I get 250fps, my system is Athlon XP 1800 with 512M DDRram. Wonder why yours is so much faster?
Possibly you have more services or programs running. Try running top and see if you can disable the most resource intensive programs temporarily and then run glxgears again to see if it helps.

I have noticed my FPS have increased quite a bit since my first post when I was getting 350FPS. I figure it is because I keep my DRI updated by installing the latest snapshots regurlarly.

/bin/bash 08-11-2005 08:45 PM

knowerrors

Check your kernel config and make sure you have mtrr turned on in the Processor type and features section. I have it built into my kernel however you could also build it as a module.

If you want to check if your kernel has mtrr enabled do this:
Code:

cat /proc/mtrr
reg00: base=0x00000000 (  0MB), size= 512MB: write-back, count=1
reg01: base=0x1e000000 ( 480MB), size=  32MB: uncachable, count=1
reg02: base=0xd0000000 (3328MB), size= 128MB: write-combining, count=2
reg03: base=0xd8000000 (3456MB), size=  16MB: write-combining, count=1
reg04: base=0xde000000 (3552MB), size=  16MB: write-combining, count=1
reg05: base=0xdc000000 (3520MB), size=  32MB: write-combining, count=1
reg06: base=0xda000000 (3488MB), size=  32MB: write-combining, count=1

You should have something similar to the above.

knowerrors 08-12-2005 09:20 PM

/bash/bin- Thanks for the suggestion, looks like mine has mtrr turned on already:

flow@3[Enigma]$ cat /proc/mtrr
reg00: base=0x00000000 ( 0MB), size= 512MB: write-back, count=1
reg01: base=0x1e000000 ( 480MB), size= 32MB: uncachable, count=1
reg02: base=0xe8000000 (3712MB), size= 64MB: write-combining, count=2
reg03: base=0xe0000000 (3584MB), size= 16MB: write-combining, count=1
reg04: base=0xe6000000 (3680MB), size= 16MB: write-combining, count=1
reg05: base=0xe8000000 (3712MB), size= 64MB: write-combining, count=1
reg06: base=0xe4000000 (3648MB), size= 32MB: write-combining, count=1
reg07: base=0xe2000000 (3616MB), size= 32MB: write-combining, count=1

I looked at what "top" command showed, and nothing was sucking that much cpu/mem besides Xorg. I am also running the latest dri snapshot, as well as the most up to date x.org packages. Could it just be that your cpu is that much better? BTW, my card is an onboard prosavageddr... the one thats part of the M7VIG Biostar http://www.biostar-usa.com/mbdetails.asp?model=m7vig
And Im running kernel 2.6.12.3. I know it seems picky, but its killing me and not to mention the jealousy, that your're getting such incredible faster frame rates on what seem to be such similarly equiped boxes. Any more ideas to boost my fps would be great!

/bin/bash 08-13-2005 11:51 AM

I have the VIA P4MA Pro Mainboard in this computer.

Processor
- Intel® Pentium® 4 Processor (478pin)
- 400MHz Front Side Bus
Chipset
- VIA ProSavageDDR™ P4M266 North Bridge Featuring integrated S3 ProSavage8™ AGP engine
- VT8235 South Bridge
System Memory
- 2 DDR266 DIMM Sockets
- Up to 2GB
Expansion Slots
- 1 AGP 4X slot (1.5V Support)
- 3 PCI Slots
- 1 CNR Slot
On Board IDE
- 2 x ATA133/100 Connectors
On Board FDD
- 1 x FDD Connector
Onboard Audio
- VIA VT1616 6 Channel AC’97 CODEC
Onboard LAN
- VIA VT6103 10/100 ETHERNET PHY
Back Panel I/O
- 1 PS2 mouse Port
- 1 PS2 keyboard Port
- 1 RJ 45 100/10Mb LAN Port
- 1 VGA Port
- 2 USB 2.0/1.1 Ports
- 1 Serial Ports
- 1 Parallel Port
- 3 Audio Jacks: line-out, line-in and mic-in
Smart5.1™ Front L/R, Rear L/R, Center/Subwoofer
- 1 Game/MIDI Port
BIOS
- Award BIOS
- 2/4Mbit Flash Memory
Applications
- VIA FliteDeck™ System Management UtilityMissionControl-H/W Monitoring, Remote SNMP ManagementJetStream-Overclocking Optimized UtilityFlashPort-Live BIOS FlashSysProbe-Live DMI Browser
Overclocking
- 100MHz up to 200MHz adjustment by 1MHz Increments
- Tunable Vcore/Vdimm/Vagp
- BIOS Overclocking Auto-Recovery
System Monitoring & Management
- CPU Temperature Monitoring
- CPU Voltage Monitoring
- Wake-on-LAN, Wake-on-Ring, Keyboard-Power-on, Timer-Power-on
- System Power Management
- AC Power Failure Recovery
Form Factor
- Micro ATX (4 Layers)
- 24.5cm x 20.5cm

Aside from the different processors there isn't that much difference that I could be getting nearly 2X the FPS. I am running 2.6.12.4 kernel. Did you build your kernel and if so did you optimize for the AMD processor?

It could be the front side bus speed; 266 vs. 400.

jacke 08-13-2005 03:52 PM

Awesome guide ! :) I was successful getting DRI working in my Asus A1300 laptop with a S3 twister chip :) Glxgears gives me about 350fps which is OK, but I wouldn't mind getting a higher value! I have tried running Quake III Arena and it works at least, but I'm getting some weird graphic glitches which are really annoying me :( (Any ideas ?)
And, for those of you who are stuck with the "Cannot find a kernel config file" problem, I also had this problem in my Ubuntu Hoary distribution, but was able to solve this by using the kernel-headers package instead of linux-source.

/bin/bash 10-31-2005 11:29 PM

Oh happy days! Kernel 2.6.14 has savage drm support!

From the Changelog.
Quote:

Author: Dave Airlie <****@starflyer.(none)>
Date: Sun Aug 7 15:43:54 2005 +1000

drm: add savage driver

Add driver for savage chipsets.

From: Felix Kuehling
Signed-off-by: Dave Airlie <****@linux.ie>
Yes it does work!

trademarka 02-17-2006 10:05 AM

I realize that this thread is kind of old but I really want DRI to work on my laptop (twister_k chipset)...

I am using SUSE 10 with Xorg 6.8.2 on Kernel 2.6.13-15.8

I tried different savage and common packages and get similar error outputs... This is one of them >>>
Quote:

make DRM_MODULES=savage.o modules
make[1]: Entering directory `/home/trademarka/bin/temp/dripkg/drm/linux-core'
make -C /lib/modules/2.6.13-15.8-default/source SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules
make[2]: Entering directory `/usr/src/linux-2.6.13-15.8'

WARNING: Symbol version dump /usr/src/linux-2.6.13-15.8/Module.symvers
is missing; modules will have no dependencies and modversions.

CC [M] /home/trademarka/bin/temp/dripkg/drm/linux-core/drm_auth.o
/bin/sh: scripts/basic/fixdep: No such file or directory
make[3]: *** [/home/trademarka/bin/temp/dripkg/drm/linux-core/drm_auth.o] Error
1
make[2]: *** [_module_/home/trademarka/bin/temp/dripkg/drm/linux-core] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.13-15.8'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/trademarka/bin/temp/dripkg/drm/linux-core'
make: *** [savage.o] Error 2
BTW... /usr/src/linux-2.6.13-15.8/ originally did not have .config file, so I copied it from /boot ... I heared people saying that some link has to be removed there after copying maybe that's the problem...

Thanks in advance

/bin/bash 02-18-2006 02:06 AM

Try going into /usr/src/linux-2.6.13-15.8 and run make menuconfig or make xconfig and make sure that your kernel has DRI turned on. I believe it is in Drivers -> Char section just below agpgart. If your config does not have DRI enabled then you need to enable it and build a new kernel. If it is already enabled then try running make all and then try building the DRI module again after that finishes. You should also start with a new dripkg directory (remove the old and reinstall fresh.)

trademarka 02-18-2006 11:27 AM

Thanks for reply,
building the new kernel now...
by the way, I am about to update to SuSE 10.1 and it has 2.6.16 rc1 kernel...
So, will that solve the problems or will I still have to do the above steps?
Thanks


All times are GMT -5. The time now is 09:14 AM.