0

I still need further help for installing the NVIDIA driver properly for my geforce gt 730 gpu on my Ubuntu 20.04 machine, since all methods I tried have failed, I had no luck. It continues to give me this error even reverting to the ga kernel as @DanielT said:enter image description here

Davi SN
  • 17
  • Welcome to Askubuntu! If you simply need to install the proprietary drivers, have you tried sudo ubuntu-drivers autoinstall? Also, we would need to know the methods you've already tried and a description of why they failed to know what the problem is and how to determine a solution. Thanks. – mchid Mar 03 '24 at 23:21
  • @mchid The previous question is https://askubuntu.com/q/1506293/1004020 , but the question has gone outside my knowledge area – Daniel T Mar 03 '24 at 23:23
  • Related to that '-' error might be https://askubuntu.com/q/969352/1004020 . Please [edit] and copy-and-paste the output of ls /boot ; cat /var/lib/dkms/nvidia-340/340.108/build/make.log – Daniel T Mar 04 '24 at 03:49
  • 1
    Maybe my question How can the NVidia driver 390 be used with kernel 6.2 (23.04) is of some (dissatisfying) interest to you. I tried to use GT520 cards, but the last supported NVidia driver is the same. Which driver you can use depends on the kernel version. – zx485 Mar 04 '24 at 04:12
  • The screenshot does not show the GA kernel being used. – Organic Marble Mar 04 '24 at 12:14

3 Answers3

3

With the combination of Nvidia drivers and kernels available from the Ubuntu 22.04 repos, I do not think you can do it.

I have a GT 730 as well and I have not been able to get it to run the Nvidia driver other than 340 on any Ubuntu newer than 20.04 with the GA kernel (currently 5.4.0-172-generic)

If I go HWE in 20.04, I can not get it to work, nor can I get it to work in 22.04.

+------------------------------------------------------+                       
| NVIDIA-SMI 340.108    Driver Version: 340.108        |                       
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GT 730      Off  | 0000:01:00.0     N/A |                  N/A |
| 33%   27C   P12    N/A /  N/A |     43MiB /  2039MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

OS: Ubuntu 20.04.6 LTS x86_64 Host: M11AD Kernel: 5.4.0-172-generic Uptime: 6 mins Packages: 2067 (dpkg) Shell: bash 5.0.17 Terminal: /dev/pts/0 CPU: Intel Pentium G3220 (2) @ 3.000GHz GPU: NVIDIA GeForce GT 730 Memory: 246MiB / 7885MiB

This is what flashed on the screen before login when I tried the 470 driver.

enter image description here

Research by @mchid unearthed that the particular version of the card I have, namely PCI Device ID 0x0f02, is known not to work with the 470 driver; other versions may.

I would love to be proven wrong.

Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • 2
    Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on [meta], or in [chat]. Comments continuing discussion may be removed. – Thomas Ward Mar 04 '24 at 16:24
3

Your installation error is because you did not remove the HWE kernel. nvidia-340 will not work with 5.15.0-67-generic. It will only work with 5.4.0-172-generic, as I tested in a 20.04 Docker container. You need to have exactly one kernel installed, and no other kernels for the nvidia-340 driver to work. One line of dpkg: error: version '-' has bad syntax: revision number is empty appears for each kernel version you have, and you have 3, which is 2 more than desired.

Furthermore 5.15.0-67-generic does not even exist in the repositories right now. The closest is 5.15.0-97-generic. Perhaps you forgot to run apt update for a long time, disabled automatic package list fetching, or installed a custom kernel. Anyway, since usual HWE removal steps didn't work for you, let's try something more forceful:

sudo -i

apt update apt purge nvidia-340 dpkg --configure -a apt upgrade apt dist-upgrade

If the next step fails, don't reboot until you do apt install linux-generic

dpkg --get-selections | cut -f1 | grep '^linux-[^:]*[[:digit:]]' | xargs apt purge apt install linux-headers-5.4.0-172 linux-headers-5.4.0-172-generic linux-image-5.4.0-172-generic linux-modules-5.4.0-172-generic linux-modules-extra-5.4.0-172-generic

apt install nvidia-340

Daniel T
  • 4,594
  • how can i delete the former two kernels i have? – Davi SN Mar 04 '24 at 04:38
  • @DaviSN The dpkg --g[...] purge step will delete all the kernels. Then the next step will install the exact version you need – Daniel T Mar 04 '24 at 04:43
  • I found that network does not work with 5.4.0-172-generic, so how can I fix this? – Davi SN Mar 04 '24 at 04:44
  • @DaviSN Idk about your network. You can't have any other kernels installed if you want your Nvidia driver working. And for your network problem, you can ask another question after you get your Nvidia working – Daniel T Mar 04 '24 at 04:45
  • in order for me to install the nvidia driver on the kernel I said above, I will need to fix this problem since network works on 5.15.0-67-generic. Can you help me? – Davi SN Mar 04 '24 at 04:52
  • Is there any way to install the network driver on 5.4.0-172-generic? – Davi SN Mar 04 '24 at 04:53
  • You haven't given any details about which network driver, whether it's WiFi or Ethernet, and what hardware, which you would provide in a new question. How did you download the network driver? If it was another computer, you can use that computer to communicate with AskUbuntu. If it came with the HWE kernel, you can use the LiveCD to connect to the network, and mount the hard disk as necessary – Daniel T Mar 04 '24 at 04:55
  • it's an wired ethernet connection, sorry for not providing enough details before – Davi SN Mar 04 '24 at 04:59
  • Please just click on the "Search on Ask Ubuntu..." box and enter the name of your driver (see lshw -c network and look for driver=), or enter the name of your hardware device. Perhaps also add the desired kernel version or also try a search engine. We can't change the subject in a comments section from graphics to networking. Like OrganicMarble, I'm also logging off for the night. Searching is 80% of the time I take commenting and answering anyway. – Daniel T Mar 04 '24 at 05:06
2

Edit: if the following command returns a result for your GPU or VGA device, then this answer doesn't apply to you (use driver 390 instead of 470).

hwinfo --gfxcard | grep -i 0f02

According to the Nvidia website, the GeForce GT 730 should be using driver 470 (this does not apply to the GeForce GT 730 with PCI ID 0f02)

First, make sure your system is fully up to date or you will encounter issues:

sudo add-apt-repository restricted
sudo apt update
sudo apt dist-upgrade

Then reboot.

After a reboot, proceed with the installation:

sudo apt install --install-recommends nvidia-driver-470

When it's done, you will need to reboot to apply the changes.

mchid
  • 43,546
  • 8
  • 97
  • 150