Anyone have PA working under Linux with Optimus/Bumblebee/optirun?

Discussion in 'Mac and Linux' started by dtbaker, September 30, 2013.

  1. dtbaker

    dtbaker New Member

    Messages:
    9
    Likes Received:
    1
    Hello,

    Does anybody have PA launching successfully under "optirun" (laptops running with nvidia optimus) ?

    If you have it running successfully can you please post your:
    1. bumblebee configuration ( /etc/bumblebee/bumblebee.conf and /etc/bumblebee/xorg.conf.nvidia )
    2. kernel version ( uname -a )
    3. linux distribution ( cat /etc/issue )
    4. type of graphics ( lspci|grep VGA )
    5. glx information ( optirun glxinfo )
    6. current installed package versions ( dpkg -la|egrep -i "nvidia|glx|virtualgl" )
    My output below:

    When I try to run optirun ./PA I get this error:
    When I try to hack it so the CoherentUI_Host.bin binary (similar to Chromium) is launched via optirun (not the main PA binary) it launches fine but does not receive hardware accelleration (still renders on slow intel chip). When run under primusrun I get the blank screen (and laptop lags heaps).

    /etc/bumblebee/bumblebee.conf
    Code:
    [bumblebeed]
    VirtualDisplay=:8
    KeepUnusedXServer=false
    ServerGroup=bumblebee
    TurnCardOffAtExit=false
    NoEcoModeOverride=false
    Driver=nvidia
    XorgConfDir=/etc/bumblebee/xorg.conf.d
    [optirun]
    Bridge=auto
    VGLTransport=proxy
    PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
    AllowFallbackToIGC=false
    [driver-nvidia]
    KernelDriver=nvidia-current
    PMMethod=auto
    LibraryPath=/usr/lib/nvidia-current:/usr/lib32/nvidia-current
    XorgModulePath=/usr/lib/nvidia-current/xorg,/usr/lib/xorg/modules
    XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
    [driver-nouveau]
    KernelDriver=nouveau
    PMMethod=auto
    XorgConfFile=/etc/bumblebee/xorg.conf.nouveau
    
    /etc/bumblebee/xorg.conf.nvidia
    Code:
    Section "ServerLayout"
        Identifier  "Layout0"
        Option      "AutoAddDevices" "true"
        Option      "AutoAddGPU" "false"
    EndSection
    Section "Device"
        Identifier  "DiscreteNvidia"
        Driver      "nvidia"
        VendorName  "NVIDIA Corporation"
        BusID "PCI:01:00:0"
        Option "ProbeAllGpus" "false"
        Option "NoLogo" "false"
        Option "UseEDID" "true"
        Option "UseDisplayDevice" "none"
       Option "ConnectedMonitor" "DFP"
    EndSection
    
    uname -a
    Code:
    Linux laptop 3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:35:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
    cat /etc/issue
    Code:
    Linux Mint 15 Olivia \n \l
    lspci|grep VGA
    Code:
    00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    01:00.0 VGA compatible controller: NVIDIA Corporation GF106M [GeForce GT 555M] (rev ff)
    optirun glxinfo
    Code:
    name of display: :0.0
    display: :0  screen: 0
    direct rendering: Yes
    server glx vendor string: VirtualGL
    server glx version string: 1.4
    server glx extensions:
        GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info, 
        GLX_EXT_visual_rating, GLX_SGI_make_current_read, GLX_SGIX_fbconfig, 
        GLX_SGIX_pbuffer, GLX_SUN_get_transparent_index, GLX_ARB_create_context, 
        GLX_ARB_create_context_profile
    client glx vendor string: VirtualGL
    client glx version string: 1.4
    client glx extensions:
        GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info, 
        GLX_EXT_visual_rating, GLX_SGI_make_current_read, GLX_SGIX_fbconfig, 
        GLX_SGIX_pbuffer, GLX_SUN_get_transparent_index, GLX_ARB_create_context, 
        GLX_ARB_create_context_profile
    GLX version: 1.4
    GLX extensions:
        GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info, 
        GLX_EXT_visual_rating, GLX_SGI_make_current_read, GLX_SGIX_fbconfig, 
        GLX_SGIX_pbuffer, GLX_SUN_get_transparent_index, GLX_ARB_create_context, 
        GLX_ARB_create_context_profile
    OpenGL vendor string: NVIDIA Corporation
    OpenGL renderer string: GeForce GT 555M/PCIe/SSE2
    OpenGL version string: 4.3.0 NVIDIA 325.15
    OpenGL shading language version string: 4.30 NVIDIA via Cg compiler
    OpenGL extensions ...
    dpkg -la|egrep -i "nvidia|glx|virtualgl"|tr -s ' '|cut -d' ' -f2-4
    Code:
    bbswitch-dkms 0.7-1~raringppa2 all
    bumblebee 3.2.1-1~raringppa3 amd64
    bumblebee-nvidia 3.2.1-1~raringppa3 amd64
    libgl1-mesa-glx:amd64 9.1.3-0ubuntu0.3 amd64
    libgl1-mesa-glx:i386 9.1.3-0ubuntu0.3 i386
    libxcb-glx0:amd64 1.8.1-2ubuntu2.1 amd64
    libxcb-glx0:i386 1.8.1-2ubuntu2.1 i386
    mate-sensors-applet-nvidia 1.6.0-1+raring amd64
    nouveau-firmware 20091212-0ubuntu1 all
    nvidia-304 304.88-0ubuntu1 amd64
    nvidia-325 325.15-0ubuntu1~xedgers~raring2 amd64
    nvidia-common 1:0.2.76 amd64
    nvidia-persistenced 325.15-0ubuntu1~xedgers~raring1 amd64
    nvidia-settings-304 304.88-0ubuntu1 amd64
    nvidia-settings-325 325.15-0ubuntu1~xedgers~raring2 amd64
    primus 20130805-1~raringppa1 amd64
    virtualgl 2.3.2-1~raringppa2 amd64
    virtualgl-libs:amd64 2.3.2-1~raringppa2 amd64
    virtualgl-libs:i386 2.3.2-1~raringppa2 i386
    virtualgl-libs-ia32 2.3.2-1~raringppa2 i386
    
    Thanks!!
  2. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
  3. dtbaker

    dtbaker New Member

    Messages:
    9
    Likes Received:
    1
    It is working now in Linux Mint 15 after doing a dist-upgrade and a couple of reboots.

    Open the script 'host/CoherentUI_Host' and change this line:
    Code:
    exec -a "$0" "$HOST_DIR/CoherentUI_Host.bin" "$@"
    to this
    Code:
    exec optirun  "$HOST_DIR/CoherentUI_Host.bin" "--ignore-gpu-blacklist" "--disable-gpu-sandbox" "--disable-gpu-blacklist" "--enable-webgl" "--ignore-gpu-blacklist" "$@"
    (note: those flags probably do nothing, but it's working now so I'm not changing it)

    Then launch ./PA normally (without optirun) and it will load the CoherentUI under optirun with hardware accelleration

    UI performance is a million times faster! Game play is wicked. But check process list after quiting PA as it may hang around under the optirun process afterwards chewing up resources.

    I'm pretty sure the updated kernel and package versions resolved the issue. Here's the working system details.

    optirun glxinfo
    Code:
    name of display: :0.0
    display: :0  screen: 0
    direct rendering: Yes
    server glx vendor string: VirtualGL
    server glx version string: 1.4
    server glx extensions:
        GLX_ARB_create_context, GLX_ARB_create_context_profile, 
        GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info, 
        GLX_EXT_visual_rating, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
        GLX_SGI_make_current_read, GLX_SUN_get_transparent_index
    client glx vendor string: VirtualGL
    client glx version string: 1.4
    client glx extensions:
        GLX_ARB_create_context, GLX_ARB_create_context_profile, 
        GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info, 
        GLX_EXT_visual_rating, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
        GLX_SGI_make_current_read, GLX_SUN_get_transparent_index
    GLX version: 1.4
    GLX extensions:
        GLX_ARB_create_context, GLX_ARB_create_context_profile, 
        GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info, 
        GLX_EXT_visual_rating, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
        GLX_SGI_make_current_read, GLX_SUN_get_transparent_index
    OpenGL vendor string: NVIDIA Corporation
    OpenGL renderer string: GeForce GT 555M/PCIe/SSE2
    OpenGL core profile version string: 4.3.0 NVIDIA 325.15
    OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler
    OpenGL core profile context flags: (none)
    OpenGL core profile profile mask: core profile
    OpenGL core profile extensions:
    
    uname -a
    Code:
    Linux laptop 3.8.0-31-generic #46-Ubuntu SMP Tue Sep 10 20:03:44 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
    dpkg -la|egrep -i "nvidia|glx|virtualgl"|tr -s ' '|cut -d' ' -f2-4
    Code:
    bbswitch-dkms 0.7-1~raringppa2 all
    bumblebee 3.2.1-1~raringppa3 amd64
    bumblebee-nvidia 3.2.1-1~raringppa3 amd64
    libgl1-mesa-glx:amd64 9.2.0~git20130729+9.2.9b8ad643-0ubuntu0sarvatt~raring amd64
    libgl1-mesa-glx:i386 9.2.0~git20130729+9.2.9b8ad643-0ubuntu0sarvatt~raring i386
    libxcb-glx0:amd64 1.8.1-2ubuntu2.1 amd64
    libxcb-glx0:i386 1.8.1-2ubuntu2.1 i386
    mate-sensors-applet-nvidia 1.6.0-1+raring amd64
    nouveau-firmware 20091212-0ubuntu1 all
    nvidia-304 304.88-0ubuntu1 amd64
    nvidia-325 325.15-0ubuntu1~xedgers~raring2 amd64
    nvidia-common 1:0.2.76 amd64
    nvidia-persistenced 325.15-0ubuntu1~xedgers~raring1 amd64
    nvidia-settings-304 304.88-0ubuntu1 amd64
    nvidia-settings-325 325.15-0ubuntu1~xedgers~raring2 amd64
    primus 20130805-1~raringppa1 amd64
    virtualgl 2.3.2-1~raringppa2 amd64
    virtualgl-libs:amd64 2.3.2-1~raringppa2 amd64
    virtualgl-libs:i386 2.3.2-1~raringppa2 i386
    virtualgl-libs-ia32 2.3.2-1~raringppa2 i386
  4. kexD

    kexD New Member

    Messages:
    17
    Likes Received:
    0
    Steam version is working flawlessly, at least for me. If you want to try it, open PA properties in steam, press "set launch options" and write "optirun -b primus %COMMAND%"
  5. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    You running it with Steam runtime? It's not require "GLIBCXX_3.4.17" anymore? Or you put custom libstdc++ here?
  6. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Are you sure this is working, dtbaker? I just tried it, and from the PA log:
    Code:
    [18:43:53.003] INFO Log file /home/jarno/Games/PA/media/user/log/PA-18-43-53.003.txt opened
    [18:43:54.003] INFO Loaded 0 mods
    [18:43:54.018] INFO GL_VENDOR: Intel Open Source Technology Center
    [18:43:54.018] INFO GL_RENDERER: Mesa DRI Intel(R) Ivybridge Mobile
    [18:43:54.018] INFO GL_VERSION: 3.0 Mesa 9.2.0-devel
    [18:43:54.018] INFO GL_SHADING_LANGUAGE_VERSION: 1.30
    [18:43:54.018] INFO Intel Sandybridge detected. Disabling gamma-correct pipeline.
    Checking my NVidia card's memory usage show only 74 Mb usage while simulating a solar system with three planets.
  7. dtbaker

    dtbaker New Member

    Messages:
    9
    Likes Received:
    1
    I just tried it again this morning to check the log file and performance was horrible. I can see the low GPU usage as well and the Intel in the log file. Just converted key to steam and I'll try over there in an hour or so to see if it's any better. Bugger!
  8. kexD

    kexD New Member

    Messages:
    17
    Likes Received:
    0
    I just symlinked libstdc++.so.6 to the PA folder. Forgot to mention, it's ubuntu 13.04 on my machine, so it is possible to fix GLIBCXX issue like that.

    edit: decided to clarify. To get PA working from steam you need 2 things:
    1) Newer GLIBCXX from ubuntu 13.04
    2) symlinking libstdc++.so.6 to PA directory.

    edit2: In this case PA is running on nvidia card, so I have pretty decent fps for my old computer. CoherentUI_Host is still running on the intel card and I still have missing icons and other ui related glitches.
    Last edited: October 2, 2013
  9. FeepingCreature

    FeepingCreature New Member

    Messages:
    7
    Likes Received:
    0
    I tried this, with optimusrun and primusrun, but it doesn't seem to work anymore. Best case I just get a black screen with a UI on top. (I got the game running a few versions back, albeit with the known broken UI, but haven't been able to lately)
  10. kexD

    kexD New Member

    Messages:
    17
    Likes Received:
    0
    Ok, I tried few ways of running the game now, will post a short summary.

    Game itself:
    without optirun: ok
    with optirun -b primus: ok
    with optirun -b virtualgl: immediate crash

    CoherentUI_Host:
    without optirun: icons and cursors loaded incorrectly, everything else is ok
    with optirun -b primus: crash
    with optirun -b virtualgl: running with bugs, (black box around cursor)

    Together:
    CoherentUI with "optirun -b virtualgl" + Game with "optirun -b primus": black screen ingame, menu ok
    CoherentUI with "optirun -b virtualgl" + Game without optirun: black screen ingame, menu ok
    CoherentUI witout optirun + Game without optirun: ok, icon loading bugs
    CoherentUI witout optirun + Game with "optirun -b primus": ok, icon loading bugs

    So, if somehow we will manage to run both PA and CoherentUi with primus as a bridge we will probably be ok.
  11. Gwmngilfen

    Gwmngilfen New Member

    Messages:
    9
    Likes Received:
    0
    I'm getting similar behaviour. The first Beta build ran ok (primusrun ./PA, Coherent on the Intel) but now in recent builds I can't get a playable game world at all. I always have a black screen with the Coherent UI over the top unless I run everything on the Intel (which is obviously slow).
  12. kexD

    kexD New Member

    Messages:
    17
    Likes Received:
    0
    Strange, it's running ok in that configuration. Try restarting the game few times and if that won't help check CoherentUI log.
  13. Gwmngilfen

    Gwmngilfen New Member

    Messages:
    9
    Likes Received:
    0
  14. sechastain

    sechastain Member

    Messages:
    84
    Likes Received:
    22
    I'm wondering if there was an earlier build in the beta where things were working and then things stopped after an update.

    It's hard for me to say one way or another - but I thought I had things working. But then my system, in general, went to **** for other reasons. I had to reinstall, and now I have doubts about what I was seeing.

    Either way, it doesn't look like primus is working right now.
  15. Gwmngilfen

    Gwmngilfen New Member

    Messages:
    9
    Likes Received:
    0
    Just done a check with the latest build - Primus seems fine with Coherent, but still getting a black screen when running PA on Primus. Maybe next build :p

    EDIT: Does anyone know if there's an open bug for this? We should create one if not...
  16. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
  17. Gwmngilfen

    Gwmngilfen New Member

    Messages:
    9
    Likes Received:
    0
    If that's so, how did it break from the first beta build (which was fine) to the second beta build (after which it was broken)? I've not updated Primus, so driver-side seems unlikely. I'm curious as to what else may have changed?

    I don't think the software rendering of the Cohrent UI will help Optimus owners, as Coherent renders fine anyway - it's the game world that doesn't. I did a quick test with exporting LIBGL_ALWAYS_SOFTWARE=1 before startup, but it doesn't help as far as I can tell - game world is still a black screen.

    Thanks! Upvoted :)
  18. FeepingCreature

    FeepingCreature New Member

    Messages:
    7
    Likes Received:
    0
    The game works great for me using NVidia's official xrandr14-based GPU offloading mode. Slight hit to battery lifetime, of course, and suspend/resume is utterly shot. I guess that's acceptable though.

Share This Page