3D accelerated with Flash. And NVidia. And Issues.
The Linux version of Adobe’s Flash player is at 11 beta 2. My tests have shown that its 32-bit and 64-bit versions perform identically. That is to say, identically badly. It is very unlikely that you’ll be able to watch full-screen HD videos with a default install.
For starters, Flash is notoriously CPU-intensive. If you’re not planning or able to set Flash to use 3D acceleration (which I’ll discuss soon), then the recommended performance fix is simply make sure that Flash is always getting as much CPU power as it can. For example: by making sure that CPU frequency scaling doesn’t downclock the CPU when you’re watching a Flash movie.
Flash also supports video acceleration with VDPAU, which is available on all current NVidia cards. Analagous APIs such as VA-API (for Intel cards), are sadly not supported.
This 3D acceleration is disabled by default. You can force it on by creating a file called /etc/adobe/mms.cfg, containing the following:
EnableLinuxHWVideoDecode=1
OverrideGPUValidation=true
Go to Youtube, then, and right-click on a video. Choose “Show video info”. You should see “software video rendering, accelerated video decoding”. As far as I know, there is no way to get accelerated video rendering. On my box, however, accelerated video decoding is all I need. I can now “pop out” 720p Youtube videos and play them maximized at 24fps, with no dropped frames.
After a few days of normal use, you should see why video acceleration comes disabled: it locks up the computer. More specifically it locks up the X server, as you should still be able to SSH into your hung Linux box and close the browser (or X) remotely. You’ll also have to restart your computer because, as people have noticed, these crashes leave the computer in a state where it can no long play videos and remain stable.
The people on the nvnews forums have reported two causes.
One should actually have been fixed by NVidia by now.
The other remains an open bug in the X server.
Visiting either link shows workarounds. The first is to export VDPAU_NVIDIA_NO_OVERLAY=1. This is best done by editing the launchers for your web browers, such as /usr/bin/firefox or /usr/bin/google-chrome. The second is to rebuild xorg-server with the QUEUE_SIZE in xserver/mi/mieq.c set to 4096 (or a similarly big number). To do the latter on Slackware, you use the distribution’s SlackBuild files (yes, I’m glossing over this a bit) and then reinstall the nvidia driver.
These fixes seem to work somewhat; I still get crashes, but I seem to be getting them less often. And when crashes do occur, the error message that the QUEUE_SIZE workaround is for no longer appears.
My recommendation? Leave 3D acceleration off, and enable it on a need basis (e.g. when you’re actually watching HD Flash videos).
Update: since I posted this, the follow-ups to the X-bug report have also recommended following setting:
export SDL_VIDEO_X11_DGAMOUSE=0