Whole document tree 9. Miscellaneous Problems9.1. Hardware Acceleration ProblemsXFree86 4.0 provides a more centralized and self-contained approach to video. Much of the funkyness like kernel modules for non-root access of video boards is, thankfully, gone. 9.1.1. Hardware acceleration isn't working at allIf you're getting like 1 fps, then your system isn't using hardware 3D acceleration. There's one of two things that can be going on.
The first step is to figure out which one is happening.
9.2. Hardware acceleration works only for the root user9.2.1. XFree86 4.*If the following lines aren't present in your XF86Config file, put them in:
This allows all non-root users to use DRI. For the paranoid, it's possible to restrict DRI to only a few non-root users. See the DRI User Guide. 9.2.2. XFree86 3.*9.2.2.1. Voodoo cardsVoodoo card hardware acceleration only takes place ONLY at 16bpp color and fails silently when starting X in another color depth. Also, Voodoo cards need the 3dfx.o kernel module and a /dev/3dfx device file (major 107, minor 0) for non-root hardware acceleration. Neither the module nor the device file are used under XFree86 4.*. 9.3. Why isn't my sound working?First of all, it's probably not the game, it's probably your setup. AFAIK, there are 3 options to getting a sound card configured under Linux: the free OSS sound drivers that come with the Linux kernel, the Alsa drivers and the commercial OSS sound drivers. Personally, I prefer the free OSS drivers, but many people swear by Alsa. The commercial OSS drivers are good when you're having trouble getting your sound card to work by free methods. Don't discount them; they're very cheap (like 10 or 20 bucks), support bleeding edge sound cards and take a lot of guesswork out of the configuring process. There are 4 things that can go wrong with your sound system:
9.3.1. Shared interruptThe first thing to do is to figure out if you have an IRQ conflict. ISA cards can't share interrupts. PCI cards can share interrupts, but certain types of high bandwidth cards simply don't like to share, including network and sound cards. To find out whether you have a conflict, do a "cat /proc/interrupts". Output on my system is:
The second column is there because I have 2 CPU's in this machine; if you have one CPU (called UP, or uniprocessor), you'll have only 1 CPU column. The numbers on the left are the assigned IRQ's and the strings to the right indicate what device was assigned that IRQ. You can see I have an IRQ conflict between the soundcard (soundblaster) and the network card (eth0). They both share IRQ 5. Actually, I cooked this example up because I wanted to show you what an IRQ conflict looks like. But if I did have this conflict, neither my network nor my sound would work well (or at all!). If my sound card is PCI, the preferred way of fixing this would be to simply move one of the cards to a different slot and hope the BIOS sorts things out. A more advanced way of fixing this would be to go into BIOS and assign IRQ's to specific slots. Modern BIOS'es can do this. 9.3.2. Misconfigured driverSometimes, a card is hardwired to use a certain IRQ. You'll see this on ISA cards only. Alternatively, some ISA cards can be set to use a specific IRQ using jumpers on the card itself. With these types of cards, you need to pass the correct IRQ and memory access, "I/O port", to the driver. This is a sound card specific issue, and beyond the scope of this HOWTO. (I should write about how to pass info to the driver). 9.3.3. Something is already accessing your sound cardPerhaps an application is already accessing your soundcard. For example, maybe you have an MP3 player that's paused? If something is already accessing your card, other applications won't be able to. Even though it was written to share the card between applications, I've found that esd (the enlightenment sound daemon) sometimes doesn't work correctly. The best tool to use here is lsof, which shows which processes are accessing a file. Your sound card is represented by /dev/dsp. Right now, I'm listening to an MP3 (not a Metallica MP3, of course...) with mp3blaster.
fuser is similar; but it lets you send a signal to any process accessing the device file.
After issuing this command, mp3blaster was killed with SIGKILL. See the man pages for lsof and fuser; they're very useful. Oh, you'll want to run them as root since you'll be asking for information from processes that may be owned by root. 9.3.4. You're using the wrong driver (or no driver)There are only two ways to configure your card:
You can find out which driver your sound card is using by doing "lsmod" or looking at the output of "dmesg". Since sound is crucial for me, I always compile sound into my kernels. If you don't have a driver loaded, you need to figure out what's been compiled into your kernel. That's not so straight forward. Your best bet is to compile your kernel. BTW, let me say that compiling your own kernel is the first step towards proficiency with Linux. It's painful the first time you do it, but once you do it correctly, it becomes very easy down the right, especially if you keep all your old .config files and make use of things like "make oldconfig". See the Kernel HOWTO for details. If you haven't compiled the kernel yourself, there is an overwhelmingly good chance that your system is set up to load sound drivers as modules. That's the way distros do things. Have everything under the sun compiled as a module and try to load them all. So if you don't see your sound card's driver with lsmod, your card probably isn't configured yet. |