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.
- Add an entry to the Session manager in KDM:
kwrite kde-primusrun.desktop
Paste this in the empty file
[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=/usr/local/bin/primus-kde
TryExec=/usr/local/bin/primus-kde
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.
- Create a file that will do the actual start of the KDE session:
kwrite primus-kde
put these lines in it
#!/bin/bash
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/
- Switching to the new session
Logout
In the KDE login screen (KDM), select “KDE HDMI Enabled” as your session
Login
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: