[SOLVED]Run with NVIDIA GPU doesn't work and screen tearing

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Th33
Level 1
Level 1
Posts: 5
Joined: Mon Aug 03, 2020 8:46 pm

[SOLVED]Run with NVIDIA GPU doesn't work and screen tearing

Post by Th33 »

If i right click on an app and select "run with nvidia gpu" , the app runs with intel integreted gpu ,when NVIDIA On-Demand profile is activated .
If I switch to NVIDIA performance mode the gpu works but screen tearing occurs.
I am new to linux .
Here are some information (these are collected in NVIDIA On-Demand mode ) :


Code: Select all

ls /lib/modprobe.d/

aliases.conf                           nvidia-graphics-drivers.conf
blacklist_linux_5.4.0-26-generic.conf  nvidia-kms.conf
fbdev-blacklist.conf                   systemd.conf

Code: Select all

lspci -nnk | grep -EA3 "3D|VGA"

00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)
	Subsystem: Lenovo 3rd Gen Core processor Graphics Controller [17aa:21f5]
	Kernel driver in use: i915
	Kernel modules: i915
--
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107GLM [Quadro K1000M] [10de:0ffc] (rev a1)
	Subsystem: Lenovo GK107GLM [Quadro K1000M] [17aa:21f5]
	Kernel driver in use: nvidia
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

Code: Select all

mokutil --sb-state

bash: mokutil: command not found

Code: Select all

xdpkg -l | grep -i nvidia

ii  libnvidia-cfg1-418-server:amd64            418.152.00-0ubuntu0.20.04.1         amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-418-server                418.152.00-0ubuntu0.20.04.1         all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-418-server:amd64         418.152.00-0ubuntu0.20.04.1         amd64        NVIDIA libcompute package
ii  libnvidia-decode-418-server:amd64          418.152.00-0ubuntu0.20.04.1         amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-418-server:amd64          418.152.00-0ubuntu0.20.04.1         amd64        NVENC Video Encoding runtime library
ii  libnvidia-fbc1-418-server:amd64            418.152.00-0ubuntu0.20.04.1         amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-418-server:amd64              418.152.00-0ubuntu0.20.04.1         amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-418-server:amd64            418.152.00-0ubuntu0.20.04.1         amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  nvidia-compute-utils-418-server            418.152.00-0ubuntu0.20.04.1         amd64        NVIDIA compute utilities
ii  nvidia-dkms-418-server                     418.152.00-0ubuntu0.20.04.1         amd64        NVIDIA DKMS package
ii  nvidia-driver-418-server                   418.152.00-0ubuntu0.20.04.1         amd64        NVIDIA Server Driver metapackage
ii  nvidia-kernel-common-418-server            418.152.00-0ubuntu0.20.04.1         amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-418-server            418.152.00-0ubuntu0.20.04.1         amd64        NVIDIA kernel source package
ii  nvidia-prime                               0.8.14                              all          Tools to enable NVIDIA's Prime
ii  nvidia-prime-applet                        1.2.1                               all          An applet for NVIDIA Prime
ii  nvidia-settings                            440.82-0ubuntu0.20.04.1             amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-418-server                    418.152.00-0ubuntu0.20.04.1         amd64        NVIDIA Server Driver support binaries
ii  screen-resolution-extra                    0.18build1                          all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-418-server       418.152.00-0ubuntu0.20.04.1         amd64        NVIDIA binary Xorg driver

Code: Select all

System:
  Kernel: 5.4.0-26-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
  Desktop: Cinnamon 4.6.6 wm: muffin 4.6.2 dm: LightDM 1.30.0 
  Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: LENOVO product: 2447AV8 v: ThinkPad W530 
  serial: <filter> Chassis: type: 10 serial: <filter> 
  Mobo: LENOVO model: 2447AV8 serial: <filter> UEFI [Legacy]: LENOVO 
  v: G5ET64WW (2.06 ) date: 10/25/2012 
Battery:
  ID-1: BAT0 charge: 43.2 Wh condition: 43.5/47.5 Wh (92%) volts: 12.4/10.8 
  model: SANYO 45N1001 type: Li-ion serial: <filter> status: Unknown 
CPU:
  Topology: Quad Core model: Intel Core i7-3720QM bits: 64 type: MT MCP 
  arch: Ivy Bridge rev: 9 L2 cache: 6144 KiB 
  flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 41503 
  Speed: 1311 MHz min/max: 1200/3600 MHz Core speeds (MHz): 1: 1198 2: 1197 
  3: 1198 4: 1199 5: 1198 6: 1199 7: 1198 8: 1199 
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Lenovo 
  driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0166 
  Device-2: NVIDIA GK107GLM [Quadro K1000M] vendor: Lenovo driver: nvidia 
  v: 418.152.00 bus ID: 01:00.0 chip ID: 10de:0ffc 
  Display: x11 server: X.Org 1.20.8 driver: modesetting,nouveau,nvidia 
  unloaded: fbdev,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2) 
  v: 4.2 Mesa 20.0.4 compat-v: 3.0 direct render: Yes 
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Lenovo 
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:1e20 
  Sound Server: ALSA v: k5.4.0-26-generic 
Network:
  Device-1: Intel 82579LM Gigabit Network vendor: Lenovo driver: e1000e 
  v: 3.2.6-k port: 6080 bus ID: 00:19.0 chip ID: 8086:1502 
  IF: enp0s25 state: down mac: <filter> 
  Device-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi 
  v: kernel port: 5000 bus ID: 03:00.0 chip ID: 8086:0085 
  IF: wlp3s0 state: up mac: <filter> 
Drives:
  Local Storage: total: 465.76 GiB used: 26.19 GiB (5.6%) 
  ID-1: /dev/sda vendor: HGST (Hitachi) model: HTS545050A7E380 
  size: 465.76 GiB speed: 3.0 Gb/s rotation: 5400 rpm serial: <filter> 
  rev: AC90 scheme: MBR 
Partition:
  ID-1: / size: 37.30 GiB used: 8.46 GiB (22.7%) fs: ext4 dev: /dev/sda5 
  ID-2: /home size: 82.31 GiB used: 17.73 GiB (21.5%) fs: ext4 
  dev: /dev/sda7 
  ID-3: swap-1 size: 5.72 GiB used: 5.2 MiB (0.1%) fs: swap dev: /dev/sda6 
Sensors:
  System Temperatures: cpu: 47.0 C mobo: 0.0 C 
  Fan Speeds (RPM): cpu: 2710 


Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Run with NVIDIA GPU doesn't work and screen tearing

Post by roblm »

The Nvidia On-Demand feature needs the Nvidia-435 or higher driver series, which don’t support your GPU.

For the tearing problem, use this command to open the nvidia-kms.conf file:
xed admin:///lib/modprobe.d/nvidia-kms.conf

The value of this line should be 1, not 0: options nvidia-kms modeset=1

CORRECTION: that should be nvidia-drm, not nvidia-kms

If you need to change the value, then update the initial ramdisk when done and reboot:
sudo update-initramfs -u
Last edited by roblm on Mon Sep 07, 2020 8:04 am, edited 1 time in total.
Th33
Level 1
Level 1
Posts: 5
Joined: Mon Aug 03, 2020 8:46 pm

Re: Run with NVIDIA GPU doesn't work and screen tearing

Post by Th33 »

roblm wrote: Thu Aug 13, 2020 4:08 pm The Nvidia On-Demand feature needs the Nvidia-435 or higher driver series, which don’t support your GPU.

For the tearing problem, use this command to open the nvidia-kms.conf file:
xed admin:///lib/modprobe.d/nvidia-kms.conf

The value of this line should be 1, not 0: options nvidia-kms modeset=1

If you need to change the value, then update the initial ramdisk when done and reboot:
sudo update-initramfs -u
Thanks a lot !!!
Screen tearing gone .

If you have enough time then :
Please Answer:

QUESTION 1:
How should I actually upgrade ?
Two days ago,
The recommended graphics driver was 418 , but when i upgraded all(after installing linux mint , first time I upgraded using update manager and installed language pack)
the tray icon(maybe it's called nvidia prime applet) disappeared .
also , recommended driver was no more nvidia 418 , it was nvidia 390 .After that I changed it to nvidia 390 ,(thinking it might solve the problem but failed), and again downgraded to nvidia 340 . the problem wasn't solved , so i removed graphics driver with sudo apt-get autoremove nvidia-* --purge
rebooted --- Driver Manager was showing I don't need any driver !!!

Then I restored system using timeshift snapshot ,"shifted time" by two days :) and posted here and followed your instruction .
Today , I upgraded a few apps and driver manager is not showing the nvidia 418 as the recommended driver , it is now at the last of the list . Run "ubuntu-drivers devices" , nvidia 390 again the recommended driver. But the driver is working.
So how should I upgrade apps? and why these happens ?



QUESTION 2:
Should I use Bumblee to be able to run an app with nvidia gpu ?

Edit : External monitor also didn't work before . As i don't need it i didn't mention it in the post , Now it also works !
Last edited by Th33 on Sat Aug 15, 2020 5:53 am, edited 2 times in total.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Run with NVIDIA GPU doesn't work and screen tearing

Post by roblm »

The recommended driver is always the highest driver version available for your GPU but not always the best driver to use. I’m not exactly sure what the 418 driver is for. The Synaptic Package Manager says it is a transitional driver for 430, and 430 is transitional for 440. On Nvidia’s website, the last driver release for 418 and 430 was on 11-5-19. The legacy driver for older GPUs is 390. It will continue to receive updates to support newer Linux kernels and X Servers till the end of 2022, so that is the driver you should stay with.

I would not use Bumblebee instead of nvidia-prime. It has not seen any development since Mint 17 and some users have added workarounds to try keeping it working, and even with this, every feature does not work. It is more difficult to set up and get working, and it’s more difficult to get externally connected monitors to work correctly.
User avatar
SMG
Level 25
Level 25
Posts: 31815
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Run with NVIDIA GPU doesn't work and screen tearing

Post by SMG »

Th33 wrote: Fri Aug 14, 2020 12:32 amTwo days ago,
The recommended graphics driver was 418 , but when i upgraded all(after installing linux mint , first time I upgraded using update manager and installed language pack)
the tray icon(maybe it's called nvidia prime applet) disappeared .
It disappeared because one of the packages updated was nvidia-prime-applet. The applet now checks to see what nvidia driver is being used. As mentioned above by roblm, the On-Demand feature needs at least the 435 driver to work. If the install does not meet that requirement then that functionality is not available.

Note: There is a missing dependency in the 1.2.2 version of nvidia-prime-applet and right now it does not show for anyone and produces an error. The code is currently being revised to correct that.

Edited to correct my statement about the functionality of the applet for those without at least a 435 card.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Th33
Level 1
Level 1
Posts: 5
Joined: Mon Aug 03, 2020 8:46 pm

Re: Run with NVIDIA GPU doesn't work and screen tearing

Post by Th33 »

Th33 wrote: Fri Aug 14, 2020 12:32 am so i removed graphics driver with sudo apt-get autoremove nvidia-* --purge
rebooted --- Driver Manager was showing I don't need any driver !!!
Would you please tell me why this happens ?
User avatar
SMG
Level 25
Level 25
Posts: 31815
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Run with NVIDIA GPU doesn't work and screen tearing

Post by SMG »

Th33 wrote: Sat Aug 15, 2020 5:28 am
Th33 wrote: Fri Aug 14, 2020 12:32 am so i removed graphics driver with sudo apt-get autoremove nvidia-* --purge
rebooted --- Driver Manager was showing I don't need any driver !!!
Would you please tell me why this happens ?
I'm not sure I am understanding exactly what you did and when, but the information you posted shows the 418 driver is installed:
Device-2: NVIDIA GK107GLM [Quadro K1000M] vendor: Lenovo driver: nvidia v: 418.152.00 bus ID: 01:00.0 chip ID: 10de:0ffc
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Th33
Level 1
Level 1
Posts: 5
Joined: Mon Aug 03, 2020 8:46 pm

Re: [SOLVED]Run with NVIDIA GPU doesn't work and screen tearing

Post by Th33 »

SMG wrote: Sat Aug 15, 2020 10:59 am I'm not sure I am understanding exactly what you did and when, but the information you posted shows the 418 driver is installed:
Device-2: NVIDIA GK107GLM [Quadro K1000M] vendor: Lenovo driver: nvidia v: 418.152.00 bus ID: 01:00.0 chip ID: 10de:0ffc
All these informations were collected after going back to previous condition with timeshift.


Ok,
Thank you for your co operation .
Locked

Return to “Graphics Cards & Monitors”