Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmplayer 12 issues with latest vmware-bumblebee on Debian #12

Open
docsmooth opened this issue Apr 14, 2016 · 9 comments
Open

vmplayer 12 issues with latest vmware-bumblebee on Debian #12

docsmooth opened this issue Apr 14, 2016 · 9 comments
Assignees
Labels

Comments

@docsmooth
Copy link
Owner

@jgkamat says: I still have issues running vmplayer though (it runs, but w/o the nvidia card). It may be because I'm using the latest version of vmplayer, but this patch at least makes it stop erroring out for me.

@docsmooth docsmooth added the bug label Apr 14, 2016
@docsmooth docsmooth self-assigned this Apr 14, 2016
@jgkamat
Copy link
Contributor

jgkamat commented Apr 14, 2016

Here's the output of bash -x ./vmplayer. I'm using VMWare Workstation 12 Player, standalone.

+ gVers=2.0
+ ACADAPTER=/sys/class/power_supply/AC
+ BATTERY=/sys/class/power_supply/BAT0
+ FORCE3D=a
+ DO3D=n
++ basename vmplayer
+ scriptname=vmplayer
+ echo --yes
+ egrep -q -w '(help|h|\?)'
+ '[' 1 -eq 0 ']'
++ which gksudo
+ '[' -x /usr/bin/gksudo ']'
++ which gksudo
+ SUDO='/usr/bin/gksudo -k'
+ determineos
++ uname -p
+ ARCH=unknown
+ '[' unknown = unknown ']'
++ uname -m
+ ARCH=x86_64
+ '[' x86_64 = unknown ']'
++ which dpkg
+ '[' /usr/bin/dpkg ']'
+ OStype=deb
++ grep -c -i ubuntu /etc/os-release
+ '[' 0 -gt 0 ']'
+ grep -q debian /etc/os-release
+ DISTRO=debian
+ LIB32=/lib/i386-linux-gnu
+ ULIB32=/usr/lib/i386-linux-gnu
+ LIB64=/lib/x86_64-linux-gnu/
+ ULIB64=/usr/lib/x86_64-linux-gnu/
+ NVIDIA_DEST32=/usr/lib/i386-linux-gnu
+ '[' -d /usr/lib/i386-linux-gnu/linux-gnu ']'
+ NVIDIA_DEST64=/usr/lib/x86_64-linux-gnu/
+ '[' -d /usr/lib/x86_64-linux-gnu//linux-gnu ']'
+ '[' x86_64 = x86_64 -o x86_64 = amd64 ']'
+ ULIB=/usr/lib/x86_64-linux-gnu/
+ LIB=/lib/x86_64-linux-gnu/
+ NVIDIA_DEST=/usr/lib/x86_64-linux-gnu/
+ '[' -z /usr/lib/x86_64-linux-gnu/ ']'
+ '[' -z /lib/x86_64-linux-gnu/ ']'
+ '[' -z debian ']'
+ '[' -z /usr/lib/x86_64-linux-gnu/ ']'
+ '[' -d /usr/lib/x86_64-linux-gnu//nvidia/current ']'
+ nvdir=/usr/lib/x86_64-linux-gnu//nvidia/current
++ dirname /usr/lib/x86_64-linux-gnu//nvidia/current
+ nvdir=/usr/lib/x86_64-linux-gnu//nvidia
++ basename /usr/lib/x86_64-linux-gnu//nvidia
+ NVIDIAVERSION=nvidia
+ echo 'Using NVIDIAVERSION nvidia from directory '\''/usr/lib/x86_64-linux-gnu//nvidia'\'''
+ export ARCH
+ export DISTRO
+ export OStype
+ export ULIB
+ export LIB
+ export ULIB32
+ export ULIB64
+ export NVIDIA_DEST
+ export NVIDIAVERSION
+ echo --yes
+ egrep -q -w '(yes|y|f|force)'
+ '[' 0 -eq 0 ']'
+ echo 'forcing 3d on'
+ FORCE3D=y
+ echo --yes
+ egrep -q -w '(n|no)'
+ '[' 1 -eq 0 ']'
+ echo --yes
+ egrep -q -w '(r|remove)'
+ '[' 1 -eq 0 ']'
+ echo --yes
+ egrep -q -w '(i|install)'
+ '[' 1 -eq 0 ']'
+ case "$-" in
+ echo ''\''-x'\'' is set, continuing in forked process'
+ SHOPT='bash -x '
+ fixlinks
++ ls /usr/lib/x86_64-linux-gnu//libnvidia-eglcore.so.352.79 /usr/lib/x86_64-linux-gnu//libnvidia-glcore.so.352.79 /usr/lib/x86_64-linux-gnu//libnvidia-glsi.so.352.79 /usr/lib/x86_64-linux-gnu//libnvidia-ml.so.1 /usr/lib/x86_64-linux-gnu//libnvidia-tls.so.352.79 /usr/lib/x86_64-linux-gnu//nvidia
+ DEST='/usr/lib/x86_64-linux-gnu//libnvidia-eglcore.so.352.79
/usr/lib/x86_64-linux-gnu//libnvidia-glcore.so.352.79
/usr/lib/x86_64-linux-gnu//libnvidia-glsi.so.352.79
/usr/lib/x86_64-linux-gnu//libnvidia-ml.so.1
/usr/lib/x86_64-linux-gnu//libnvidia-tls.so.352.79

/usr/lib/x86_64-linux-gnu//nvidia:
current
libEGL.so.1
libGLESv1_CM.so.1
libGLESv2.so.2
libGL.so.1
libnvidia-cfg.so.1'
+ '[' -z '/usr/lib/x86_64-linux-gnu//libnvidia-eglcore.so.352.79
/usr/lib/x86_64-linux-gnu//libnvidia-glcore.so.352.79
/usr/lib/x86_64-linux-gnu//libnvidia-glsi.so.352.79
/usr/lib/x86_64-linux-gnu//libnvidia-ml.so.1
/usr/lib/x86_64-linux-gnu//libnvidia-tls.so.352.79

/usr/lib/x86_64-linux-gnu//nvidia:
current
libEGL.so.1
libGLESv1_CM.so.1
libGLESv2.so.2
libGL.so.1
libnvidia-cfg.so.1' ']'
+ bbrun=/usr/bin/optirun
+ '[' '!' -x /usr/bin/optirun ']'
+ '[' '!' -x /usr/bin/optirun ']'
+ '[' y = y ']'
+ DO3D=y
+ export DO3D
+ '[' Xvmplayer = Xvmplayer ']'
+ VMware=/usr/bin/vmplayer
+ '[' y = y ']'
+ export bbrun
+ '[' -z /home/jay/.Xauthority ']'
+ export XAUTHORITY
+ XAUTHORITY=/home/jay/.Xauthority
+ /usr/bin/gksudo -k '/usr/bin/optirun bash -x  /usr/bin/vmplayer'
+ set -e
+ ETCDIR=/etc/vmware
+ . /etc/vmware/bootstrap
++ PREFIX=/usr
++ BINDIR=/usr/bin
++ SBINDIR=/usr/sbin
++ LIBDIR=/usr/lib
++ DATADIR=/usr/share
++ SYSCONFDIR=/etc
++ DOCDIR=/usr/share/doc
++ MANDIR=/usr/share/man
++ INCLUDEDIR=/usr/include
++ INITDIR=/etc
++ INITSCRIPTDIR=/etc/init.d
+ export 'PRODUCT_NAME=VMware Player'
+ PRODUCT_NAME='VMware Player'
+ libdir=/usr/lib/vmware
+ bindir=/usr/lib/vmware/bin
+ sharedir=/usr/lib/vmware/share
+ export VMWARE_ZENITY_UI_FILE=/usr/lib/vmware/share/zenity/zenity.ui
+ VMWARE_ZENITY_UI_FILE=/usr/lib/vmware/share/zenity/zenity.ui
+ ZENITY=/usr/lib/vmware/bin/vmware-zenity
+ toolsRebuildError='
The VMware Tools kernel modules could not be automatically rebuilt.

Please manually run:
  vmware-config-tools.pl --modules-only
To rebuild them.
'
+ export APPMENU_DISPLAY_BOTH=1
+ APPMENU_DISPLAY_BOTH=1
+ export UBUNTU_MENUPROXY=0
+ UBUNTU_MENUPROXY=0
+ export GNOME_DISABLE_CRASH_DIALOG=1
+ GNOME_DISABLE_CRASH_DIALOG=1
+ vmci_alias='pci:v000015ADd00000740sv*sd*bc*sc*i*'
+ vsock_alias=vmware_vsock
+ vmmon=vmmon
+ echo ''
+ grep -q '^-'
+ '[' -z :0 ']'
+ cat /usr/lib/vmware/modules/modules.xml
+ grep -q 'name="vmci"'
+ /usr/bin/vmware-modconfig '--appname=VMware Player' --icon=vmware-player
+ vmware_module_exists vmmon
+ modalias=vmmon
+ /sbin/modprobe -n vmmon
+ exec /usr/lib/vmware/bin/vmplayer
I/O warning : failed to load external entity "/etc/vmware/hostd/proxy.xml"
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
+ fixx11owners pulse
+ FILE=pulse
+ '[' -d /pulse -a y = y ']'
+ fixx11owners X11-display
+ FILE=X11-display
+ '[' -d /X11-display -a y = y ']'
+ exit 0

Without the vmware-bumbebee script, I get hardware acceleration w/ the integrated intel card, but with the script I get no hardware acceleration at all, and no processes show up in the output of optirun nvidia-smi. I'm happy to provide any more information if you would like. Thanks for looking into this!

@docsmooth
Copy link
Owner Author

  • /usr/bin/gksudo -k '/usr/bin/optirun bash -x /usr/bin/vmplayer'
  • set -e
  • ETCDIR=/etc/vmware
  • . /etc/vmware/bootstrap

That's not right. Did you run "sudo vmware -i" first ?

@jgkamat
Copy link
Contributor

jgkamat commented Apr 14, 2016

I think I had run the installer a while ago, and I broke a couple of things (I think the installer didn't run correctly). I've completely reinstalled vmplayer to try to start on everything again. (Also I've gotten some of the library paths wrong, I'll submit a patch once this is figured out to fix this).

This is the output I get when running the install script on a fresh install

jay@laythe:~/Code/vmware-bumblebee$ sudo bash -x ./vmplayer -i
+ gVers=2.0
+ ACADAPTER=/sys/class/power_supply/AC
+ BATTERY=/sys/class/power_supply/BAT0
+ FORCE3D=a
+ DO3D=n
++ basename ./vmplayer
+ scriptname=vmplayer
+ echo -i
+ egrep -q -w '(help|h|\?)'
+ '[' 1 -eq 0 ']'
++ which gksudo
+ '[' -x /usr/bin/gksudo ']'
++ which gksudo
+ SUDO='/usr/bin/gksudo -k'
+ determineos
++ uname -p
+ ARCH=unknown
+ '[' unknown = unknown ']'
++ uname -m
+ ARCH=x86_64
+ '[' x86_64 = unknown ']'
++ which dpkg
+ '[' /usr/bin/dpkg ']'
+ OStype=deb
++ grep -c -i ubuntu /etc/os-release
+ '[' 0 -gt 0 ']'
+ grep -q debian /etc/os-release
+ DISTRO=debian
+ LIB32=/lib/i386-linux-gnu
+ ULIB32=/usr/lib/i386-linux-gnu
+ LIB64=/lib
+ ULIB64=/usr/lib
+ NVIDIA_DEST32=/usr/lib/i386-linux-gnu
+ '[' -d /usr/lib/i386-linux-gnu/linux-gnu ']'
+ NVIDIA_DEST64=/usr/lib
+ '[' -d /usr/lib/linux-gnu ']'
+ '[' x86_64 = x86_64 -o x86_64 = amd64 ']'
+ ULIB=/usr/lib
+ LIB=/lib
+ NVIDIA_DEST=/usr/lib
+ '[' -z /usr/lib ']'
+ '[' -z /lib ']'
+ '[' -z debian ']'
+ '[' -z /usr/lib ']'
+ '[' -d /usr/lib/nvidia/current ']'
+ nvdir=/usr/lib/nvidia/current
++ dirname /usr/lib/nvidia/current
+ nvdir=/usr/lib/nvidia
++ basename /usr/lib/nvidia
+ NVIDIAVERSION=nvidia
+ echo 'Using NVIDIAVERSION nvidia from directory '\''/usr/lib/nvidia'\'''
Using NVIDIAVERSION nvidia from directory '/usr/lib/nvidia'
+ export ARCH
+ export DISTRO
+ export OStype
+ export ULIB
+ export LIB
+ export ULIB32
+ export ULIB64
+ export NVIDIA_DEST
+ export NVIDIAVERSION
+ echo -i
+ egrep -q -w '(yes|y|f|force)'
+ '[' 1 -eq 0 ']'
+ echo -i
+ egrep -q -w '(n|no)'
+ '[' 1 -eq 0 ']'
+ echo -i
+ egrep -q -w '(r|remove)'
+ '[' 1 -eq 0 ']'
+ echo -i
+ egrep -q -w '(i|install)'
+ '[' 0 -eq 0 ']'
+ '[' root = root ']'
+ '[' debian = fedora ']'
+ '[' debian = opensuse ']'
+ installvmx_script
+ backup_file 'setuid ELF' /usr/lib/vmware/bin/vmware-vmx
+ FILETYPE='setuid ELF'
+ shift
+ FILE=/usr/lib/vmware/bin/vmware-vmx
+ '[' -x /usr/lib/vmware/bin/vmware-vmx ']'
++ file /usr/lib/vmware/bin/vmware-vmx
+ filetype='/usr/lib/vmware/bin/vmware-vmx: setuid ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.9, BuildID[sha1]=ff1ec7dffb8ea1bd11c46ef08aad04801f3b2faa, stripped'
+ echo /usr/lib/vmware/bin/vmware-vmx: setuid ELF 64-bit LSB shared object, x86-64, version 1 '(SYSV),' dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.9, 'BuildID[sha1]=ff1ec7dffb8ea1bd11c46ef08aad04801f3b2faa,' stripped
+ grep -q 'setuid ELF'
+ '[' 0 -ne 0 ']'
+ '[' -f /usr/lib/vmware/bin/vmware-vmx.real ']'
+ mv /usr/lib/vmware/bin/vmware-vmx /usr/lib/vmware/bin/vmware-vmx.real
+ '[' 0 -ne 0 ']'
+ touch /usr/lib/vmware/bin/vmware-vmx
+ cat
+ '[' 0 -ne 0 ']'
+ chmod u+s,a+x /usr/lib/vmware/bin/vmware-vmx
+ '[' 0 -ne 0 ']'
+ backup_file ASCII
+ FILETYPE=ASCII
+ shift
+ FILE=
+ '[' -x ']'
++ file
Usage: file [-bcEhikLlNnprsvzZ0] [--apple] [--extension] [--mime-encoding] [--mime-type]
            [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
       file -C [-m magicfiles]
       file [--help]
+ filetype=
+ echo
+ grep -q ASCII
+ '[' 1 -ne 0 ']'
+ echo 'ERROR:  is not a ASCII!'
ERROR:  is not a ASCII!
+ echo ''

+ echo 'ERROR: Refusing to continue!'
ERROR: Refusing to continue!
+ exit 16

Something seems to be wrong with the vmware-vmx binary (it shows up as red in my ls output?). This is what I get for the permissions of that folder (after running the script).

jay@laythe:~/Code/vmware-bumblebee$ ls -la /usr/lib/vmware/bin/
total 86564
drwxr-xr-x  2 root root     4096 Apr 14 16:15 .
drwxr-xr-x 20 root root     4096 Apr 14 16:12 ..
-rwxr-xr-x  1 root root   804048 Apr 14 16:11 appLoader
-rwxr-xr-x  1 root root    78457 Apr 14 16:12 fusermount
-rwxr-xr-x  1 root root    15157 Apr 14 16:11 launcher.sh
lrwxrwxrwx  1 root root       29 Apr 14 16:12 licenseTool -> /usr/lib/vmware/bin/appLoader
-rwxr-xr-x  1 root root   506768 Apr 14 16:12 mkisofs
lrwxrwxrwx  1 root root       29 Apr 14 16:12 thnuclnt -> /usr/lib/vmware/bin/appLoader
lrwxrwxrwx  1 root root       29 Apr 14 16:12 vmplayer -> /usr/lib/vmware/bin/appLoader
lrwxrwxrwx  1 root root       29 Apr 14 16:12 vmware-app-control -> /usr/lib/vmware/bin/appLoader
lrwxrwxrwx  1 root root       29 Apr 14 16:12 vmware-enter-serial -> /usr/lib/vmware/bin/appLoader
lrwxrwxrwx  1 root root       29 Apr 14 16:12 vmware-fuseUI -> /usr/lib/vmware/bin/appLoader
lrwxrwxrwx  1 root root       29 Apr 14 16:12 vmware-gksu -> /usr/lib/vmware/bin/appLoader
lrwxrwxrwx  1 root root       29 Apr 14 16:12 vmware-modconfig -> /usr/lib/vmware/bin/appLoader
lrwxrwxrwx  1 root root       29 Apr 14 16:12 vmware-modconfig-console -> /usr/lib/vmware/bin/appLoader
lrwxrwxrwx  1 root root       29 Apr 14 16:12 vmware-netcfg -> /usr/lib/vmware/bin/appLoader
-rwxr-xr-x  1 root root  8207024 Apr 14 16:12 vmware-remotemks
lrwxrwxrwx  1 root root       29 Apr 14 16:12 vmware-unity-helper -> /usr/lib/vmware/bin/appLoader
-rwxr-xr-x  1 root root  4825689 Apr 14 16:12 vmware-usbarbitrator
lrwxrwxrwx  1 root root       29 Apr 14 16:12 vmware-vmblock-fuse -> /usr/lib/vmware/bin/appLoader
-rwsr-xr-x  1 root root     1045 Apr 14 16:15 vmware-vmx
-rwsr-xr-x  1 root root 28191856 Apr 14 16:12 vmware-vmx-debug
-rwsr-xr-x  1 root root 21379560 Apr 14 16:11 vmware-vmx.real
-rwsr-xr-x  1 root root 24604360 Apr 14 16:11 vmware-vmx-stats
lrwxrwxrwx  1 root root       29 Apr 14 16:12 vmware-zenity -> /usr/lib/vmware/bin/appLoader

When I run the vmware-vmx file nothing seems to happen? I'm not sure what I'ts supposed to do.

@jgkamat
Copy link
Contributor

jgkamat commented Apr 14, 2016

Ah I think I've gotten something better, give me a little bit to debug some more. I just needed to move the part where VMware was set up a little bit to get the file call to work.

@jgkamat
Copy link
Contributor

jgkamat commented Apr 14, 2016

I think I've got vmplayer to start w/ primus. It seems to crash after a bit, but I'll submit what I have as a PR and keep you updated on my process of debugging that.

@docsmooth
Copy link
Owner Author

Give me a second to fix up the install routine for the error you ran into. The flow of the script is as follows:

the "vmware" that you call (that is this script) determines whether or not to launch everything under primusrun, which requires that it be run as root. That sets a bunch of variables, and calls the "gksu /usr/lib/vmware/bin/vmware-vmx".

Vmware-vmx is another script that the installer installs, that then, running as root, launches each of the VMs under primusrun. Because the Window that VMWare runs in is a separate process from each VM, so each VM needs to be properly launched with primusrun as well, or you don't get 3d accelleration from NVidia.
The parent needs to be run as root, so that the VMs can be managed from the main window, and the VMs need to be run as root to get 3d accelleration because of something a guy discovered on the vmware forums 2 years ago. :)

So let's first look at the installer of the 2nd script as the likely culprit. :)

@docsmooth
Copy link
Owner Author

First, there's a bug in the installer getting even vmware to work. When I get home tonight I'll check in that fix. That will solve the $ULIB problems you're working around with hardcoded paths, as well as the installer not doing the "sed" on the /usr/bin/vmplayer script properly.

I'm getting a segfault in Windows 8 when the GUI loads though, so this upcoming fix might NOT be the right thing. I might be able to get a case open though.

@jgkamat
Copy link
Contributor

jgkamat commented May 10, 2016

I'm getting that same segfault (I think), although I'm not sure what is causing it. I could be doing something wrong when setting the paths I guess. Keep me updated on what you find out!

@docsmooth
Copy link
Owner Author

I forked off vmware12 branch to try to solve this, and still haven't been able to get around that segfault myself. I might hit one of the Workstation Devs up on Twitter to see if there's something we've got fundamentally wrong, because I can't read the trace that results from that segfault.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants