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:
Code:
kwrite kde-primusrun.desktop
Code:
[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
Code:
chmod a+x kde-primusrun.desktop && sudo cp kde-primusrun.desktop /usr/share/xsessions/
2. Create a file that will do the actual start of the KDE session:
Code:
kwrite primus-kde
Code:
#!/bin/bash vblank_mode=0 /usr/bin/primusrun /usr/bin/startkde
Code:
chmod a+x primus-kde && sudo mv primus-kde /usr/local/bin/
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
Code:
glxinfo2 | grep OpenGL
Code:
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:
Message