• Bumblebee - Run entire KDE session on NVIDIA

    NB This how to requires a working Bumblebee configuration

    Users of NVIDIA Optimus configurations so far have not been able to run their entire KDE session on the NVIDIA card instead of the integrated Intel. Here's how to make that happen, big thanks to Zeronte | making Linux even simpler
    NB. All is done from a user session, sudo will be used where root permissions are needed.

    1. Add an entry to the Session manager in KDM:
    kwrite kde-primusrun.desktop
    Paste this in the empty file
    [Desktop Entry]
    Name=KDE HDMI Enabled
    Comment=KDE Desktop Environment
    Save the file. Now change the permissions and copy the file to it's proper destination:
    chmod a+x kde-primusrun.desktop && sudo cp kde-primusrun.desktop /usr/share/xsessions/
    Enter rootpassword when prompted for.

    2. Create a file that will do the actual start of the KDE session:
    kwrite primus-kde
    put these lines in it
    vblank_mode=0 /usr/bin/primusrun /usr/bin/startkde
    Save it, Change it's permissions and copy it to it's proper destination:
    chmod a+x primus-kde && sudo mv primus-kde /usr/local/bin/
    3. Switching to the new session
    In the KDE login screen (KDM), select "KDE HDMI Enabled" as your session
    A quick check in Kinfocenter now shows the NVIDIA as the graphics adapter
    glxinfo2 | grep OpenGL
    now should show something like
    OpenGL vendor string: NVIDIA CorporationOpenGL renderer string: GeForce 610M/PCIe/SSE2
    OpenGL version string: 4.3.0 NVIDIA 325.15
    OpenGL shading language version string: 4.30 NVIDIA via Cg compiler
    OpenGL extensions:
    Comments 2 Comments
    1. Lachu's Avatar
      Lachu -
      Is there a way to run two graphics card - one for one X Session and second for second X session? Another example is to run Windows via KVM and share NVidia graphics adapter with Windows(X server will use Intel).
    1. gldickens3's Avatar
      gldickens3 -
      Thanks for the article, however, when I implemented your solution then KDE's enhanced desktop effects quit working. The command, "glxinfo2 | grep OpenGL" showed that I was running my nVidia discrete graphics card, however, I can't get enhanced effects, such as wobbly windows, etc. to work. Any suggestions?