Linux - GamesThis forum is for all discussion relating to gaming in Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Let's make this a general tweaking thread, not Gentoo vs. the world, k?
I'll start off with my specs:
Athlon xp 1800+, 512 ram (DDR 333), Geforce FX5600 128Mb, ASUS A7V333 (VIA KT333 chipset). Currently running Mandrake 9.2 with 2.4.22-10mdk kernel.
Nvidia drivers are version number 5336.
I know that Mandrake is not generally viewed as a speedy distro, but switching distros is not the answer we're looking for here.
What have you noticed that has a noticeable impact on gaming speed? (read: OpenGL)
Self-compiled kernel? Different Nvidia (or ATI) drivers? Alsa vs. oss?
We all know that KDE and Gnome eat resources, no need to point that out.
I'm personally looking for a way to improve my fps in UT2k4, they're really bad right now. (look for details in ut2k4-thread)
Does GLXGears give comparative results? ( I get around 3000fps )
What are your experiences in linux gaming speeds between different distros, kernel versions, driver versions etc. ?
"Try 2.6.3" is really not enough. At least the 2.6.2-rc1 from Cooker I tried did not make this machine any faster (And broke wacom support, more on that in hardware-forum)
Ideas? If anything, post your GLXGears score and hardware info.
6K fps in glxgears on Suse 9.0. GeForce4 Ti 4200. It is an agpart card. Don't know what yours is. This is with the stock nvidia driver and settings. In Redhat 8.0, I got around 7K fps. There are tweaks you can make, that I made to the input section of the nvidia driver that got me to around 12K fps in Redhat 8.0. I haven't retried these in Suse yet. NOTE: These are not things to just 'try' for any newbie reading this. Make sure you know what you are doing, and whether your card can understand these settings.
The next biggest thing is to make sure that you have the fasted DMA mode on for your hard drive. For example, my 2 HDs are in Ultra DMA mode 100.
linux:/root # hdparm -t /dev/hda
/dev/hda:
Timing buffered disk reads: 170 MB in 3.02 seconds = 56.20 MB/sec
You have more than enough RAM. Disable uneeded services, and then, run the game with a negative NICE command. Note, this requires the game to be started as root, which may not be allowed, or a security risk, however, it does mean the game gets as much CPU as it needs above everything and anything else EXCEPT ext3 or reiserfs updates.
nice --19 <game>
highest priority available. I use that setting for xmms, and I have NEVER been able to cause a skip, even compiling, downloading or transferring huge files from CD to HD.
Cool, got to thinking about the nice command, and something occurred to me.
You can get a regular user to start a game, or any app, with the highest
priority and bypass any security concerns about running as root.
As root, I just...
nice --19 su - steve -c 'export DISPLAY=localhost:0.0;xmms'
and ps -ef |grep xmms gives
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5196 steve 0 -19 928 928 772 S 0.0 0.4 0:00.02 su
Notice the -19 NI(ce) level. I already updated my link to xmms to work this
way.
NOTE: For Suse, the display is not carried over with the su, that is the reason for the localhost:0.0 specification.
Distribution: Gentoo 2004.2: Who needs exmmpkg when you have emerge?
Posts: 1,795
Rep:
glxgears: 3675.4 fps.
hardware: geforce FX 5700 ultra AGP 8X/4X 128mb
athlon xp 1.666 ghz
512mb ddr geil ram
alsa 1.0rc1
ill try some of those suggestions from rolledoat, now that i see that i can get SO much more out of my card. i have dma, but i havent tried ultra dma, since i dont know how to enable it, and i dont know what boot script to add initialization of dma to, so i have to start it manually.
Originally posted by LavaDevil94
ill try some of those suggestions from rolledoat, now that i see that i can get SO much more out of my card. i have dma, but i havent tried ultra dma, since i dont know how to enable it, and i dont know what boot script to add initialization of dma to, so i have to start it manually.
That was the nice thing about Yast, it has an HDParm tool built in. I could try Ultra DMA 133, it is an option, but with the performance I have now, I don't need much more transfer speed.
The good thing is though, it can be configured by hand, you don't start a runlevel or anything like that.
You will likely find that the fastest, or almost fasted is already set. This is a good way to verify is you need to change anything. I have not had to, only ever verfied the settings. If you want to or need to try changing it, man hdparm. You can change things, and until committed, can be cleared by a reboot.
NOTE: In Mandrake 9.1, I am sure there is a hardware query tool that can show/set up the DMA modes for your drives.
purplecow:
I'd deffintely suggest you try out a self compiled 2.6.3 kernel, especially when you enable in it the new scheduler and preemptive capabilities. Those are basically the biggest advantages towards gaming. I don't recommend you using any pre-compiled 2.6.x kernel from your distribution, basically because of performance issues, that's right, they do compile it to be more compatible with any computer running their systems, but that sometimes (almost all the time) means sacrificing a little bit in the performance department in favor of reliablitiy. This is not a bad thing, but for gaming purposes, may hold you back. If you've never compiled a kernel before, there are lots of places where you may find information regarding that (even the own kernel readme file has information on how to build it!).
If you have your current official distro's kernel source installed (as I assume you have) you will have also a file containing the information upon which it was built under the /boot directory (/boot/config-<kernelversion>). Use that file as a guide line. To do so, just start the confiuguration program (as root) for your current kernel (cd /usr/src/linux-<current-kernel> && make xconfig), and load up the config file, on another VD and console start the same for the kenrel you are going to compile, and make sure you read the help entries of the items (all of them, if you can!) so you know what do they do and if you really need t/o compile them! A slim and slick kernel may be much more efficient than a monolithic, heav/y one!
Regarding ALSA Vs OSS, you'll find all over the place that ALSA's the Linux Audio future, however, it'll be a time until many developers/projects will incorporate it. Sure ALSA does have OSS emulation so you can enjoy both worlds, however since version 1 of ALSA there have been a couple of bugs with the OSS emulation algorithm. I'll have to try out the newly released (today 29/02/2004 [dd/mm/yy]) ALSA (1.0.3), however because of these you can either: stick to OSS or tolerate the little ALSA OSS emulation anoyances. Regarding performance ALSA does utilizes much better your hardware than the OSS (Free) drivers do, meaning a little performance boost (but hey, when gaming, everything's about performance, donnit?).
Distribution: Gentoo 2004.2: Who needs exmmpkg when you have emerge?
Posts: 1,795
Rep:
someone should make this sticky, because its one of those RARE, and i mean RARE threads that when you ask about performance, people dont point you to gentoo or killing your desktop environment!
PS: ive enabled ultra dma, and im amazed. 15 MBPS to 45 MBPS. but i still cant figure out how to get fastwrites and stuff enabled for my nvidia card.
Originally posted by LavaDevil94 someone should make this sticky, because its one of those RARE, and i mean RARE threads that when you ask about performance, people dont point you to gentoo or killing your desktop environment!
Yeah! I second that!
Quote:
Originally posted by LavaDevil94
[BPS: ive enabled ultra dma, and im amazed. 15 MBPS to 45 MBPS. but i still cant figure out how to get fastwrites and stuff enabled for my nvidia card.
For FastWrites, I think the nVidia extensive Readme explains it. I don't know if there's still the PDF version of the document, last time I checked it was text only, but should be located at the driver's download site.
Just activated FastWrites, and Sideband access. Added around 500 fps,
See if it is supported...
(NOTE: On mine, both now show enabled at the bottom, yours probably don't.)
NOTE: You want to make sure that the AGP Rate enabled is the MAX your card can support. As you can see, mine is 4x, but have read that even though other cards can support 8x, the usually get configured as 4x.
To enable fast writes and SBA, simply add the support variables that your card supports. JUST after
'alias char-major-195 nvidia' in /etc/modules.conf add one (or both if supported) add this line.
options nvidia NVreg_EnableAGPSBA=1 NVreg_EnableAGPFW=1
Reboot and you should see them enabled when you do the cat shown above.
Now, Figured out where the 1K came from in Redhat 8.0. My monitor was not detected but Suse 9.0, but I went with the default vertical and horizontal. Got around to checking it, and the V refreash rate was only 85Hz. My monitor (Sun 21") can perform 1600X1200 at 160 Hz. After that, glxgears added 1K. Found out that this is due to Veritical sync is usually tied to the vertical refhresh rate of your monitor. So, if your monitor is NOT configured correctly, this can impact it. However, found a GL variable, which, when set before glxgears, does the same as increasing the refhresh rate. In a terminal
'The fourth line disables Vertical Sync, which can significantly enhance performance by allowing the card to update faster than the monitor refreshes.'
export __GL_SYNC_TO_VBLANK=0
then try glxgears. I am not sure where to set this so it is a system default, the links below never specify. Here are my latest tweaks. Note this is now at 1600x1200 24M colors.
38158 frames in 5.0 seconds = 7631.600 FPS
39639 frames in 5.0 seconds = 7927.800 FPS
39649 frames in 5.0 seconds = 7929.800 FPS
I did notice a HUGE improvement in sharpness of my display after setting the Monitor correctly, so I suspect that other variables, that reduce performance but increase the quality of the display are now active. In any event, I will keep posting as I 'relearn' performance changes. In the first link is a tool to overclock your card in Linux. Never done that, but I am sure many have.
P.S. Anyone else notive that glxgears drops after starting mozilla, even after you exit mozilla, it doesn't go back up? I always noticed that, wondered why, but never investigated.
Distribution: Gentoo 2004.2: Who needs exmmpkg when you have emerge?
Posts: 1,795
Rep:
agpgart is the kernel-made alternative to nvidia's agp. nvagp is more stable, but a bit slower, so take agpgart if you can. btw, 8x agp is only available in 2.6 kernels, and even if i had one, i still wouldnt be able to use 8x, since my motherboard only supports 4x and lower. ill try that modules.conf edit. and, i have noticed a performance drop while mozilla is active, but i dont know if it stays. maybe mozilla didnt clean up after itself? ill also try that monitor trick, but my monitor is configured correctly (i guess) from the harddrake (its an NEC multisync XV17+, which ive been trying to get 1280/1600 res on for ages ).
Distribution: Gentoo 2004.2: Who needs exmmpkg when you have emerge?
Posts: 1,795
Rep:
i tried the edit, and now SBA is on, but fast writes is still off... maybe its my mobo that doesnt support it... i have an iwill xp333 ALI magik 1. ill peek in the bios a little later, in the meantime, ill try that trick with the monitor vsync.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.