Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Install Netflix on Gentoo
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
ryao
Retired Dev
Retired Dev


Joined: 27 Feb 2012
Posts: 132

PostPosted: Tue Aug 06, 2013 9:44 pm    Post subject: Reply with quote

If WINEPREFIX is on ZFS, attempting to install Firefox in Wine will hang in an infinite loop after the UPX unpacker runs and before the firefox ./setup.exe launches its GUI. I filed a ZFSOnLinux issue for this:

https://github.com/zfsonlinux/zfs/issues/1624

I have written a patch to fix this problem. It will be in ZFSOnLinux 0.6.2. It will also be present in the next ZFSOnLinux ebuild revision that I push:

https://github.com/zfsonlinux/zfs/pull/1625

By the way, I observed some dropped frames when running emerge in the background. I managed to significantly reduce them by doing the following:

Create an /etc/local.d/cgroup.start file containing the following and make it executable:

Code:
#!/bin/sh

# Set to your Wine user
WINE_USER=richard

CGROUP_CPU=/sys/fs/cgroup/cpu

gen_die()
{
       echo "${1}"
       exit 1
}

call_func_timeout()
{
       local func=$1 timeout=$2 pid watcher
       [ $# -ne 2 ] && gen_die "call_func_timeout() called with $# arguments"

       ( ${func} ) & pid=$!
       ( sleep ${timeout} && kill -HUP ${pid} ) 2>/dev/null & watcher=$!
       if wait ${pid} 2>/dev/null; then
           kill -HUP $watcher 2> /dev/null
           wait $watcher 2>/dev/null
           return 1
       fi

       return 0
}

waitForPortage()
{
        while [ ! -f "${CGROUP_CPU}/portage/tasks" ]; do echo >/dev/null; done;
        exit 1
}

waitForWine()
{
        while [ ! -f "${CGROUP_CPU}/wine/tasks" ]; do echo >/dev/null; done;
        exit 1
}

if [ ! -f "${CGROUP_CPU}/tasks" ]; then
        echo "cpu cgroup missing"
        exit 1
fi

# Request cgroup creation
mkdir -p "${CGROUP_CPU}/portage"
mkdir -p "${CGROUP_CPU}/wine"

# cgroup creation is asynchronous, so busy wait here
if call_func_timeout waitForPortage 1
then
        chown portage:portage "${CGROUP_CPU}/portage/tasks"
        echo 2 > "${CGROUP_CPU}/portage/cpu.shares"
fi

# cgroup creation is asynchronous, so busy wait here
if call_func_timeout waitForWine 1
then
        chown $WINE_USER "${CGROUP_CPU}/wine/tasks"
        echo 262144 > "${CGROUP_CPU}/wine/cpu.shares"
fi


Be sure to update WINE_USER to be the name of the account in which you run Wine. You can avoid a reboot by executing the file yourself (as root).

You can make portage use the cgroup automatically by creating a /usr/local/sbin/portage-cgroup file containing the following, making it executable and putting PORTAGE_IONICE_COMMAND="/usr/local/sbin/portage-cgroup \${PID}" into portage's make.conf file:

Code:
#!/bin/sh
# $1 must be the portage PID

CGROUP_PORTAGE=/sys/fs/cgroup/cpu/portage

if [ ! -f "${CGROUP_PORTAGE}/tasks" ]; then
        echo "cpu cgroup missing"
        exit 1
fi

echo $1 > "${CGROUP_PORTAGE}/tasks"


You have two options for using the wine cgroup to start netflix. One is using libcgroup:

Code:
# Install cgroup utilities
emerge libcgroup

# Use netflix like this: (as WINE_USER)
cgexec -g cpu:wine wine "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe" "http://netflix.com/" 2>/dev/null


Another is using your system interpreter:

Code:
# Use netflix like this: (as WINE_USER)
sh -c 'echo $$ > /sys/fs/cgroup/cpu/wine/tasks && exec wine "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe" "http://netflix.com/" 2>/dev/null'


You can also modify the Firefox desktop file to launch using the cgroup by running sed -i -e 's/ wine / cgexec -g cpu:wine wine /' ~/.local/share/applications/wine/Programs/Mozilla\ Firefox.desktop. That depends on libcgroup. It should be fairly straightforward to modify it to use the shell method.

Note that using cgroups requires that you built your kernel with cgroup support and it will not work with BFS. Also, should you wish to remove the cgroups from your system for some reason, execute rmdir /sys/fs/cgroup/cpu/{wine,portage} as root.
Back to top
View user's profile Send private message
mrpdaemon
Tux's lil' helper
Tux's lil' helper


Joined: 23 Aug 2004
Posts: 134

PostPosted: Wed Sep 18, 2013 6:34 am    Post subject: Reply with quote

Thanks a million for the mspr.hds trick. Was pulling my hair out trying to figure why my install didn't work (cloned from a different machine).
Back to top
View user's profile Send private message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 446

PostPosted: Sat Sep 28, 2013 11:31 am    Post subject: Re: HOWTO: Install Netflix on Gentoo Reply with quote

cctsurf wrote:
Troubleshooting:
if error N8156-6022 you have XATTR problems
if error N8156-6013: find mspr.hds under ~.wine and delete it

I'm getting N8156-6022, but I think I have xattr working on all relevant partitions. On /, /home and /tmp I get:
Code:
getfattr tt -d
# file: tt
user.testAttr="attribute value"
but I still get the same error. Any thoughts?
Back to top
View user's profile Send private message
DanZ
n00b
n00b


Joined: 24 Sep 2004
Posts: 47
Location: Erie PA USA

PostPosted: Mon Nov 04, 2013 4:19 pm    Post subject: Re: HOWTO: Install Netflix on Gentoo Reply with quote

Nicias wrote:
cctsurf wrote:
Troubleshooting:
if error N8156-6022 you have XATTR problems
if error N8156-6013: find mspr.hds under ~.wine and delete it

I'm getting N8156-6022, but I think I have xattr working on all relevant partitions. On /, /home and /tmp I get:
Code:
getfattr tt -d
# file: tt
user.testAttr="attribute value"
but I still get the same error. Any thoughts?
I am having the same problem, did you find a solution?
Back to top
View user's profile Send private message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 446

PostPosted: Mon Nov 04, 2013 10:05 pm    Post subject: Re: HOWTO: Install Netflix on Gentoo Reply with quote

DanZ wrote:
Nicias wrote:
cctsurf wrote:
Troubleshooting:
if error N8156-6022 you have XATTR problems
if error N8156-6013: find mspr.hds under ~.wine and delete it

I'm getting N8156-6022, but I think I have xattr working on all relevant partitions. On /, /home and /tmp I get:
Code:
getfattr tt -d
# file: tt
user.testAttr="attribute value"
but I still get the same error. Any thoughts?
I am having the same problem, did you find a solution?

Nope.
Back to top
View user's profile Send private message
DanZ
n00b
n00b


Joined: 24 Sep 2004
Posts: 47
Location: Erie PA USA

PostPosted: Thu Nov 07, 2013 5:26 pm    Post subject: Reply with quote

I figured out where I went wrong. I followed the instructions in the OP explicitly without thinking. The How To says to mask >app-emulation/wine-1.6_rc1 and to create the patch dir for wine-1.6_rc1. Well, rc1 is no longer in portage so it instead emerged 1.6 and didn't apply the patches. Fixed that, but then patch 0005 failed on emerge. I tried then installing the latest wine, but the newest I could install without dependency issues was 1.7.0. Installed that and Netflix works after switching to full screen in Firefox.
Back to top
View user's profile Send private message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 446

PostPosted: Thu Nov 07, 2013 6:15 pm    Post subject: Reply with quote

So did you do any patching?
Back to top
View user's profile Send private message
DanZ
n00b
n00b


Joined: 24 Sep 2004
Posts: 47
Location: Erie PA USA

PostPosted: Thu Nov 07, 2013 6:53 pm    Post subject: Reply with quote

Just the 8 patches from http://www.compholio.com/wine-compholio/#patches from the OP.
Back to top
View user's profile Send private message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 446

PostPosted: Thu Nov 07, 2013 6:59 pm    Post subject: Reply with quote

I don't see 8 patches. If I follow the link:

http://www.compholio.com/wine-compholio/#patches

It says the patches have moved to

http://bazaar.launchpad.net/~pipelight/netflix-desktop/wine-compholio/files/head:/patches/

where there are 17 patches.

Which patches did you use?
Back to top
View user's profile Send private message
DanZ
n00b
n00b


Joined: 24 Sep 2004
Posts: 47
Location: Erie PA USA

PostPosted: Thu Nov 07, 2013 9:59 pm    Post subject: Reply with quote

This is what I downloaded. They must have made the change within the last day or two; in addition the patches I have seem to be different
Code:
dzmijewski@emachine ~ $ ls /etc/portage/patches/app-emulation/wine-1.7.0/
0001-ws2_32-Implement-SIO_ADDRESS_LIST_CHANGE-with-Notify.patch
0002-iphlpapi-Implement-NotifyAddrChange-on-Linux.patch
0003-iphlpapi-Implement-CancelIPChangeNotify.patch
0004-server-Create-directories-with-the-specified-securit.patch
0005-server-Store-and-return-security-attributes-with-ext.patch
0006-ntdll-Inherit-security-attributes-from-parent-direct.patch
0007-kernel32-Allow-string-comparison-with-linguistic-cas.patch
0008-winex11-Add-minimal-XEmbed-client-support.patch
Back to top
View user's profile Send private message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 446

PostPosted: Fri Nov 08, 2013 12:40 am    Post subject: Reply with quote

Drat, still getting the xattr error.
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Tue Apr 01, 2014 7:19 pm    Post subject: Reply with quote

Hey I just wanted to say thanks for getting netflicks working in Firefox using Pipelight.
I followed this guide here http://wiki.gentoo.org/wiki/Netflix/Pipelight

What a great idea just run the windows plugins in wine.
https://launchpad.net/pipelight
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
reisio
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jul 2004
Posts: 121

PostPosted: Tue Sep 30, 2014 7:04 pm    Post subject: Reply with quote

Some more options now that DRM has crept into HTML5:
http://wiki.gentoo.org/wiki/Netflix
Back to top
View user's profile Send private message
dweezil-n0xad
Apprentice
Apprentice


Joined: 30 Oct 2006
Posts: 156
Location: Ostend, Belgium

PostPosted: Wed Oct 01, 2014 12:02 pm    Post subject: Reply with quote

I view Netflix on Gentoo with Google Chrome. This works fine but playback is limited to 3000 kbps 720p. I also bought a Chromecast hdmi dongle to view Netflix on my dumb tv. I could not configure the Chromecast from Gentoo. I followed the instructions but my wireless card would not connect to Chromecast.

I had to use the setup in Windows to connect the Chromecast to my wireless network. After That I can control the Chromecast from Chrome in Gentoo. I installed the Netflix app now Netflix streams to my tv in 5800 kbps 1080p.
_________________
i7-4790K | 16GB DDR3 | GTX 970 | 500GB SSD
ASUS N56VV | i7-3630QM | 12GB DDR3 | GT 750M | 256GB SSD
Back to top
View user's profile Send private message
dweezil-n0xad
Apprentice
Apprentice


Joined: 30 Oct 2006
Posts: 156
Location: Ostend, Belgium

PostPosted: Fri Oct 10, 2014 7:05 am    Post subject: Reply with quote

Netflix removed the user agent restriction on Chrome :)
_________________
i7-4790K | 16GB DDR3 | GTX 970 | 500GB SSD
ASUS N56VV | i7-3630QM | 12GB DDR3 | GT 750M | 256GB SSD
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum