NVIDIA 340 graphics card driver has no OpenGL support

Forum rules
Before you post please read this
Post Reply
User avatar
javadude13
Level 1
Level 1
Posts: 17
Joined: Thu Jan 07, 2021 8:12 pm

NVIDIA 340 graphics card driver has no OpenGL support

Post by javadude13 »

I am running Linux Mint 20.1 XFCE with an NVIDIA graphics card.

I have been running the card on the open-source nouveau driver and have experienced regular crashing.
I switched to the NVIDIA 340 version 108-0ubuntu5.20.04.2 and am now getting no OpenGL support.

this is the output from inxi -GS

Code: Select all

System:
  Host: Cecilia Kernel: 5.4.0-65-generic x86_64 bits: 64 
  Desktop: Xfce 4.14.2 Distro: Linux Mint 20.1 Ulyssa 
Graphics:
  Device-1: NVIDIA C77 [GeForce 8200] driver: nouveau v: kernel 
  Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
  resolution: 1600x900~60Hz 
  OpenGL: renderer: N/A v: N/A 
You might notice that it's still seems to be using the nouveau driver Device-1: NVIDIA C77 [GeForce 8200] driver: nouveau v: kernel
I have however opened the driver manager and that says that it is running on the NVIDIA driver.
Screenshot_2021-06-10_11-31-23.png
Is this normal for this driver? will I just have to live with it?
My goal would be to get OpenGL up and running as program in java and use a library that requires it.

Any help is appreciated. Thank you!
User avatar
roblm
Level 14
Level 14
Posts: 5202
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA 340 graphics card driver has no OpenGL support

Post by roblm »

Use this command in the Terminal to get more info:

Code: Select all

lspci -nnk | grep -EA3 "3D|VGA"; echo +; ls /lib/modprobe.d/; echo +; dpkg -l | grep nvidia; echo +; mokutil --sb-state
In the Menu at the top, select Edit > Select All and then Edit > Copy

Open the Mint Forum reply window and select </> at the top. Press Ctrl+V to paste the copied lines into a code display window.
User avatar
javadude13
Level 1
Level 1
Posts: 17
Joined: Thu Jan 07, 2021 8:12 pm

Re: NVIDIA 340 graphics card driver has no OpenGL support

Post by javadude13 »

I entered that command into the terminal and got this.

Code: Select all

nolan@Cecilia:~$ lspci -nnk | grep -EA3 "3D|VGA"; echo +; ls /lib/modprobe.d/; echo +; dpkg -l | grep nvidia; echo +; mokutil --sb-state
02:00.0 VGA compatible controller [0300]: NVIDIA Corporation C77 [GeForce 8200] [10de:084b] (rev a2)
	Subsystem: Acer Incorporated [ALI] C77 [GeForce 8200] [1025:0228]
	Kernel driver in use: nouveau
	Kernel modules: nvidiafb, nouveau, nvidia
+
aliases.conf                           blacklist_linux_5.4.0-74-generic.conf
blacklist_linux_5.4.0-58-generic.conf  fbdev-blacklist.conf
blacklist_linux_5.4.0-65-generic.conf  nvidia-340.conf
blacklist_linux_5.4.0-73-generic.conf  systemd.conf
+
ii  nvidia-340                                 340.108-0ubuntu5.20.04.2              amd64        NVIDIA binary driver - version 340.108
ii  nvidia-opencl-icd-340                      340.108-0ubuntu5.20.04.2              amd64        NVIDIA OpenCL ICD
ii  nvidia-settings                            460.73.01-0ubuntu0.20.04.1            amd64        Tool for configuring the NVIDIA graphics driver
ii  screen-resolution-extra                    0.18build1                            all          Extension for the nvidia-settings control panel
+

Command 'mokutil' not found, but can be installed with:

sudo apt install mokutil
I'm guessing that's not what you want so I installed mokutil with sudo apt install mokutil
After installation I ran the command again and got this.

Code: Select all

nolan@Cecilia:~$ lspci -nnk | grep -EA3 "3D|VGA"; echo +; ls /lib/modprobe.d/; echo +; dpkg -l | grep nvidia; echo +; mokutil --sb-state
02:00.0 VGA compatible controller [0300]: NVIDIA Corporation C77 [GeForce 8200] [10de:084b] (rev a2)
	Subsystem: Acer Incorporated [ALI] C77 [GeForce 8200] [1025:0228]
	Kernel driver in use: nouveau
	Kernel modules: nvidiafb, nouveau, nvidia
+
aliases.conf                           blacklist_linux_5.4.0-65-generic.conf  blacklist_linux_5.4.0-74-generic.conf  nvidia-340.conf
blacklist_linux_5.4.0-58-generic.conf  blacklist_linux_5.4.0-73-generic.conf  fbdev-blacklist.conf                   systemd.conf
+
ii  nvidia-340                                 340.108-0ubuntu5.20.04.2              amd64        NVIDIA binary driver - version 340.108
ii  nvidia-opencl-icd-340                      340.108-0ubuntu5.20.04.2              amd64        NVIDIA OpenCL ICD
ii  nvidia-settings                            460.73.01-0ubuntu0.20.04.1            amd64        Tool for configuring the NVIDIA graphics driver
ii  screen-resolution-extra                    0.18build1                            all          Extension for the nvidia-settings control panel
+
EFI variables are not supported on this system
Didn't know what to do after that as I don't really know what you're looking for
User avatar
roblm
Level 14
Level 14
Posts: 5202
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA 340 graphics card driver has no OpenGL support

Post by roblm »

Some GeForce 8 series cards can’t use the Nvidia-340 driver unless the kernel parameter pci=nomsi is used, which disables MSI (Message Signaled Interrupts).

Use this command to open the grub file: xed admin:///etc/default/grub

Change this line:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
To this:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi"
Then update grub and reboot: sudo update-grub
User avatar
javadude13
Level 1
Level 1
Posts: 17
Joined: Thu Jan 07, 2021 8:12 pm

Re: NVIDIA 340 graphics card driver has no OpenGL support

Post by javadude13 »

I did what you asked and rebooted.
The driver manager say the same as before: That the proprietary drivers are in use.

inxi -GS gives the following output though.

Code: Select all

System:    Host: Cecilia Kernel: 5.4.0-65-generic x86_64 bits: 64 Desktop: Xfce 4.14.2 Distro: Linux Mint 20.1 Ulyssa 
Graphics:  Device-1: NVIDIA C77 [GeForce 8200] driver: nouveau v: kernel 
           Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa resolution: 1600x900~60Hz 
           OpenGL: renderer: N/A v: N/A 
That seems to say that nouveau is still in use.

The output for lspci -nnk | grep -EA3 "3D|VGA"; echo +; ls /lib/modprobe.d/; echo +; dpkg -l | grep nvidia; echo +; mokutil --sb-state
seems to be the same but I'll post it anyway

Code: Select all

nolan@Cecilia:~$ lspci -nnk | grep -EA3 "3D|VGA"; echo +; ls /lib/modprobe.d/; echo +; dpkg -l | grep nvidia; echo +; mokutil --sb-state
02:00.0 VGA compatible controller [0300]: NVIDIA Corporation C77 [GeForce 8200] [10de:084b] (rev a2)
	Subsystem: Acer Incorporated [ALI] C77 [GeForce 8200] [1025:0228]
	Kernel driver in use: nouveau
	Kernel modules: nvidiafb, nouveau, nvidia
+
aliases.conf                           blacklist_linux_5.4.0-65-generic.conf  blacklist_linux_5.4.0-74-generic.conf  nvidia-340.conf
blacklist_linux_5.4.0-58-generic.conf  blacklist_linux_5.4.0-73-generic.conf  fbdev-blacklist.conf                   systemd.conf
+
ii  nvidia-340                                 340.108-0ubuntu5.20.04.2              amd64        NVIDIA binary driver - version 340.108
ii  nvidia-opencl-icd-340                      340.108-0ubuntu5.20.04.2              amd64        NVIDIA OpenCL ICD
ii  nvidia-settings                            460.73.01-0ubuntu0.20.04.1            amd64        Tool for configuring the NVIDIA graphics driver
ii  screen-resolution-extra                    0.18build1                            all          Extension for the nvidia-settings control panel
+
EFI variables are not supported on this system
Has anything changed? I just tried running a program the needs OpenGL and it still crashes.
Thank you for your help. Most forums I've used take at least a day to get answered and I appreciate the speed!

PS: I failed to mention that OpenGL did work while I was using the nouveau drivers. Which would seem to indicate that it is running the NVIDIA driver.
PPS: I also failed to tell you that this card (NVIDIA GeFource 8200) is a IGP (Integrated Graphics Processor) don't know if that wil help, but there it is.
User avatar
roblm
Level 14
Level 14
Posts: 5202
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA 340 graphics card driver has no OpenGL support

Post by roblm »

Open the nvidia-340.conf file: xed /lib/modprobe.d/nvidia-340.conf

This line should be included: blacklist nouveau

If it is, then try updating the initial ramdisk again and reboot: sudo update-initramfs -u
User avatar
javadude13
Level 1
Level 1
Posts: 17
Joined: Thu Jan 07, 2021 8:12 pm

Re: NVIDIA 340 graphics card driver has no OpenGL support

Post by javadude13 »

II opened nvidia-340.conf and this was the contents

Code: Select all

# This file was installed by nvidia-340
# Do not edit this file manually

blacklist nouveau
blacklist lbm-nouveau
alias nouveau off
alias lbm-nouveau off
The line was there so I went ahead and updated the initial ramdisk with sudo update-initramfs -u
Rebooted and the output for inxi -GS is the same.

Code: Select all

System:
  Host: Cecilia Kernel: 5.4.0-65-generic x86_64 bits: 64 
  Desktop: Xfce 4.14.2 Distro: Linux Mint 20.1 Ulyssa 
Graphics:
  Device-1: NVIDIA C77 [GeForce 8200] driver: nouveau v: kernel 
  Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
  resolution: 1600x900~60Hz 
  OpenGL: renderer: N/A v: N/A 
I don't know if the read them but the are some post scripts on the last post. They might be helpful.
User avatar
roblm
Level 14
Level 14
Posts: 5202
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA 340 graphics card driver has no OpenGL support

Post by roblm »

What is the output of lsmod | grep nouveau
User avatar
javadude13
Level 1
Level 1
Posts: 17
Joined: Thu Jan 07, 2021 8:12 pm

Re: NVIDIA 340 graphics card driver has no OpenGL support

Post by javadude13 »

This is the output from lsmod | grep nouveau

Code: Select all

nouveau              1949696  3
mxm_wmi                16384  1 nouveau
i2c_algo_bit           16384  1 nouveau
ttm                   106496  1 nouveau
drm_kms_helper        184320  1 nouveau
drm                   491520  6 drm_kms_helper,ttm,nouveau
video                  49152  1 nouveau
wmi                    32768  3 wmi_bmof,mxm_wmi,nouveau
User avatar
roblm
Level 14
Level 14
Posts: 5202
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA 340 graphics card driver has no OpenGL support

Post by roblm »

The nouveau kernel module should not be loading. There may be a problem with updating the initial ramdisk.

Open the grub file: xed admin:///etc/default/grub

Change this line:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
To this:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash modprobe.blacklist=nouveau"
Then update grub and reboot: sudo update-grub
User avatar
javadude13
Level 1
Level 1
Posts: 17
Joined: Thu Jan 07, 2021 8:12 pm

Re: NVIDIA 340 graphics card driver has no OpenGL support

Post by javadude13 »

roblm wrote:
Thu Jun 10, 2021 2:51 pm

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
You're asking me to change the same line as I changed last time. it is currently equal to.
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi" not
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

So... would you like me to set the line to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash modprobe.blacklist=nouveau" or
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi modprobe.blacklist=nouveau"
User avatar
roblm
Level 14
Level 14
Posts: 5202
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA 340 graphics card driver has no OpenGL support

Post by roblm »

Initially try the first one. If that doesn't help, then try the second.
User avatar
javadude13
Level 1
Level 1
Posts: 17
Joined: Thu Jan 07, 2021 8:12 pm

Re: NVIDIA 340 graphics card driver has no OpenGL support

Post by javadude13 »

I tried them both and the outputs remain the same.

As a side note. When I switch to the nouvaeu driver the output of inxi -GS is...

Code: Select all

System:
  Host: Cecilia Kernel: 5.4.0-65-generic x86_64 bits: 64 
  Desktop: Xfce 4.14.2 Distro: Linux Mint 20.1 Ulyssa 
Graphics:
  Device-1: NVIDIA C77 [GeForce 8200] driver: nouveau v: kernel 
  Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
  resolution: 1600x900~60Hz 
  OpenGL: renderer: NVAA v: 3.3 Mesa 20.2.6 
As opposed to when I have the NVIDIA driver selected...

Code: Select all

System:
  Host: Cecilia Kernel: 5.4.0-65-generic x86_64 bits: 64 
  Desktop: Xfce 4.14.2 Distro: Linux Mint 20.1 Ulyssa 
Graphics:
  Device-1: NVIDIA C77 [GeForce 8200] driver: nouveau v: kernel 
  Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
  resolution: 1600x900~60Hz 
  OpenGL: renderer: N/A v: N/A 
Because the nouveau does actually support openGL I would be using that but there's some sort of incompatibility with the nouveau driver and the IGP
that causes my computer to crash randomly.

but other than the openGL listing at the bottom they seem to be the same.
User avatar
roblm
Level 14
Level 14
Posts: 5202
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA 340 graphics card driver has no OpenGL support

Post by roblm »

There appears to be some problems with the operation of your Mint installation. The standard method of disabling the nouveau driver is not working and also the alternate method. Try this final method to prevent nouveau from loading by renaming the nouveau kernel module.

Move to the nouveau folder: cd /lib/modules/$(uname -r)/kernel/drivers/gpu/drm/nouveau/

Rename the kernel module: sudo mv nouveau.ko nouveau.ko-old

Reboot. If there is a problem getting back to the desktop, then press Ctrl+Alt+F1 to enter virtual console tty1. Use these commands to reverse the change and reboot:

Code: Select all

cd /lib/modules/$(uname -r)/kernel/drivers/gpu/drm/nouveau/
sudo mv nouveau.ko-old nouveau.ko; reboot
Post Reply