Netflix choppy HD video because hardware-accelerated playback is refused by silverlight

Asked by vatbier

My htpc has intel i3 processor and gpu nvidia GT 430
and runs Lubuntu 13.04
When I start google-chrome-beta in a terminal pipelight writes that my gpu passes the graphic drivers check and thus GPU acceleration should be enabled.
But on Netflix HD video is choppy and glitchy !
Right-clicking and looking at the playback tab of the silverlight plug I see that "hardware-accelerated playback" is grayed out and can not be enabled.

Looking at the terminal output of google-chrome I saw two lines of
NVIDIA: could not open the device file /dev/nvidia0 (Operation not permitted).
Googling around I found a way to change group:owner of /dev/nvida* from root:root to root:video (and I added my user to group video) by having a line in /etc/modprobe.d/nvidia.conf ("options nvidia-313-updates ...") ("options nvidia ..." does not work, the module of my nvidia driver is called "nvidia-313-updates"). Alas, the nvidia error still occurs.
Googling further I began to think that this nvidia error is not the reason why silverlight cannot use hardware acceleration.
I then read some sites that state that silverlight refuses to use some gpu's for some obscure reason.

"Enable/disable/force hardware acceleration" and "Video playback lags or is slow" of the pipelight faq did not help. (Windowlessmode set to true gave me a black screen with only sound.)
I installed both the stable and daily pipelight: no difference.

Unless pipelight developers can hack the binary of silverlight and force it to use my gpu, my hope for being able to watch netflix on my linux htpc is gone (I don't want to watch non-HD on my 1080p TV).

Question information

Language:
English Edit question
Status:
Solved
For:
Pipelight Edit question
Assignee:
No assignee Edit question
Solved by:
vatbier
Solved:
Last query:
Last reply:
Revision history for this message
Sebastian Lackner (slackner) said :
#1

Hi,

this doesn't really fully solve your question, but it doesn't matter that "hardware-accelerated playback" is grayed out, as this is only the status of video decoding, not of video rendering. So far hardware-accelerated video decoding is not yet supported with pipelight (it probably requires some more patches to convince Silverlight) but only accelerated video rendering (resizing, YUV to RGB, ...), which should be enabled on pages that require it (if supported by the graphic card) or on all if it is forced by the config file.

Unfortunately I have no idea why you get this error message:
NVIDIA: could not open the device file /dev/nvidia0 (Operation not permitted).

Does it work with other programs that use GPU acceleration (even browsers like Chromium should try to use GPU acceleration when available)? I'll see if I find some details about this error.

Sebastian

Revision history for this message
vatbier (vatbier) said :
#2

Thanks for your fast reply.
I didn't know that the grayed out button of silverlight is for decoding and not rendering.
I can't start my htpc right now (as my dad is watching a football game).
A few months ago I enabled hardware acceleration for video rendering in my google-chrome-beta so I could view HD flash youtube video fullscreen without glitches following the instructions on http://borninbronx.wordpress.com/2012/11/08/chrome-on-linux-with-webgl-and-all-the-hardware-acceleration-stuff/ .
I don't think this is the reason why pipelight hardware accelerated rendering doesn't work for me because I also tried netflix HD video in chromium without hardware acceleration enabled in chrome://flags (or was it?) and firefox.
Tomorrow I will disable that chrome flag and see if it makes any difference for pipelight.

Where is the whitelist of gpu cards that pipelight allows gpu acceleration for? Is nvidia gt 430 on it? I guess so because otherwise I would not have seen in the terminal output that gpu acceleration is enabled.
What exactly does pipelight do for the silverlight plugin to have gpu acceleration for rendering? (I can't read software code.)

On my dad's computer which is Windows 7 netflix HD video plays without problem on a screen resolution of 1650x1050.

I read somewhere on the chromium bug reports of google that that nvidia error is a temporary error when chrome does not get immediately access to the gpu card (or something like that).

Revision history for this message
vatbier (vatbier) said :
#3

The last statement of my previous comment is about https://code.google.com/p/chromedriver/issues/detail?id=253 : there the nvida bug is also mentioned but I don't know if their fix solved that.

Revision history for this message
vatbier (vatbier) said :
#4

I also tried "sudo google-chrome ..." like mentioned in https://bbs.archlinux.org/viewtopic.php?pid=1271377 but pipelight then failed to run.
Is there a way to run pipelight as root?

Revision history for this message
Sebastian Lackner (slackner) said :
#5

I just looked at the tutorial you described above to enable hw-acceleration for google-chrome - I'm not completely sure, but some of the switches there could theoretically have an effect on pipelight, especially because the embedding into the browser still uses some tricks in the current version.
I would suggest to change "embed" to false in your config file, which will display the video in a separate window, then it shouldn't be affected anymore by the settings of chrome.

The whitelist is located here:
graphicDriverCheck = /usr/share/wine-browser-installer/hw-accel-default
This whitelist doesn't contain the exact Nvidia graphic cards that are known to work, but instead all Nvidia cards are whitelisted. In case you force for example GPU acceleration this check doesn't have any effect anymore. As you got a debug message that says that its enabled, there shouldn't be any problem with that. Pipelight itself just passes some arguments to Silverlight to enable/disable/force GPU acceleration.

I strongly recommend against running google-chrome or pipelight as root - neither Chrome, Pipelight, nor Silverlight is completely free of bugs, and it would be fatal if something goes wrong when running as root.

Which nvidia drivers are you using exactly?

Revision history for this message
vatbier (vatbier) said :
#6

maybe solution is here at this Russian site http://www.gentoo.ru/node/27504 (google translate is such a blessing):
I think for that Russian guythe nvidia error went away after installing a newer nvidia driver.

Hm, he installed 325.15 but where is that driver? Ah, I find it at http://www.nvidia.com/object/unix.html : it is the latest "Latest Short Lived Branch version" whatever that means.
Something to try out in the next days.

Revision history for this message
vatbier (vatbier) said :
#7

(at work now) I just saw your latest comment.
My lubuntu using nvidia drivers nvidia-313-updates for ubuntu 13.04 : 313.30-0ubuntu1

Revision history for this message
vatbier (vatbier) said :
#8

Solved! :)
The solution was to install an other window manager like KDE.
So LXDE (Lubuntu) has problems with silverlight HD video or with pipelight or with wine.

Installing nvidia-325.15 drivers only solved the nvida error (NVIDIA: could not open the device file /dev/nvidia0 (Operation not permitted)).

When googling for "video tearing ubuntu" I saw someone mentioning tearing in lubuntu but not in ubuntu. The glitches in my netflix video are not real tearing I think, it was only in some parts of the screen where there was lots of fast movement (I know the first 5 minutes of Mission Impossible: Ghost Protocol now by heart having played it for maybe 50 times).
So I installed on my Lubuntu KDE and low and behold in KDE netflix HD video plays now without glitches!!!

I still have to compare the netflix video on my Linux computer with the one on my Windows 7 computer because on my L/Kubuntu I'm wondering if some video sequences of netflix are not fluently enough (when the video is panning or zooming I get the feeling that there is a little stutter but it might be that it's just the way that movie was shot).

Michael and Sebastian, congratulations on your software pipelight!
It works great but maybe will not live long because netflix might change to an HTML5 solution.

Revision history for this message
vatbier (vatbier) said :
#9

I noticed on other movies a tearing effect at the top of the screen. Googling around I found there's also a solution for that: upgrade KDE to 4.11 (I will do that when Ubuntu 13.10 is released) or install an other window manager that doesn't have this bug or where it can be fixed easily.
See https://bbs.archlinux.org/viewtopic.php?id=160791, https://bugs.kde.org/show_bug.cgi?id=307965, https://devtalk.nvidia.com/default/topic/525074/image-tear-with-kwin-compositing-and-vsync-on/?offset=8#3718582 .