Hello!
This is what I see from your bug report:
First there is an installation log from the .run file installer.
You tried to install it, although the installer detected an already present installation (most likely distro package).
You ignored the warning and installed it anyway.
Usually messes up the system.
Installation failed because your build system does not seem to be in order.
*** /var/log/nvidia-installer.log
*** ls: -rw-rār-- 1 root root 1759 2023-08-02 15:12:28.599914693 +0200 /var/log/nvidia-installer.log
nvidia-installer log file ā/var/log/nvidia-installer.logā
creation time: Wed Aug 2 15:11:56 2023
installer version: 535.86.05
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
nvidia-installer command line:
./nvidia-installer
Using: nvidia-installer ncurses v6 user interface
ā Detected 16 CPUs online; setting concurrency level to 16.
ā Installing NVIDIA driver version 535.86.05.
ā An alternate method of installing the NVIDIA driver was detected. (This is usually a package provided by your distributor.) A driver installed via that method may integrate better with your system than a driver installed by nvidia-installer.
Please review the message provided by the maintainer of this alternate installation method and decide how to proceed:
The NVIDIA driver provided by Ubuntu can be installed by launching the āSoftware & Updatesā application, and by selecting the NVIDIA driver from the āAdditional Driversā tab.
(Answer: Continue installation)
ā Performing CC sanity check with CC=ā/usr/bin/ccā.
ā Performing CC check.
ERROR: Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the ākernel-sourceā or ākernel-develā RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the āākernel-source-pathā command line option.
ERROR: Installation has failed. Please see the file ā/var/log/nvidia-installer.logā for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
I donāt know how many files the nvidia .run file installer has installed at that point, but itās always highly recommended to completely purge one type of installation before attempting the other (apt purge ā¦, or --uninstall parameter of the .run file).
Next day you install (most likely from Software&Updates). It fails again because there is something wrong with your build environment. The kernel modules did not build:
*** /var/lib/dkms/nvidia/535.86.05/build/make.log
*** ls: -rw-rār-- 1 root root 1118 2023-08-03 15:20:22.519386070 +0200 /var/lib/dkms/nvidia/535.86.05/build/make.log
DKMS make.log for nvidia-535.86.05 for kernel 6.1.42-060142-generic (x86_64)
czw, 3 sie 2023, 15:20:21 CEST
make[1]: Entering directory ā/usr/src/linux-headers-6.1.42-060142ā
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
You are using: cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia/535.86.05/build need-builtin=1 need-modorder=1
The Module.symvers file is missing, or does not contain any
symbols exported from the kernel. This could cause the NVIDIA
kernel modules to be built against a configuration that does
not accurately reflect the actual target kernel.
The Module.symvers file check can be disabled by setting the
environment variable IGNORE_MISSING_MODULE_SYMVERS to 1.
make[2]: *** [/var/lib/dkms/nvidia/535.86.05/build/Kbuild:346: module_symvers_sanity_check] Error 1
make[1]: *** [Makefile:2018: /var/lib/dkms/nvidia/535.86.05/build] Error 2
make[1]: Leaving directory ā/usr/src/linux-headers-6.1.42-060142ā
make: *** [Makefile:82: modules] Error 2
There is also the compiler mismatch warning (which is a bit confusing as the versions seem to actually match). Maybe worth checking with update-alternatives, if all is in order.
You are using a mainline kernel it looks to me.
Iām not sure about the compatibility of the mainline kernel and ubuntu focal.
v6.1 is not found here:
https://people.canonical.com/~kernel/info/kernel-version-map.html
Might be the root of these problems.
Anyhow the nvidia modules did not build, so they cannot work.
At boot these two things stick out:
1: An ACPI related crash (donāt know of its relevance):
[ 0.210689] ================================================================================
[ 0.210689] UBSAN: array-index-out-of-bounds in /home/kernel/COD/linux/drivers/acpi/acpica/dswexec.c:401:12
[ 0.210689] index -1 is out of range for type āacpi_operand_object *[9]ā
[ 0.210689] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 6.1.42-060142-generic #202307270338
[ 0.210689] Hardware name: Dell Inc. Precision 3580/031CD3, BIOS 1.5.0 06/14/2023
[ 0.210689] Call Trace:
[ 0.210689]
[ 0.210689] show_stack+0x4e/0x61
[ 0.210689] dump_stack_lvl+0x4a/0x6f
[ 0.210689] dump_stack+0x10/0x18
[ 0.210689] ubsan_epilogue+0x9/0x3a
[ 0.210689] __ubsan_handle_out_of_bounds.cold+0x42/0x47
[ 0.210689] acpi_ds_exec_end_op+0x948/0x960
[ 0.210689] acpi_ps_parse_loop+0x287/0x770
[ 0.210689] acpi_ps_parse_aml+0x226/0x600
[ 0.210689] acpi_ps_execute_table+0xec/0x160
[ 0.210689] acpi_ns_execute_table+0x180/0x3b0
[ 0.210689] acpi_ns_parse_table+0x4a/0xc0
[ 0.210689] acpi_ns_load_table+0x6b/0x240
[ 0.210689] acpi_tb_load_namespace+0x1a3/0x300
[ 0.210689] ? acpi_bus_init+0x27a/0x27a
[ 0.210689] acpi_load_tables+0x73/0xde
[ 0.210689] ? acpi_bus_init+0x27a/0x27a
[ 0.210689] acpi_bus_init+0x27/0x27a
[ 0.210689] ? acpi_install_address_space_handler+0xc1/0x150
[ 0.210689] ? pcc_rx_callback+0x20/0x20
[ 0.210689] ? acpi_bus_init+0x27a/0x27a
[ 0.210689] ? acpi_bus_init+0x27a/0x27a
[ 0.210689] acpi_init+0x88/0x14b
[ 0.210689] ? acpi_bus_init+0x27a/0x27a
[ 0.210689] do_one_initcall+0x5b/0x240
[ 0.210689] do_initcalls+0x131/0x16b
[ 0.210689] kernel_init_freeable+0xf6/0x137
[ 0.210689] ? rest_init+0x100/0x100
[ 0.210689] kernel_init+0x1b/0x170
[ 0.210689] ? rest_init+0x100/0x100
[ 0.210689] ret_from_fork+0x1f/0x30
[ 0.210689]
[ 0.210689] ================================================================================
2: The intel driver also seems to have a massive problem:
[ 5.026105] i915 0000:00:02.0: Direct firmware load for i915/adlp_dmc_ver2_16.bin failed with error -2
[ 5.026110] i915 0000:00:02.0: [drm] Failed to load DMC firmware i915/adlp_dmc_ver2_16.bin. Disabling runtime power management.
[ 5.026111] i915 0000:00:02.0: [drm] DMC firmware homepage: i915 - kernel/git/firmware/linux-firmware.git - Repository of firmware blobs for use with the Linux kernel
[ 5.026495] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[ 5.051370] i915 0000:00:02.0: GuC firmware i915/adlp_guc_70.bin: fetch failed with error -2
[ 5.051376] i915 0000:00:02.0: Please file a bug on drm/i915; see How to file i915 bugs Ā· Wiki Ā· drm / intel Ā· GitLab for details.
[ 5.051377] i915 0000:00:02.0: [drm] GuC firmware(s) can be downloaded from i915 - kernel/git/firmware/linux-firmware.git - Repository of firmware blobs for use with the Linux kernel
[ 5.232640] i915 0000:00:02.0: [drm] GuC firmware i915/adlp_guc_70.bin version 0.0.0
[ 5.232713] i915 0000:00:02.0: GuC initialization failed -2
[ 5.232721] i915 0000:00:02.0: Enabling uc failed (-5)
[ 5.232722] i915 0000:00:02.0: Failed to initialize GPU, declaring it wedged!
[ 5.234426] i915 0000:00:02.0: [drm:add_taint_for_CI [i915]] CI tainted:0x9 by intel_gt_set_wedged_on_init+0x34/0x50 [i915]
As this is a very new model of laptop, Iād actually recommend installing a newer version of ubuntu than 20.04.