Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 410435 - www-plugins/adobe-flash-11.2, <=x11-libs/libvdpau-0.4.1-r1: incorrect colors when playing flash on Youtube
Summary: www-plugins/adobe-flash-11.2, <=x11-libs/libvdpau-0.4.1-r1: incorrect colors ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 4 votes (vote)
Assignee: Jim Ramsay (lack) (RETIRED)
URL: https://bugbase.adobe.com/index.cfm?e...
Whiteboard:
Keywords:
: 411379 412785 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-01 13:22 UTC by Oschtan
Modified: 2012-09-22 06:42 UTC (History)
27 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libvdpau_flashplayer.patch from debian (debian_patches_libvdpau_flashplayer.patch,6.59 KB, patch)
2012-06-07 13:46 UTC, poncho
Details | Diff
vdpau_wrapper.c: Track dynamic library handles and free them on exit using __attribute__((destructor)) (track_dynamic_library_handles_and_free_them_on_exit.patch,5.43 KB, patch)
2012-06-14 12:54 UTC, poncho
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oschtan 2012-04-01 13:22:56 UTC
In subject
http://oschtan.academ.org/youtube-with-flash-11.1.png
http://oschtan.academ.org/youtube-with-flash-11.2.png
Google Chrome 18.0.1025.142_p129054

Reproducible: Always

Steps to Reproduce:
Installing www-plugins/adobe-flash-11.1.102.63



emerge --info
Portage 2.2.0_alpha96 (default/linux/amd64/10.0, gcc-4.6.2, glibc-2.14.1-r2, 3.2.6-gentoo x86_64)
=================================================================
System uname: Linux-3.2.6-gentoo-x86_64-AMD_Phenom-tm-_8450_Triple-Core_Processor-with-gentoo-2.1
Timestamp of tree: Sun, 01 Apr 2012 03:45:01 +0000
ccache version 3.1.7 [disabled]
app-shells/bash:          4.2_p24
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2-r1
dev-util/ccache:          3.1.7
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.9.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.3
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo overlays-oschtan
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL skype-eula googleearth AdobeFlash-10.3 google-talkplugin google-chrome Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS=" -O2 -pipe -march=amdfam10 -mtune=amdfam10"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/red5/conf /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/red5-webapps"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS=" -O2 -pipe -march=amdfam10 -mtune=amdfam10"
DISTDIR="/mnt/distfiles"
FEATURES="assume-digests binpkg-logs buildpkg candy collision-protect distlocks ebuild-locks fixlafiles metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS=""
GENTOO_MIRRORS="http://linux.nsu.ru/gentoo-distfiles http://mirror.yandex.ru/gentoo-distfiles http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,--hash-style=gnu,-O1 -Wl,--as-needed"
LINGUAS="ru"
MAKEOPTS="-j2"
PKGDIR="/mnt/gentoo/package"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/mnt/gentoo"
PORTDIR="/mnt/gentoo/gentoo-tree"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://linux.rz.ruhr-uni-bochum.de/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aacplus aalib acpi action_modeswitch additions alsa amd64 amr ao ape auto-hinter berkdb bzip2 cairo cgi cleartype cli consolekit cracklib crypt ctype curl custom-cflags cxx dbus declarative demos development djvu dri dv dvd emerald enca encode exif extras faac fastcgi fbcondecor ffmpeg fontconfig fortran ftp fuse gd gecko gecko-mediaplayer gif git glitz gphoto2 gpm gstreamer gtk3 gudev hddtemp iconv imlib jabber java jbig jpeg jpeg2k kde kvm lame lastfm latin1 lcms libkms libnotify lm_sensors lzma mad mikmod mjpeg mmx mmxext mng modules mp3 mp4 mpeg mplayer mudflap multilib multitarget mysql natspec ncurses nls npp nptl nptlonly nsplugin objc objc++ objc-gc ogg openexr opengl openmp oscar pam pcre pdf perl php plasma png policykit povray pppd pulse pulseaudio python python3 qt3support qt4 rar rcc readline realtime reflection rtc sdk sdl sensord session skey slang sndfile source speex spell spl sqlite sqlite3 srt sse sse2 sse3 sse4a ssl startup-notification suid svg symlink sysfs syslog system-wide taglib tcpd templates theora thumbnail tidy tiff truetype udev udisks unicode unsupported uploadprogress usb vcd vde vdpau video vorbis vpx webdav-neon wxwidgets x264 xattr xcb xcomposite xml xorg xpm xscreensaver xv xvid xvmc yv12 zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-04-01 13:44:11 UTC
This a problem for users of nvidia-drivers. Nvidia[1] and Adobe[2] blame each other. Supposedly a workaround exists in libvdpau from git.

[1] http://www.nvnews.net/vbulletin/showthread.php?t=177380
[2] https://bugbase.adobe.com/index.cfm?event=bug&id=3109467
Comment 2 Navid Zamani 2012-04-03 19:58:08 UTC
Here’s the link to the workaround:

http://www.nvnews.net/vbulletin/showpost.php?p=2518770&postcount=104

Please include it into the ebuild.
Thanks.
Comment 3 Francisco Lloret 2012-04-07 00:16:00 UTC
(In reply to comment #1)
> This a problem for users of nvidia-drivers. Nvidia[1] and Adobe[2] blame
> each other. Supposedly a workaround exists in libvdpau from git.
> 
> [1] http://www.nvnews.net/vbulletin/showthread.php?t=177380
> [2] https://bugbase.adobe.com/index.cfm?event=bug&id=3109467

Downgrading to Flash version 11.1.102.63 works OK, then isn't a vdpau problem: is a flash problem.
Comment 4 Navid Zamani 2012-04-07 01:04:13 UTC
(In reply to comment #3)
> Downgrading to Flash version 11.1.102.63 works OK, then isn't a vdpau
> problem: is a flash problem.

I think I have to disagree, since before Flash 11.2, it would not scale the video in full-screen, and stuttered at everything above 480p. Now it runs completely fluid at full-screen with full HD (1920×1080).
So as far as I can tell, there was no actual acceleration before 11.2 (at least on nVidia).

Obviously, I very much like to keep the acceleration. :)
So going back to an older Flash is not an option.

There’s no harm in trying to just add the workaround that I posted in comment #2. :)
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2012-04-09 19:11:39 UTC
*** Bug 411379 has been marked as a duplicate of this bug. ***
Comment 6 Mike Nerone 2012-04-09 19:24:46 UTC
(In reply to comment #4)
> There’s no harm in trying to just add the workaround that I posted in
> comment #2. :)

That's a ghetto fix that hijacks VDPAU_TRACE for a different purpose and disables other customization hooks. Something like that should be a last resort.

FWIW, my video has been fluid at full-screen 1080p since (and including) 11.1. It sure feels like hardware acceleration is working, but I could be mistaken.
Comment 7 Navid Zamani 2012-04-09 20:36:00 UTC
(In reply to comment #6)
> That's a ghetto fix that hijacks VDPAU_TRACE for a different purpose and
> disables other customization hooks. Something like that should be a last
> resort.

Alright. In that case, that’s of course correct. :)

> FWIW, my video has been fluid at full-screen 1080p since (and including)
> 11.1. It sure feels like hardware acceleration is working, but I could be
> mistaken.

No, sorry. I just downgraded to 11.1, to make sure. And indeed, it stops scaling. In “full-screen”, it’s the video is just a ⅓ of the height and width of the screen in size. While stuttering a lot.
Definitely not accelerated.
Comment 8 Sven B 2012-04-21 19:09:19 UTC
Ran into the same problem. 
Adding 
 EnableLinuxHWVideoDecode=1

to /etc/adobe/mms.cfg fixed the problem.
Comment 9 Navid Zamani 2012-04-22 16:24:03 UTC
(In reply to comment #8)
>  EnableLinuxHWVideoDecode=1
> to /etc/adobe/mms.cfg fixed the problem.

Thanks. That helped. I now have fullscreen accelerated HD with the correct colors.

But Flash then crashed four times over the course of 20 minutes. (Not very bad for YouTube, where I tested it. But it would be bad for Kongregate, when one would lose game state.)

Which may explain why it’s not set by default, and not even listed a existing property to set in the comments.
But my assumption is, that this is a bug in how Flash uses the VDPAU interface. So I don’t really know how to proceed. (Except for abandoning all Flash for browser-native technology, of course. :)
Comment 10 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-04-23 16:42:08 UTC
*** Bug 412785 has been marked as a duplicate of this bug. ***
Comment 11 Oschtan 2012-04-27 16:12:42 UTC
(In reply to comment #8)
> Ran into the same problem. 
> Adding 
>  EnableLinuxHWVideoDecode=1
> 
> to /etc/adobe/mms.cfg fixed the problem.

When you close Google Chrome tabs with Flash from Youtube where EnableLinuxHWVideoDecode=1 is the X-server hang. It is fatal. Adjourn the X-server can only remotely: keyboard and mouse are inoperable
Comment 12 Oschtan 2012-04-27 16:13:15 UTC
(In reply to comment #11)
> (In reply to comment #8)
> > Ran into the same problem. 
> > Adding 
> >  EnableLinuxHWVideoDecode=1
> > 
> > to /etc/adobe/mms.cfg fixed the problem.
> 
> When you close Google Chrome tabs with Flash from Youtube where
> EnableLinuxHWVideoDecode=1 is the X-server hang. It is fatal. Adjourn the
> X-server can only remotely: keyboard and mouse are inoperable

For Flash-11.2x
Comment 13 Jim Ramsay (lack) (RETIRED) gentoo-dev 2012-05-02 18:48:37 UTC
There is at least one report that the latest version of flash improves some of the colour issues.  Please give it a shot and report back here.

  www-plugins/adobe-flash-11.2.202.233

P.S. Remember to unset EnableLinuxHWVideoDecode=1 if you have previously done so to workaround this bug.
Comment 14 Damien Thébault 2012-05-02 19:10:55 UTC
(In reply to comment #13)
> There is at least one report that the latest version of flash improves some
> of the colour issues.  Please give it a shot and report back here.
> 
>   www-plugins/adobe-flash-11.2.202.233
> 
> P.S. Remember to unset EnableLinuxHWVideoDecode=1 if you have previously
> done so to workaround this bug.

Still blue people everywhere.
Comment 15 Siim Ainsaar 2012-05-02 22:03:58 UTC
The solution that worked for me is as follows (although with the price of no hardware acceleration, but it does not bother me much).

Firstly I added "EnableLinuxHWVideoDecode = 0" into /etc/adobe/mms.cfg . I tried a "1" there, but this way vimeo.com did not work.

Secondly I opened a Youtube video showing the "blue people" (NB! Not every video is like that, HTML5 has always been working), made it full-screen (otherwise the settings dialog would hang), right-clicked, chose "Settings" and then disabled hardware acceleration. Escaped from the full-screen mode and reloaded the page - done!
Comment 16 Navid Zamani 2012-05-03 08:38:23 UTC
(In reply to comment #15)
> (NB! Not every video is like that, HTML5 has always been working),

Well, this is a Flash problem, so obviously, HTML5 is fine.

The problem can be broken down like this:
• Every accelerated YouTube Flash video is like that.
• When they are embedded in other pages, they are not like that, but there is also no acceleration.
• For others, like Vimeo or porn sites, I don’t know if they are accelerated, but they always look fine, no matter if embedded or not.
Comment 17 poncho 2012-06-07 13:46:08 UTC
Created attachment 314577 [details, diff]
libvdpau_flashplayer.patch from debian

[VDPAU] [PATCH] Implement workarounds for Adobe Flash bugs
http://lists.freedesktop.org/archives/vdpau/2012-May/000022.html
Comment 18 Damien Thébault 2012-06-07 13:59:44 UTC
(In reply to comment #17)
> Created attachment 314577 [details, diff] [details, diff]
> libvdpau_flashplayer.patch from debian

This works by looking at the /proc/self/cmdline file.
With chrome, this will work because the flash plugin is executed in a specific process with this as parameter: "--type=plugin --plugin-path=/usr/lib/flashplugin-installer/libflashplayer.so".

But I'm wondering, does it work on Firefox?
It would maybe be better to look for a "libflashplayer" entry in the /proc/self/maps file ?
Comment 19 Navid Zamani 2012-06-07 16:46:02 UTC
(In reply to comment #18)
> But I'm wondering, does it work on Firefox?
Yes, Firefox also uses a separate process. The line looks like this:

/usr/lib64/firefox/plugin-container /opt/Adobe/flash-player/flash-plugin/libflashplayer.so -greomni /usr/lib64/firefox/omni.ja 5486 false plugin

> It would maybe be better to look for a "libflashplayer" entry in the
> /proc/self/maps file ?

Yes, the patch sounds really messy. But this is not really better.
Comment 20 Peter Waller 2012-06-07 17:42:31 UTC
The debian patch doesn't apply correctly? The final hunk fails since it is beyond the end of the file. Seems it is for a different version than 0.4.1?
Comment 21 poncho 2012-06-14 12:54:34 UTC
Created attachment 315287 [details, diff]
vdpau_wrapper.c: Track dynamic library handles and free them on exit using __attribute__((destructor))

(In reply to comment #20)
> The debian patch doesn't apply correctly? The final hunk fails since it is
> beyond the end of the file. Seems it is for a different version than 0.4.1?

You need to apply the latest commit from git as well.
http://cgit.freedesktop.org/~aplattner/libvdpau/commit/?id=4262513e67c3572ed19bd796ec6180cdde7ccb7e
Comment 22 Navid Zamani 2012-06-15 03:11:48 UTC
Just curious: What is the actual problem here?
Shouldn’t this just be a case of removing the swapping the red and blue bytes in the function using or implementing an interface?
Comment 23 Navid Zamani 2012-06-17 15:38:55 UTC
I just updated to Flash 11.2.202.236, and this got even worse: Now it seems like the colors are completely inverted or something. I have videos where white is black, etc.
Comment 24 Dmitry Suloev 2012-07-26 05:04:11 UTC
Same problem on latest xf86-video-ati and mesa with vdpau.
Comment 25 Dmitry Suloev 2012-07-31 22:59:56 UTC
After applying both patches libvdpau failed to build.
To fix it on line 334 you need delete first argument.
Comment 26 Dmitry Suloev 2012-07-31 23:10:02 UTC
(In reply to comment #25)
> To fix it on line 334 you need delete first argument.
... in fopen function call.
Comment 27 Ulenrich 2012-08-13 15:44:38 UTC
I think here is another try by using a wrapper.cfg:
http://lists.freedesktop.org/archives/vdpau/2012-May/000022.html
Comment 28 Ulenrich 2012-08-15 12:41:50 UTC
Testing with
1. x11-drivers/nvidia-drivers-304.37
2. www-plugins/adobe-flash-11.2.202.238
3. www-client/google-chrome-21.0.1180.79_p151411
4. www-client/opera-12.01.1532

I thought newest nvidia would obsolete vdpau patch of my comment27 but:

3. google-chrome-21 using pepperflash displays correct colors.
This inside google pepperflash doesn't respect /etc/adobe/mms.cfg

4. inside opera newest Adobe flash with 
- /etc/adobe/mms.cfg unchanged displays blue faces on youtube
- enabling these changes inside mms.cfg work, displays natural colors:
AllowUserLocalTrust = 0
AssetCacheSize = 32
AutoUpdateDisable = 1
AVHardwareDisable = 1
DisableDeviceFontEnumeration = 1
DisableProductDownload = 1
DisableSockets = 0
EnableSocketsTo = 127.0.0.1
FullScreenDisable = 1
LocalStorageLimit = 5
OverrideGPUValidation = 1
WindowlessDisable = 1
EnableLinuxHWVideoDecode = 1
Comment 29 Navid Zamani 2012-08-15 12:51:11 UTC
(In reply to comment #28)
> OverrideGPUValidation = 1

As mentioned and tested before, this causes crashes of Flash. (About every 2nd to 3rd video in my case.)

The validation is probably there for a reason.
Comment 30 Ulenrich 2012-08-15 13:22:26 UTC
@Navid, yes better validation is done, does crash otherwise sometimes ...
Comment 31 Weedy 2012-08-15 22:51:10 UTC
Step one: Comment out crap added to mms.cfg
# Lets you override GPU validation checks to force hardware acceleration
# Warning: This may make your player (more) unstable!
#  0 = Check GPU (default), 1 = Skip checks
# More details:
# http://blogs.adobe.com/penguin.swf/2008/08/secrets_of_the_mmscfg_file_1.html
#OverrideGPUValidation = 1
#EnableLinuxHWVideoDecode = 0
#AVHardwareDisable = 0

Step two: Re-enable HW accel
rm ~/.macromedia/Flash_Player/macromedia.com/support/flashplayer/sys/settings.sol

Step three: Install patched libvdpau
https://suigintou.weedy.ca/trac/gentoo-overlay/changeset/36

Done.
Comment 32 Ulenrich 2012-08-16 00:25:38 UTC
@Weedy is this the patch applied of freedesktop.org mentioned in #27 ?
Comment 33 Navid Zamani 2012-08-16 01:08:52 UTC
(In reply to comment #31)
> Step one: Comment out crap added to mms.cfg

Since people very likely will not really know what they originally changed, it’s probably best, to just run

  cat /usr/portage/www-plugins/adobe-flash/files/mms.cfg > /etc/adobe/mms.cfg

(I used cat instead of cp, to keep the permissions, groups, xattrs, etc.)
Comment 34 Mark R. Pariente 2012-08-18 05:02:46 UTC
Is it possible to push the libvdpau patch to portage with a USE flag (something like "fixflash")?
Comment 35 Samuli Suominen (RETIRED) gentoo-dev 2012-09-05 10:41:34 UTC
libvdpau-0.5 in Portage with USE="dri" in case anyone wants to give it a try.
Comment 36 Vicente Olivert Riera (RETIRED) gentoo-dev 2012-09-14 21:16:42 UTC
(In reply to comment #35)
> libvdpau-0.5 in Portage with USE="dri" in case anyone wants to give it a try.

I'm using x11-libs/libvdpau-0.5 with USE="dri" and the "blue problem" has been solved.
Comment 37 Navid Zamani 2012-09-14 21:38:04 UTC
(In reply to comment #36)
> I'm using x11-libs/libvdpau-0.5 with USE="dri" and the "blue problem" has
> been solved.

I can confirm that. Problem solved. Whoever did it: Many thanks!! :)
Comment 38 coran.fisher@gmail.com 2012-09-14 22:10:04 UTC
My issue has also been resolved.
Comment 39 Doug Goldstein (RETIRED) gentoo-dev 2012-09-14 22:21:06 UTC
Use >=x11-libs/libvdpau-0.5 with USE="dri"
Comment 40 Mike Nerone 2012-09-22 06:42:06 UTC
/me is now happy. :)