Score:0

ubuntu 22.04 dual boot, failed installing .deb and .run Cuda 12.1

ph flag

Should I be trying a Cuda 11xx?

My most recent error

nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ sudo sh cuda_12.1.1_530.30.02_linux.run
 Installation failed. See log at /var/log/cuda-installer.log for details.
nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ cat /var/log/cuda-installer.log
[INFO]: Driver not installed.
[INFO]: Checking compiler version...
[INFO]: gcc location: /usr/bin/gcc

[INFO]: gcc version: gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04) 

[INFO]: Initializing menu
[INFO]: nvidia-fs.setKOVersion(2.15.3)
[INFO]: Setup complete
[INFO]: Installing: Driver
[INFO]: Installing: 530.30.02
[INFO]: Executing NVIDIA-Linux-x86_64-530.30.02.run --ui=none --no-questions --accept-license --disable-nouveau --no-cc-version-check --install-libglvnd  2>&1
[INFO]: Finished with code: 256
[ERROR]: Install of driver component failed. Consult the driver log at /var/log/nvidia-installer.log for more details.
[ERROR]: Install of 530.30.02 failed, quitting

I am "clean" of anything nvidia I believe

yck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ dpkg -l | grep nvidia

My previous tries were instructions from here for .deb local and the .run versions https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=runfile_local

Other relevant output

nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ lspci | grep -i nvidia
01:00.0 3D controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)

nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ uname -r
5.19.0-1009-nvidia-lowlatency

yck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0 ==
modalias : pci:v000010DEd00001F9Dsv000017AAsd00003A5Dbc03sc02i00
vendor   : NVIDIA Corporation
model    : TU117M [GeForce GTX 1650 Mobile / Max-Q]
driver   : nvidia-driver-530 - distro non-free
driver   : nvidia-driver-510 - distro non-free
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-470 - distro non-free
driver   : nvidia-driver-525 - distro non-free
driver   : nvidia-driver-530-open - distro non-free recommended
driver   : nvidia-driver-515-open - distro non-free
driver   : nvidia-driver-515-server - distro non-free
driver   : nvidia-driver-525-server - distro non-free
driver   : nvidia-driver-515 - distro non-free
driver   : nvidia-driver-525-open - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ nvcc --version
Command 'nvcc' not found, but can be installed with:
sudo apt install nvidia-cuda-toolkit

I read this for the preinstallation steps: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html

I have no clue what to try next.
One other thing that happened is that the Displaylink Driver I installed along with dkms and one other package to get my second monitor working turned off, ie. the second monitor is no longer recognized nor receiving any power while I tried different ways to install nvidia drivers and cuda.

Edit: Disable nouveau: https://linuxconfig.org/how-to-disable-blacklist-nouveau-nvidia-driver-on-ubuntu-22-04-jammy-jellyfish-linux For 20.04: https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-22-04

Those are confusing because the tutorial for 22.04 sounds like I disable nouveau first then install an Nvidia driver but for 20.04 install Nvidia first and then blacklist nouveau so which way is it?

I'm also seeing

nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~$ lspci | grep -e VGA
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c6)
nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~$ lspci | grep -e nvidia
nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~$ lspci | grep -i nvidia
01:00.0 3D controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~$ 

https://www.linuxcapable.com/install-nvidia-drivers-on-ubuntu-linux/

Why doesn't the command with -e show my Nvidia graphics card like in that link?

I also tried the GUI way to install a driver and get the strangest output

yck33@nyck33-IdeaPad-Gaming-3-15ACH6:~$ lspci | grep -i nvidia
01:00.0 3D controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~$ nvidia-smi
No devices were found

cc flag
See https://askubuntu.com/questions/1077061/how-do-i-install-nvidia-and-cuda-drivers-into-ubuntu/1077063#1077063 https://askubuntu.com/questions/1219761/cuda-10-2-different-installation-paths/1244010#1244010 Suggest getting your Nvidia drivers from the Ubuntu repos (even the 525.105.17 is sufficient), and reject any offer of another from the Nvidia .run script. Also override the install system location to be local to the cuda directory, so the cuda install touches NOTHING in a system directory. Few kernel/video driver upgrade problems this way.
Score:2
ca flag

Note: There are comments related to my original question but I thought I would add how I got it installed because it's not exactly how other answers show how to do it on my Lenovo Gaming Laptop with GEFORCE GTX 1650 (Max-Q laptop version)

Choose this driver:

driver

at this point command nvidia-smi should work.

Download Cuda 12.1 run version from here: https://developer.nvidia.com/cuda-downloads

Note: if you previously tried to install and try to install again following instructions on that page and get "it is encouraged that you delete/remove...", I actually just said continue rather than abort and it then asks you whether you want to update the installation which I said yes to. Also don't forget to uncheck the driver using space bar since step 1 above you already have an Nvidia driver.

I did not bother with libcudnn and other stuff beforehands just to keep it simple and now when I do nvcc --version get

NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2023 NVIDIA
Corporation Built on Mon_Apr__3_17:16:06_PDT_2023 Cuda compilation
tools, release 12.1, V12.1.105 Build
cuda_12.1.r12.1/compiler.32688072_0 ```

Answer moved here from OP's edit.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.