View previous topic :: View next topic |
Author |
Message |
ryao Retired Dev
Joined: 27 Feb 2012 Posts: 132
|
Posted: Tue Aug 06, 2013 9:44 pm Post subject: |
|
|
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 |
|
|
mrpdaemon Tux's lil' helper
Joined: 23 Aug 2004 Posts: 134
|
Posted: Wed Sep 18, 2013 6:34 am Post subject: |
|
|
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 |
|
|
Nicias Guru
Joined: 06 Dec 2005 Posts: 446
|
Posted: Sat Sep 28, 2013 11:31 am Post subject: Re: HOWTO: Install Netflix on Gentoo |
|
|
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 |
|
|
DanZ n00b
Joined: 24 Sep 2004 Posts: 47 Location: Erie PA USA
|
Posted: Mon Nov 04, 2013 4:19 pm Post subject: Re: HOWTO: Install Netflix on Gentoo |
|
|
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 |
|
|
Nicias Guru
Joined: 06 Dec 2005 Posts: 446
|
Posted: Mon Nov 04, 2013 10:05 pm Post subject: Re: HOWTO: Install Netflix on Gentoo |
|
|
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 |
|
|
DanZ n00b
Joined: 24 Sep 2004 Posts: 47 Location: Erie PA USA
|
Posted: Thu Nov 07, 2013 5:26 pm Post subject: |
|
|
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 |
|
|
Nicias Guru
Joined: 06 Dec 2005 Posts: 446
|
Posted: Thu Nov 07, 2013 6:15 pm Post subject: |
|
|
So did you do any patching? |
|
Back to top |
|
|
DanZ n00b
Joined: 24 Sep 2004 Posts: 47 Location: Erie PA USA
|
|
Back to top |
|
|
Nicias Guru
Joined: 06 Dec 2005 Posts: 446
|
|
Back to top |
|
|
DanZ n00b
Joined: 24 Sep 2004 Posts: 47 Location: Erie PA USA
|
Posted: Thu Nov 07, 2013 9:59 pm Post subject: |
|
|
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 |
|
|
Nicias Guru
Joined: 06 Dec 2005 Posts: 446
|
Posted: Fri Nov 08, 2013 12:40 am Post subject: |
|
|
Drat, still getting the xattr error. |
|
Back to top |
|
|
turtles Veteran
Joined: 31 Dec 2004 Posts: 1663
|
|
Back to top |
|
|
reisio Tux's lil' helper
Joined: 12 Jul 2004 Posts: 121
|
|
Back to top |
|
|
dweezil-n0xad Apprentice
Joined: 30 Oct 2006 Posts: 156 Location: Ostend, Belgium
|
Posted: Wed Oct 01, 2014 12:02 pm Post subject: |
|
|
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 |
|
|
dweezil-n0xad Apprentice
Joined: 30 Oct 2006 Posts: 156 Location: Ostend, Belgium
|
Posted: Fri Oct 10, 2014 7:05 am Post subject: |
|
|
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 |
|
|
|