{"id":434,"date":"2013-01-19T23:02:46","date_gmt":"2013-01-19T21:02:46","guid":{"rendered":"https:\/\/kari.world.ikari.fi\/?p=434"},"modified":"2013-01-19T23:02:46","modified_gmt":"2013-01-19T21:02:46","slug":"fixing-libvdpau-nvidia-patch-for-opera","status":"publish","type":"post","link":"https:\/\/kari.world.ikari.fi\/?p=434","title":{"rendered":"Fixing libvdpau nvidia patch for Opera"},"content":{"rendered":"<p>Fix for well known libvdpau bug with libflashplayer is nice, but it has once severe problem. Patch is designed wrong, so it won&#8217;t work with opera. Problem with patch is that it tries to look for string &#8221;libflashplayer&#8221; in &#8221;\/proc\/self\/cmdline&#8221;. Assumption that such string would exist in cmdline is very poor, and it won&#8217;t with opera.<\/p>\n<p>In opera flashplayer plugin cmd line looks like this:<br \/>\n[code]<br \/>\n  \\_ \/usr\/lib\/opera\/opera<br \/>\n  \\_ \/usr\/lib\/opera\/opera<br \/>\n      \\_ \/usr\/lib\/opera\/pluginwrapper\/operapluginwrapper-native -multiproc 2,0.1.3,2,59,83 -logfolder \/root\/.opera\/logs\/ -type native<br \/>\n[\/code]<\/p>\n<p>Clearly there ain&#8217;t string &#8221;libflashplayer&#8221; in command line. So we are without hope.<\/p>\n<p>Not so fast&#8230;<\/p>\n<p>Since now we know what this patch is doing (just peek inside &#8221;flash_hack.patch&#8221;), it&#8217;s very trivial to fix problem.<\/p>\n<p>So fix is simply to do this<br \/>\n[code]<br \/>\ncd \/usr\/lib<br \/>\ngrep &#8221;libflashplayer&#8221; libvdp*<br \/>\n&#8230; some result should appear if patch exists<br \/>\n# NOTE create backup before EDIT<br \/>\ncp libvdpau.so.313.09 libvdpau.so.313.09_ORIG<br \/>\nokteta libvdpau.so.313.09<br \/>\n[\/code]<\/p>\n<p>When in hex editor, simply find &#8221;libflashplayer\\0&#8221; in file and replace it with &#8221;opera\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0&#8221;. Thus &#8221;opera&#8221; and 0x00 to fill over original text. After this, simply save lib, and relaunch opera.<\/p>\n<p>&#8230;.<\/p>\n<p>And blue-tint problem is finally fixed.<\/p>\n<p><strong>YES!<\/strong> I know this is very dirty hack and it means that hack won&#8217;t work with some firefox (since I don&#8217;t use firefox I don&#8217;t mind if it&#8217;s broken), but as long as it works it&#8217;s fine for me.<\/p>\n<p>For exhaustive fix would be to go and patch original sources, but doing so can be tricky (for example, nvidia driver package seemingly includes precompiled version of libvdpau).<\/p>\n<p><strong>References:<\/strong><br \/>\n<a href=\"https:\/\/bbs.archlinux.org\/viewtopic.php?pid=1116903\" title=\"Original patch\">[SOLVED] Blue tint on youtube videos. (Nvidia or flash problem)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fix for well known libvdpau bug with libflashplayer is nice, but it has once severe problem. Patch is designed wrong, so it won&#8217;t work with opera. Problem with patch is that it tries to look for string &#8221;libflashplayer&#8221; in &#8221;\/proc\/self\/cmdline&#8221;. Assumption that such string would exist in cmdline is very poor, and it won&#8217;t with&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,31],"tags":[],"class_list":["post-434","post","type-post","status-publish","format-standard","hentry","category-kde","category-linux"],"_links":{"self":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/posts\/434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=434"}],"version-history":[{"count":0,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/posts\/434\/revisions"}],"wp:attachment":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}