I can t update my driver

there was an error:Not creating home directory `/'.
Loading new nvidia-340-340.108 DKMS files...
Building for 5.15.0-52-generic
Building for architecture x86_64
Building initial module for 5.15.0-52-generic
Error! Bad return status for module build on kernel: 5.15.0-52-generic (x86_64)
Consult /var/lib/dkms/nvidia-340/340.108/build/make.log for more information.
dpkg: error processing package nvidia-340 (--configure):
installed nvidia-340 package post-installation script subprocess returned error exit status 10
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-52-generic
Errors were encountered while processing:
nvidia-340
E: Sub-process /usr/bin/dpkg returned an error code (1)

The kernel is too high for it...
I will need to look into this more in the morning.

Ok take your time

Ok... as I said earlier, you need the 5.4 kernel:

However, there is a twist. One user posted that they were using the 5.15 kernel by using a patched 340 driver:

The latest Ubuntu kernel 5.15.0-46 works great with the custom nvidia-340 driver package developed by kelebek333. So in order to get the old drivers running, the following worked for me. Run as root:
add-apt-repository ppa:kelebek333/nvidia-legacy apt update apt install nvidia-340 echo "blacklist nouveau" >> /etc/modprobe.d/blacklist-nouveau.conf update-initramfs reboot
Most useful discussion on this matter see here: Bug #1910709 “DKMS linux-headers-5.8.0-34-generic update brokes ...” : Bugs : nvidia-graphics-drivers-340 package : Ubuntu

Will i use any commands in the article or i will use the commands u told me?

Well... why not both in one go?

sudo add-apt-repository ppa:kelebek333/nvidia-legacy

sudo apt update

sudo apt install linux-headers-5.4.0-81-generic linux-modules-5.4.0-81-generic linux-modules-extra-5.4.0-81-generic linux-image-5.4.0-81-generic nvidia-340

sudo echo "blacklist nouveau" >> /etc/modprobe.d/blacklist-nouveau.conf

sudo update-initramfs

sudo reboot

Once rebooted, test your graphics.
If no good, then reboot and Advanced Options for Zorin > select the 5.4 kernel and boot up - test graphics.

When i tried to boot( i didn't do what u told me i was booting to do it)

But there was an error

After zorin disappears there is a bunch of commands has(ok)

Do i fix it or do i install zorin os again?

First off it’s not really hard to get games running under linux, i posted a tutorial i while ago to make things easier for new users (like my self). Secondly you gpu is a low end card.

The more descriptive you are, the easier it is to help.

I just reinstall zorin os because it will be faster than fixing the problem and i didn't care about my things because there was nothing on my pc

I didn't do the process yesterday because i was studying but i will try to do it today and see if it is fixed or not

Where did u post this tutorial?

1 Like

what do i do when i type this command:sudo update-initramfs

You must specify at least one of -c, -u, or -d.

Usage: update-initramfs {-c|-d|-u} [-k version] [-v] [-b directory]

Options:
-k version Specify kernel version or 'all'
-c Create a new initramfs
-u Update an existing initramfs
-d Remove an existing initramfs
-b directory Set alternate boot directory
-v Be verbose

See update-initramfs(8) for further details.

And when i reboot my pc didn't boot

It it because i didn't do sudo update-initramsf

And can i do it without reinstall zorin os

sudo update-initramfs -u if i am not wrong

But where i do it and i can t boot my pc because i didn't do it while my pc was on

Before or after:

Just don t care about that ok because i install zorin os again

So there is a command that i don t know what to do with it:sudo update-initramfs