19 Answers
19

There are some misleading and some wrong recommendations here, so let's sum up what the problem is and what solutions there are.

TL;DR

Latest versions of Ubuntu since 12.10 (Quantal) contain a patched version of the library. If you still run into issues with blue video (NOT including the Blue Man Group), check out this answer – the Flash Player's library name must be libflashplayer.so otherwise libvdpau won't apply the workaround.
You may also take a look at /etc/vdpau_wrapper.cfg file. There you can disable the workarounds applied by libvdpau.

If you have Oneiric (11.10) or Precise (12.04), install patched libvdpau:

The problem

Flash Player since version 11.2 uses hardware video acceleration on most platforms. Unfortunately the acceleration in Linux is not just unsupported, but essentially broken. Flash Player swaps colours in video under the following conditions:

This is not a bug in libvdpau. libvdpau is just a wrapper which allows video players to use VDPAU decoding (see Stephen Warren's explanation).

This is not an Ubuntu-specific bug. Other distributions are affected as well, e.g. Arch.

The bug is very possibly in Flash Player – although Adobe tries to blame Nvidia and incompetent users. There have been multiple reports on Adobe's bugtracker, all of them were rejected as “CannotReproduce”:

Install patched libvdpau (proper patch)

Patched libvdpau fixes colours and allows Flash Player to use VDPAU for hardware overlay which still provides some performance benefits.

For the wrapper to work, it needs to recognize the use of Flash. So the Flash library has to be named libflashplayer.so and the plugin wrapper has to be enabled in Firefox (in about:config, dom.ipc.plugins.enabled.libflashplayer.so and dom.ipc.plugins.enabled should be set to true).

For Precise (12.04) and Oneiric (11.10) you can install the patched libvdapu from Maxim Thikonov's PPA using the following commands:

Prevent Flash Player from finding libvdpau

Locate libflashplayer.so in your system – for Ubuntu, it's either in /usr/lib/adobe-flashplugin/ if you have adobe-flashplugin package installed, or /usr/lib/flashplugin-installer/ for flashplugin-installer package.
Consult your browser's about:plugins if you have trouble finding the file (a little tweaking in case of Firefox may be required).

Run the following commands – assuming you have installed either flashplugin-installer, or adobe-flasplugin:

This will modify Flash Player's binary to search for non-existent "lixvdpau" library instead of "libvdpau". Therefore it won't attempt to use VDPAU presentation at all.

The command creates libflashplayer.so.bak backup of the binary in case you run into any problems.

You need to run this command every time there's a Flash Player update since your change will be overwritten.

With this workaround you can keep HW acceleration on, have libvdpau1 installed and it's very easy to apply compared to patching libvdpau.

Use Google Chrome with PepperFlash

Since version 20, Google Chrome ships with “Pepper” Flash Player 11.3 with PPAPI support (instead of 11.2 on NPAPI used by Firefox et al.). PepperFlash doesn't seem to be affected by this problem since it appears to use full hardware acceleration.

Disable Flash Player's Hardware Acceleration

This, however, is not that easy since the Settings window is unresponsive under composite manager (Compiz, standard Unity) and if the browser shows scrollbars.

To disable Hardware acceleration open any video (e.g. on YouTube) in fullscreen and then open the Settings… window. Or you can temporarily switch to Unity 2D or other non-composite WM.

The change takes effect after refresh.

The drawback: this disables HW acceleration in Flash Player even for vector and bitmap operations. Some Flash games and movies may have worse performance and/or worse graphics.

Uninstall libvdpau

If you want to have HW acceleration in Flash Player enabled, you may uninstall libvdpau from system, which effectively prevents Flash Player from using VDPAU.

Run:

sudo apt-get remove libvdpau1

The drawback: Desktop players (like Totem and Mplayer) won't be able to use hardware video decoding too. This will lead to higher CPU usage during playback. Also the video playback performance may be affected (e.g. dropped frames or completely frozen picture), especially if you have slower CPU and you're watching 1080p videos.

Enable Flash Player hardware video decoding

Most users have reported that this leads to very frequent crashes of Flash Player (probably due to concurrency issues in decoding) but if you're feeling lucky, give it a try.

This is also the same method used by Flash-Aid addon. It won't make it any better.

This will create the /etc/adobe/mms.cfg file with EnableLinuxHWVideoDecode=1 content. This is the only way how to actually force Flash Player to decode video on GPU and it's not officially supported by Adobe.

To undo this, run:

sudo rm /etc/adobe/mms.cfg

to remove the mms.cfg file.

You can try to further improve Flash Player's stability with VDPAU_NVIDIA_NO_OVERLAY=1 environment variable, see Nvidia forums.

Patch libvdpau (vdpau_trace hack)

Note that aforementioned patch by Stephen Warren is technically superior and should be used instead.

The non-workarounds

The following solutions will work only partially or they may have some caveats.

Enable HTML5 at YouTube

Enabling HTML5 player at http://www.youtube.com/html5 won't work with all videos; some YouTube videos are just not available for HTML5 player (for example due to the lack of ads support). However HTML5 video is awesome and you should use it anyway.

Downgrade to Flash Player 11.1

There are known vulnerabilities in FP 11.1 which are fixed in 11.2. If you want to risk it, you should know what you're getting into.

If you still want to downgrade, try Flash Player 10.3 which is still maintained – you can get it in Adobe's archive

Switch to different GPU

It seems that very few Nvidia GPUs are not affected, particularly Quadro 2000 and GeForce GT 430. Both have VDPAU feature set C, but otherwise most feature set C GPUs are affected too.
If you have any of the aforementioned GPUs, please tell us on Launchpad whether this bug affects you.

Extremely helpful and informative text. I have fixed the issue in my openSUSE 12.2 by extracting libvdpau.so.1.0.0 from the deb found in the mentioned repository launchpad.net/~tikhonov/+archive/misc to my /usr/lib64 - perfect. Thank you!
–
RushPLMay 9 '12 at 22:41

Newer GPUs definitely have the bug (with feature set C). I am one of the many.
–
VictorJun 1 '12 at 21:27

1

@Victor Yes, I have noticed; it was a theory and it was wrong. It's strange that two particular (and very different) GPUs aren't affected, I'm more inclined to think that the reporters have missed something, e.g. they didn't have libvdpau installed (negative report on Quatro 2000 comes from Adobe's representative).
–
jnvJun 2 '12 at 0:00

4

Thank you for taking the time to break the problem down and provide many solutions with explanations for each. Applying the libpauv1 patch worked great for me, and I only needed to restart my browser to apply the solution. Thanks!
–
dusktreaderJun 5 '12 at 16:22

1

i went with the Prevent Flash Player from finding libvdpau solution and confirm it works. the location of the libflashplayer.so file was in /usr/lib/mozilla/plugins/libflashplayer.so and worked for opera as well
–
ulkasApr 9 '14 at 8:00

UPDATE: Please look at this solution for a proper fix. The solution mentioned here leads to crashes for many who tried it.

This is caused by a bug in the new Flash version that Adobe refuses to fix. There also is a bugreport on Launchpad that discusses this (LP: #967091). The bug only appears when you use the NVidia binary drivers and have libvdpau installed. A quick fix is adding some extra settings to the Flash configuration.

This fixes the problem while still having VDPAU hardware accelleration. Unfortunately there probably won't be a new Flash version to fix this without this manual config-hack because the Flash version that introduced this bug is also the last Flash version Adobe will ever release for Linux.

If this causes instability for you, revert the changes by deleting the directory you created before.

Thank you this resolved the issue for me on Ubuntu 11.10 (adobe-flashplugin 11.2.202.228-0oneiric1). This is not the last version of Flash for Linux there will be security updates and newer versions will come bundled with Google Chrome.
–
Mateusz StachowskiApr 1 '12 at 17:49

16

Enabling those features in mms.cfg made Flash crash regularly for me.
–
blujayApr 2 '12 at 22:52

libvdpau1 was already installed for me in Ubuntu 12.04 64 bit. Anyway disabling hardware acceleration did the trick for me. I'm using the same Nvidia driver as @Derrick Coetzee, but on Precise with Gnome Shell.
–
titaniumtuxApr 6 '12 at 18:12

4

I can't seem to click on the option to disable HW accel.
–
RolandiXor♦Apr 13 '12 at 3:34

1

Removing libvdpau1 worked for me in Firefox and Chrome for all sites I have tested. I have an Nvidia 440 GT card if that helps.
–
Luis Alvarado♦May 2 '12 at 16:30

4

If you can't uncheck Hardware acceleration option in Flash settings, try it in full screen – go to e.g. YouTube, open any video in fullscreen, and open the Flash settings (Right click > Settings…); the window should be responsive. If the browser's window has scrollbar, the settings dialog is unresponsive under composite WM.
–
jnvMay 3 '12 at 7:25

This worked as long as I activated the hardware acceleration option (not to be confused with the option below!!). It did not matter if I installed the Flash plugin from repositories or the beta from Adobe. However, while fixing the blueish tint, the plugin got extremely unstable and crashing constantly while interacting with the Flash objects.

Activating HTML5 video on Youtube (fixed it on Youtube)

While I've only gotten this problem on Youtube videos, I can't be sure that other sites and videos aren't affected. As per suggestion by others here, visit youtube.com/html5 if you want to activate or deactivate HTML5 video on Youtube.com.

This is what worked best for me (but I had to log in with Unity 2D as per the suggestion by pst007x in this thread). The blueish tint is gone, and the videos are stable. I was afraid that the CPU workload would increase but in testing with and without hardware acceleration I could see no change (I used a video from Googles channel in 1080p for this), it begins on around 40% and drops to 20% when the video is fully loaded.

I resolved this (using Linux Mint Lisa, which is based on Ubuntu Oneiric) by rolling the NVIDIA driver back to version 173.

Update: Unfortunately, NVIDIA driver version 173 produces the same blue tint in MP4 videos that the recommended (updated) version of the NVIDIA driver does in Flash videos. That's a little infuriating: I can either have my coffee too cold or too sweet.

And another update: I was able to fix the MP4 problem in Totem by accessing Preferences and shoving the Hue slider all the way to the right. Hot and not too sweet.

I have the same problem, on Youtube. Vimeo seems to work. Switching to HTML5 fixes the problem on Youtube. I temporarily fixed it by purging flashplugin-installer and installing adobe-flashplugin, but the problem returned after a reboot. As for deactivating hardware acceleration, that's impossible for me since a while back. I can't interact with the popup (a problem since 11.10 and now on 12.04).
–
foh1981Mar 30 '12 at 15:30

Right click on youtube video, settings, disable hardware acceleration works. That is an unfortunate solution, but it's a working one till adobe decides to fix it.
–
enedeneMar 30 '12 at 19:53

This can be a problem if you have the Nvidia drivers installed with the latest version of Flash. Try right clicking on the Flash video and disabling the hardware acceleration from the settings. It worked for me.

I have the same problem. I am using Linux 3.2.0-24-generic (32-bit), Flash (latest) version 11.2.202.236 and Mozilla Firefox.

I tried to cancel acceleration in the global settings - it did not fix it. I tried resetting Nvidia driver settings for my X screen.

There is no problem at all with the colour in movie player and there are videos that I can play on the internet which are okay, but not YouTube videos.

Creating mms.cfg file worked. However it knocked out the media player and miro playbacks (videos and film turned blue there).

I then followed this:

Open gstreamer-properties (Alt+F2, enter gstreamer-properties). Change to the video tab. Change the default output plugin to "X Window System (X11/XShm/Xv)". Make Device -'Default'. Test and close the box.

I had this problem again after an upgrade. I figured out that for the enable_flash_uv_swap option in /etc/vdpau_wrapper.cfg to work, the Flash library file (or symlink) has to be named libflashplayer.so (mine was flashplayer-alternative.so). So I just renamed flashplayer-alternative.so to libflashplayer.so, and it started working.

I can't disable hardware acceleration.. When I right click on a flash file menu appears but i can't uncheck or anything in settings menu. Mouse can't effect it and keyboard only be able to close it.. I tried to install flash-aid for firefox. Installing beta version of flash solved the color issue but it's soooooooo unstable
–
user52772Mar 30 '12 at 20:11

Log in using the Unity 2D environment, make the changes there. Then log back in as usual. That worked for me.
–
pst007xMar 31 '12 at 11:05

Flash-aid fixed it for me, but after a few minutes it needed fixing again, and then again, then… and on and on and on
–
keepitsimpleengineerMar 31 '12 at 15:22

This add-on has been removed by its author...
–
Gin GordonFeb 8 '14 at 23:48

Once you uninstall libvdpau1, the second step with mms.cfg is not needed. Again, all recommendations to uninstall libvdpau1 should come with big fat warning: you are removing hardware video decoding support and performance of video playback may be affected
–
jnvMay 3 '12 at 19:34

Yes but for some graphic cards, this is the only way to enable flash. And what is browsing the Internet without flash?
–
entonjacksonMay 4 '12 at 8:11

vdpau means Video Decode and Presentation API for Unix, which is the library used for offloading video decoding to the gpu. Without it, video will be decoded in software on the main processor.
–
EgilMay 2 '12 at 7:07

For NVIDIA users. I have tested 3 video cards right now. All Nvidia. So for anyone with an Nvidia 8600 GT, Nvidia 9500 or an Nvidia 440 GT (Might be all Nvidia cards). You only have to remove the libvdpau1 package. Then just start Firefox or Chrome and everything should be good.

sudo apt-get remove libvdpau1 and done.

Tested youtube with/without joining the HTML5 and works both ways.

Tested vimeo and TED also. Everything LOOKS as it should.

You should use this option only if you have a good CPU since removing this package sends video decoding to the CPU instead of the GPU. Anyway if you have a Dual Core or better, you will not have a problem even with a 1080p video.

This did not fix it for me. As of this writing the versions are the same in 12.04 (295.33). Yesterday when I tested this, the nvidia-current (recommended) was actually on version 295.33 while nvidia-current-updates was on version 295.20.
–
foh1981Mar 31 '12 at 12:47

Didn't work for, I always use recommeded drivers, except when they don't like in 10.4 LTS
–
keepitsimpleengineerMar 31 '12 at 15:23

Wrong info. It's not a bug in the drivers, it's a new bug in Flash.
–
blujayApr 2 '12 at 22:52

Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
–
PeachyOct 27 '12 at 1:39