I have installed steam on Ubuntu 20.04.5 and I'd like to use only the dedicated GPU in games, not the UHD Graphics 620. The games that I try, such as Tropico 6, keep the Intel UHD GPU as main.
I see the NVIDIA GPU on the info of the OS, but there are some problems running some commands (like nvidia-settings
or nvidia-xconfig
).
$ lshw -short | grep -i display WARNING: you should run this program as super-user. WARNING: output may be incomplete or inaccurate, you should run this program as super-user. /0/100/2
display UHD Graphics 620 (Whiskey Lake) /0/100/1c.4/0
display GP108M [GeForce MX150]
$ lspci -nn | grep -E 'VGA|Display' 00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 (Whiskey Lake) [8086:3ea0]
This command does nothing:
$ sudo nvidia-xconfig
WARNING: Unable to locate/open X configuration file.
Package xorg-server was not found in the pkg-config search path. Perhaps you should add the directory containing `xorg-server.pc' to the PKG_CONFIG_PATH environment variable No package 'xorg-server' found New X configuration file written to '/etc/X11/xorg.conf'
Using sudo nvidia-settings
I get the error bellow:
(nvidia-settings:4655): GLib-GObject-CRITICAL **: 11:28:24.506: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
ERROR: nvidia-settings could not find the registry key file or the X server is not accessible. This file should have been installed along with this driver at /usr/share/nvidia/nvidia-application-profiles-key-documentation. The application profiles will continue to work, but values cannot be prepopulated or validated, and will not be listed in the help text. Please see the README for possible values and descriptions.
Here are screenshots of the OS info and the driver I use:
What can I do?