How to switch to NVIDIA graphics card?[SOLVED]

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Ziad AbdelAziz

How to switch to NVIDIA graphics card?[SOLVED]

Post by Ziad AbdelAziz »

I'm new here with no experience with linux and I looked at many forums and used many commands that I don't really understand but didn't achieve what I want
I want to switch to NVIDIA graphics card instead of intel
This is the result of i

Code: Select all

nxi -Gx

Code: Select all

Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Lenovo driver: i915 v: kernel 
  bus ID: 00:02.0 
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] driver: nvidia 
  v: 470.57.02 bus ID: 02:00.0 
  Display: x11 server: X.Org 1.20.9 driver: modesetting,nvidia 
  unloaded: fbdev,nouveau,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (WHL GT2) v: 4.6 Mesa 20.2.6 
  direct render: Yes 
And I tried these commands but it didn't work at last

Code: Select all

xrandr --listproviders
result:

Code: Select all

Providers: number : 2
Provider 0: id: 0x43 cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 1 associated providers: 1 name:modesetting
Provider 1: id: 0x228 cap: 0x2, Sink Output crtcs: 4 outputs: 1 associated providers: 1 name:NVIDIA-G0
then this

Code: Select all

xrandr --setprovideroffloadsink 0x228 0x43
result:

Code: Select all

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  34 (RRSetProviderOffloadSink)
  Value in failed request:  0x228
  Serial number of failed request:  16
  Current serial number in output stream:  17
Can any one help me, please?
Last edited by SMG on Sat Oct 22, 2022 10:59 pm, edited 2 times in total.
Reason: Locking old, solved topic.
Moonstone Man
Level 16
Level 16
Posts: 6010
Joined: Mon Aug 27, 2012 10:17 pm

Re: How to switch to NVIDIA graphics card?

Post by Moonstone Man »

Ziad AbdelAziz wrote: Mon Aug 16, 2021 3:38 am I want to switch to NVIDIA graphics card instead of intel

Code: Select all

  Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] driver: nvidia 
Hi, and welcome, Ziad.

In nVidia settings, down at the bottom left of the settings screen, you should have an option to select a PRIME profile. That's what you need. If you can't find anything to do with prime then you need to tell us how you installed the driver.
Ziad AbdelAziz

Re: How to switch to NVIDIA graphics card?

Post by Ziad AbdelAziz »

Do you mean the screen that pops up after writing this command ?

Code: Select all

nvidia-settings

It gave me a screen that doesn't contain prime and an error in the terminal:

Code: Select all

(nvidia-settings:28246): GLib-GObject-CRITICAL **: 10:29:01.091: 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.

** Message: 10:29:01.132: PRIME: No offloading required. Abort
** Message: 10:29:01.132: PRIME: is it supported? no
Actually I remember that I walked through some steps to install the driver, but I can't remember any of it right now because I did it long time ago and I gave up then

The last thing I did yesterday related to the drive that was opening the driver manager and choosing the recommended driver

I can go back in command line history and get all the commands that is related to nvidia if that will help

I'm sorry if my answer wasn't related to your question or wasn't really helpful because I don't really understand all of these stuff
I hope you help me getting this problem fixed
Moonstone Man
Level 16
Level 16
Posts: 6010
Joined: Mon Aug 27, 2012 10:17 pm

Re: How to switch to NVIDIA graphics card?

Post by Moonstone Man »

Ziad AbdelAziz wrote: Mon Aug 16, 2021 5:08 am I hope you help me getting this problem fixed
Don't run it from the command line. Just start typing nvidia into the Mint menu and start the GUI that way.
Ziad AbdelAziz

Re: How to switch to NVIDIA graphics card?

Post by Ziad AbdelAziz »

It gave me the same screen with nothing at the bottom left
Moonstone Man
Level 16
Level 16
Posts: 6010
Joined: Mon Aug 27, 2012 10:17 pm

Re: How to switch to NVIDIA graphics card?

Post by Moonstone Man »

Ziad AbdelAziz wrote: Mon Aug 16, 2021 5:36 am It gave me the same screen with nothing at the bottom left
Ok, we're going to have to clean nVidia out, but first run these two commands and post the complete output in code tags:

inxi -Fxxxrz

and...

mokutil --sb-state
Ziad AbdelAziz

Re: How to switch to NVIDIA graphics card?

Post by Ziad AbdelAziz »

Here they are

Code: Select all

System:
  Kernel: 5.4.0-80-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
  Desktop: Cinnamon 5.0.5 wm: muffin 5.0.1 dm: LightDM 1.30.0 
  Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: LENOVO product: 81SW v: Lenovo IdeaPad S540-15IWL GTX 
  serial: <filter> Chassis: type: 10 v: Lenovo IdeaPad S540-15IWL GTX 
  serial: <filter> 
  Mobo: LENOVO model: LNVNB161216 v: No DPK serial: <filter> UEFI: LENOVO 
  v: BWCN14WW date: 11/27/2019 
Battery:
  ID-1: BAT0 charge: 47.5 Wh condition: 51.8/52.5 Wh (99%) volts: 12.8/11.3 
  model: LGC L18L3PF6 type: Li-ion serial: <filter> status: Charging 
  cycles: 1 
CPU:
  Topology: Quad Core model: Intel Core i5-8265U bits: 64 type: MT MCP 
  arch: Kaby Lake rev: C L2 cache: 6144 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 28800 
  Speed: 700 MHz min/max: 400/3900 MHz Core speeds (MHz): 1: 700 2: 700 
  3: 700 4: 700 5: 700 6: 700 7: 700 8: 700 
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Lenovo driver: i915 v: kernel 
  bus ID: 00:02.0 chip ID: 8086:3ea0 
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] driver: nvidia 
  v: 470.57.02 bus ID: 02:00.0 chip ID: 10de:1f91 
  Display: x11 server: X.Org 1.20.9 driver: modesetting,nvidia 
  unloaded: fbdev,nouveau,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (WHL GT2) v: 4.6 Mesa 20.2.6 
  direct render: Yes 
Audio:
  Device-1: Intel Cannon Point-LP High Definition Audio vendor: Lenovo 
  driver: snd_hda_intel v: kernel bus ID: 00:1f.3 chip ID: 8086:9dc8 
  Device-2: NVIDIA vendor: Lenovo driver: snd_hda_intel v: kernel 
  bus ID: 02:00.1 chip ID: 10de:10fa 
  Sound Server: ALSA v: k5.4.0-80-generic 
Network:
  Device-1: Intel Cannon Point-LP CNVi [Wireless-AC] driver: iwlwifi 
  v: kernel port: 4000 bus ID: 00:14.3 chip ID: 8086:9df0 
  IF: wlp0s20f3 state: up mac: <filter> 
Drives:
  Local Storage: total: 1.03 TiB used: 152.37 GiB (14.5%) 
  ID-1: /dev/nvme0n1 vendor: Lenovo O.E.M. model: RPFTJ128PDD2EWX 
  size: 119.24 GiB speed: 15.8 Gb/s lanes: 2 serial: <filter> rev: 11.9 
  scheme: GPT 
  ID-2: /dev/sda vendor: Seagate model: ST1000LM035-1RK172 size: 931.51 GiB 
  speed: 3.0 Gb/s rotation: 5400 rpm serial: <filter> rev: LFM1 scheme: MBR 
Partition:
  ID-1: / size: 116.38 GiB used: 100.55 GiB (86.4%) fs: ext4 
  dev: /dev/nvme0n1p2 
Sensors:
  System Temperatures: cpu: 44.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/bartbes-love-stable-focal.list 
  1: deb http://ppa.launchpad.net/bartbes/love-stable/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 
  1: deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/graphics-drivers-ppa-focal.list 
  1: deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/inkscape_dev-stable-focal.list 
  1: deb http://ppa.launchpad.net/inkscape.dev/stable/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/nilarimogard-webupd8-focal.list 
  1: deb http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/nodesource.list 
  1: deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x focal main
  2: deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x focal main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://packages.linuxmint.com uma main upstream import backport #id:linuxmint_main
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
  Active apt repos in: /etc/apt/sources.list.d/steam.list 
  1: deb [arch=amd64,i386] https://repo.steampowered.com/steam/ stable steam
  2: deb-src [arch=amd64,i386] https://repo.steampowered.com/steam/ stable steam
  Active apt repos in: /etc/apt/sources.list.d/teams.list 
  1: deb [arch=amd64] https://packages.microsoft.com/repos/ms-teams stable main
  Active apt repos in: /etc/apt/sources.list.d/vscode.list 
  1: deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
  Active apt repos in: /etc/apt/sources.list.d/windscribe-repo.list 
  1: deb https://repo.windscribe.com/ubuntu bionic main
Info:
  Processes: 413 Uptime: 3h 37m Memory: 11.46 GiB used: 4.28 GiB (37.4%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 7/9 
  Shell: bash v: 5.0.17 running in: gnome-terminal inxi: 3.0.38

Code: Select all

SecureBoot disabled
Platform is in Setup Mode
Moonstone Man
Level 16
Level 16
Posts: 6010
Joined: Mon Aug 27, 2012 10:17 pm

Re: How to switch to NVIDIA graphics card?

Post by Moonstone Man »

Ziad AbdelAziz wrote: Mon Aug 16, 2021 6:41 am Here they are
Thanks. There's nothing there of concern so the next step is:

Purge the current installation with sudo apt remove --purge *nvidia* in a terminal.

Next, go here: https://www.linuxmint.com/rel_ulyana_cinnamon.php

See the section titled, Solving freezes during the boot sequence

You need to start at the line that reads, "After the installation..." to boot with the nomodeset option. You should also play the video. This will require you to reboot to get to the grub menu.
Ziad AbdelAziz

Re: How to switch to NVIDIA graphics card?

Post by Ziad AbdelAziz »

I've done it and rebooted with no problem
Moonstone Man
Level 16
Level 16
Posts: 6010
Joined: Mon Aug 27, 2012 10:17 pm

Re: How to switch to NVIDIA graphics card?

Post by Moonstone Man »

Ziad AbdelAziz wrote: Mon Aug 16, 2021 7:24 am I've done it and rebooted with no problem
And? Are you now able to select a PRIME profile to engage the nVidia card?
Ziad AbdelAziz

Re: How to switch to NVIDIA graphics card?

Post by Ziad AbdelAziz »

unfortunately no
Moonstone Man
Level 16
Level 16
Posts: 6010
Joined: Mon Aug 27, 2012 10:17 pm

Re: How to switch to NVIDIA graphics card?

Post by Moonstone Man »

Ziad AbdelAziz wrote: Mon Aug 16, 2021 7:29 am unfortunately no
What do you see when you open nvidia settings? Can you upload a cut-down image of the settings GUI, please?
Ziad AbdelAziz

Re: How to switch to NVIDIA graphics card?

Post by Ziad AbdelAziz »

Kadaitcha Man wrote: Mon Aug 16, 2021 7:30 am
Ziad AbdelAziz wrote: Mon Aug 16, 2021 7:29 am unfortunately no
What do you see when you open nvidia settings? Can you upload a cut-down image of the settings GUI, please?
nVidia settings.png
Here it is
User avatar
SMG
Level 25
Level 25
Posts: 36008
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: How to switch to NVIDIA graphics card?

Post by SMG »

Ziad AbdelAziz wrote: Mon Aug 16, 2021 3:38 amI want to switch to NVIDIA graphics card instead of intel
A normal install of Linux Mint on a laptop with Intel and Nvidia graphics installs the nvidia-prime-applet in your panel so you can easily switch between Intel, On-Demand, and Nvidia modes.

I do not know if you originally had that applet installed and did not realize that, or if something happened and it did not install properly. However, since you ran sudo apt remove --purge *nvidia* that applet was removed from your system.

To install it again, open a terminal and run sudo apt-get install nvidia-prime-applet. Then go to New features in Linux Mint 20 Cinnamon and scroll to the section on "NVIDIA Optimus" to see a screenshot of the applet (Intel logo in that screenshot) expanded to show the options. Let us know if that applet appears on your panel after you re-install it.
Ziad AbdelAziz wrote: Mon Aug 16, 2021 3:38 am

Code: Select all

Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Lenovo driver: i915 v: kernel 
  bus ID: 00:02.0 
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] driver: nvidia 
  v: 470.57.02 bus ID: 02:00.0 
  Display: x11 server: X.Org 1.20.9 driver: modesetting,nvidia 
  unloaded: fbdev,nouveau,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (WHL GT2) v: 4.6 Mesa 20.2.6 
  direct render: Yes 
This output is what is usually seen when running "On-Demand" mode which means the system mostly uses Intel, but can also use Nvidia.

The inxi data you posted indicates you are not running the latest versions of X.Org. Open Update Manager and make sure to update all the files. If you are missing the latest X.Org, you may be missing other updates as well.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Moonstone Man
Level 16
Level 16
Posts: 6010
Joined: Mon Aug 27, 2012 10:17 pm

Re: How to switch to NVIDIA graphics card?

Post by Moonstone Man »

SMG wrote: Mon Aug 16, 2021 3:14 pm To install it again ...
Thanks for jumping in. It's appreciated. It was late here and I had to get my beauty sleep.
Ziad AbdelAziz

Re: How to switch to NVIDIA graphics card?

Post by Ziad AbdelAziz »

Than you Kadaitcha Man and SMG for your help, I had a good support here

I wasn't able to access my laptop for a while, I'm sorry for that
SMG wrote: Mon Aug 16, 2021 3:14 pm Let us know if that applet appears on your panel after you re-install it.
I ran the command line and it didn't appear at first but it appeared after reboot
SMG wrote: Mon Aug 16, 2021 3:14 pm The inxi data you posted indicates you are not running the latest versions of X.Org. Open Update Manager and make sure to update all the files. If you are missing the latest X.Org, you may be missing other updates as well.
Done, I updated all the files
I ran this command line

Code: Select all

dpkg -l |grep xserver-xorg-core
and this is the version of xorg on my laptop right now

Code: Select all

ii  xserver-xorg-core                          2:1.20.11-1ubuntu1~20.04.2                  amd64        Xorg X server - core server
User avatar
SMG
Level 25
Level 25
Posts: 36008
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: How to switch to NVIDIA graphics card?

Post by SMG »

Ziad AbdelAziz wrote: Tue Aug 17, 2021 11:07 am
SMG wrote: Mon Aug 16, 2021 3:14 pm Let us know if that applet appears on your panel after you re-install it.
I ran the command line and it didn't appear at first but it appeared after reboot
And does it show you the options of Intel, On-Demand, and Nvidia Performance modes? Can you switch to Performance Mode and then reboot and have the Nvidia gpu in use? (You can check which card is rendering by running inxi -Gx.)
Ziad AbdelAziz wrote: Tue Aug 17, 2021 11:07 amand this is the version of xorg on my laptop right now

Code: Select all

ii  xserver-xorg-core                          2:1.20.11-1ubuntu1~20.04.2                  amd64        Xorg X server - core server
That is the latest one.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Ziad AbdelAziz

Re: How to switch to NVIDIA graphics card?

Post by Ziad AbdelAziz »

SMG wrote: Tue Aug 17, 2021 2:48 pm And does it show you the options of Intel, On-Demand, and Nvidia Performance modes? Can you switch to Performance Mode and then reboot and have the Nvidia gpu in use? (You can check which card is rendering by running inxi -Gx.)
Performance Mode was the default
nvidia prime.jpeg
I used

Code: Select all

inxi -Gx
command and this was the result:

Code: Select all

Graphics:
  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel 
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] driver: nvidia 
  v: 470.57.02 
  Display: x11 server: X.Org 1.20.11 driver: modesetting,nvidia 
  unloaded: fbdev,nouveau,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (WHL GT2) v: 4.6 Mesa 21.0.3 
I tried to switch to On-Demand Mode and switch back to Performance Mode but the result was the same
User avatar
SMG
Level 25
Level 25
Posts: 36008
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: How to switch to NVIDIA graphics card?

Post by SMG »

Ziad AbdelAziz wrote: Tue Aug 17, 2021 3:37 pmI tried to switch to On-Demand Mode and switch back to Performance Mode but the result was the same
The person in this thread 2nd monitor not recognized is running into the exact same situation where Performance Mode is not rendering with Nvidia.

Use this command in a terminal to upload the X Server log file to termbin:
cat /var/log/Xorg.0.log | nc termbin.com 9999
It will return with a url address that you should post in your next reply. I'm hoping there might be some errors or messages which indicate what is happening.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Ziad AbdelAziz

Re: How to switch to NVIDIA graphics card?

Post by Ziad AbdelAziz »

I ran the command and here is the url:
https://termbin.com/by4bq
Locked

Return to “Beginner Questions”