GPU Select

Balance performance and battery life

Select GPU to meet your needs. Use the Nvidia GPU to drive maximum performance and support three 4K external monitors. Use the Intel GPU to maximize battery life.

Please read the disclaimer before proceeding. This solution is updated regularly. If you have suggestions or requests, please share your thoughts on the Guided Solution Authorship Form.

Use System Tray Widget

Use System Tray Widget

Click on the System Tray GPU widget to change to your preferred GPU. One may also launch Nvidia-Settings from this interface. This is the simplest way to move between graphics modes. This is available only in 20.04 LTS.

We recommend selecting Nvidia (Performance Mode) or Intel (Power Saving). We do not recommend using Nvidia On-Demand unless you are using the GPU for CUDA, OPTIX, or other GPGPU purposes. The reasons are discussed below.

Check GPU

Check GPU

Nvidia SettingsThe Nvidia Max-Q RTX GPU is needed for demanding tasks such as deep learning, video editing, or gaming. However, if you aren't using those capabilities, switching to the integrated graphics can extend battery life up to 4.5(M1) to 6.5(M2) hours in the real-world.

When the power cable is unplugged the system takes actions to conserve power and extend battery life. The most obvious actions — all of which are Kubuntu Focus optimizations — include:

Use Nvidia Settings

Use Nvidia Settings

Nvidia SettingsStart Nvidia Settings. Click on Prime Profiles at the bottom right corner. Select the preferred GPU. Provide your password when prompted.

Preferred GPUAuthorizeSelect Leave

One should reboot immediately after switching graphics to avoid artifacts and glitches. Right-click on the desktop and select Leave... and then select reboot.

Using On-Demand Mode

We do not recommend using Nvidia On-Demand mode in most circumstances; it keeps both the dGPU and iGPU running and can use significantly more power than Intel Mode alone even when idle. For this reason, we suggest using Intel Mode to conserve power and Nvidia Performance Mode otherwise. The one exception is when you are using the GPU for CUDA, OPTIX, or other compute purposes. In this case, switching to on-demand can provide additional VRAM for those jobs. Just remember to switch back when you are done.

When in Nvidia On-Demand mode, if you wish to launch an app using the Nvidia GPU and Vulkan:

# __NV_PRIME_RENDER_OFFLOAD=1 %appname% # Example: __NV_PRIME_RENDER_OFFLOAD=1 vkcube

When in Nvidia On-Demand mode, if you wish to launch an app using the Nvidia GPU and OpenGL:

# __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %appname% # Example sudo apt-get install mesa-utils # Get glxgears __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears

Use Command-line

Konsole TerminalThis is much faster using a GUI and completely replaces the above procedure. Reboot if you change modes to avoid glitches.

prime-select query # Shows 'nvidia' or 'intel' prime-select intel # Select Intel (Power Saving) prime-select nvidia # Select Nvidia (Performance Mode) sudo reboot # Do this if you have changed the mode

Troubleshooting

Q: This seems related to battery life. Where can I learn more?

A: See Battery Management to learn more.

Q: I booted my Kubuntu Focus and it never got past the splash screen. How do I fix this?

A: Nvidia Settings and other applications may ask you to save an xorg.conf file. Doing so may disable your internal display from functioning with a GUI upon logout or restart, and you will not be able to sign-in. If this happens, we recommend you remove this file:

You should now be able to sign-in as usual.

Q: Recently with external monitors the display is slow. What could be happening?

A: This commonly happens to Deep Learning scientist who have set Nvidia On-Demand Mode to maximize VRAM availability for compute jobs. Switch back to Nvidia Performance Mode as shown above to fix this condition.

Revisions

This is a partial revision history. See the git repository for all entries.

Disclaimer

We try hard to provide a useful solution validated by professionals. However, we cannot anticipate every situation, and therefore cannot guarantee this procedure will work for your needs. Always backup your data and test the solution to determine the correct procedure for you.

THIS SOLUTION IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOLUTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

KFocus Logo