Nvidia 340.108 fails to install with kernels 5.5 onward

Bug #1872950 reported by ppp
280
This bug affects 58 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-340 (Ubuntu)
Fix Released
High
Alberto Milone
Focal
Fix Released
Undecided
Unassigned
Groovy
Fix Released
High
Alberto Milone

Bug Description

SRU request:

[Impact]

 * Installing the 340 driver will fail when running Linux 5.7 or newer.

[Test Case]

 * Install nvidia-340 from -proposed.

 * Check that the modules was built and installed, using the
   following command:

   dkms status

[Regression Potential]

 * The driver once built and installed could be not working and lead to have the desktop not starting for example. Check that you get a desktop loaded and decent performances

____

Hi developers,

thanks for your great work on porting legacy drivers to Ubuntu.

Anyway I have to complain in not seeing Nvidia 340.108 driver for
kernels 5.5 and 5.6 yet, leaving users stuck on kernel 5.4,
because Nvidia 340.108 fails to install with kernels 5.5 and 5.6.

Archlinux already has a driver for Kernel 5.6 via AUR
(https://aur.archlinux.org/packages/nvidia-340xx/) and Debian SID has
one for kernel 5.5.

So, the question is: when will we see a new version in repositories?

Bye and have a nice day.

ppp (pigeonskiller)
description: updated
Revision history for this message
Butterfly (kelebek333) wrote :

Hi,

Using the patches in the aur repository, I prepared a PPA repository for the nvidia-340. If wish you can install nvidia-340 package (supported for kernel 5.5, 5.6 series) from PPA. You can add PPA with following command.

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

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers-340 (Ubuntu):
status: New → Confirmed
Revision history for this message
ppp (pigeonskiller) wrote :

Many many thanks to Butterfly (kelebek333).

Finally a capable and willing developer who has made drivers missing for some time.

I am testing them with the fast xanmod kernel 5.6.4 and at the moment they seem to be working flawlessly,so I suppose they work with official kernels too.

I think a not so small of Ubuntu community that still has a legacy card should be grateful for your work.

Thanks again and have a nice day.

Revision history for this message
satmandu (satadru-umich) wrote :
Download full text (3.3 KiB)

Great work kelebek333!

Has anybody heard about any usable patches to make this work on 5.7?

./include/linux/cpumask.h:266:9: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
  266 | (cpu) < nr_cpu_ids;)
      | ^
./include/linux/cpumask.h:812:36: note: in expansion of macro ‘for_each_cpu’
  812 | #define for_each_online_cpu(cpu) for_each_cpu((cpu), cpu_online_mask)
      | ^~~~~~~~~~~~
./include/linux/vmstat.h:227:2: note: in expansion of macro ‘for_each_online_cpu’
  227 | for_each_online_cpu(cpu)
      | ^~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/efi.h:20,
                 from /var/lib/dkms/nvidia-340/340.108/build/nv-linux.h:173,
                 from /var/lib/dkms/nvidia-340/340.108/build/nv-frontend.c:13:
./include/linux/rtc.h: In function ‘rtc_tv_nsec_ok’:
./include/linux/rtc.h:232:22: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Wsign-compare]
  232 | if (to_set->tv_nsec < TIME_SET_NSEC_FUZZ) {
      | ^
./include/linux/rtc.h:237:22: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Wsign-compare]
  237 | if (to_set->tv_nsec > NSEC_PER_SEC - TIME_SET_NSEC_FUZZ) {
      | ^
{ echo /var/lib/dkms/nvidia-340/340.108/build/nvidia.ko; :; } \
| awk '!x[$0]++' - > /var/lib/dkms/nvidia-340/340.108/build/modules.order
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1722: /var/lib/dkms/nvidia-340/340.108/build] Error 2
make[1]: Target 'modules' not remade because of errors.
make[1]: Leaving directory '/usr/src/linux-headers-5.7.0-050700rc1-generic'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [Makefile:201: nvidia.ko] Error 1
make: Target 'module' not remade because of errors.
make: Entering directory '/var/lib/dkms/nvidia-340/340.108/build/uvm'
cd ./..; make module SYSSRC=/lib/modules/5.7.0-050700rc1-generic/build SYSOUT=/lib/modules/5.7.0-050700rc1-generic/build KBUILD_EXTMOD=./..
make[1]: Entering directory '/var/lib/dkms/nvidia-340/340.108/build'
NVIDIA: calling KBUILD...
make[2]: Entering directory '/usr/src/linux-headers-5.7.0-050700rc1-generic'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
make -f ./scripts/Makefile.build obj=.. \
single-build= \
need-builtin=1 need-modorder=1
scripts/Makefile.build:44: ../Makefile: No such file or directory
make[3]: *** No rule to make target '../Makefile'. Stop.
make[2]: *** [Makefile:1722: ..] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.7.0-050700rc1-generic'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [Makefile:20...

Read more...

Revision history for this message
Butterfly (kelebek333) wrote :

Hi,

I added new package of nvidia-340 supported up linux 5.7 to PPA repository.

nvidia-graphics-drivers-340 (340.108-1lmtrbionic3) bionic; urgency=medium

  * Disabled all Ubuntu PPA and AUR based patches.
  * Added MilhouseVH's LibreELEC based patches for linux 5.5, 5.6 and 5.7 series

Thanks to MilhouseVH for patches. https://forums.developer.nvidia.com/t/patches-for-340-108-and-5-6-rc-need-help-with-driver-init/111760/12

Revision history for this message
satmandu (satadru-umich) wrote :

The other patches are needed! For instance, there is display corruption after sleep without one of the other patches.

(That has returned after the other patches were removed.)

Revision history for this message
Butterfly (kelebek333) wrote :

Which patch?

buildfix_kernel_4.11.patch
buildfix_kernel_5.2.patch
use-kmem_cache_create_usercopy-on-4.16.patch
disable_fstack-clash-protection_fcf-protection.patch
do-not-call-pci_save_state.patch

Revision history for this message
Ejmarkow (ejmarkow) wrote :

Butterfly (kelebek333),

Thank you for the 3 patches listed in Post #5 provided by Milhouse, they work perfectly by themselves for Linux Kernel 5.7 with Nvidia driver 340.108. No other patches are necessary.

Both kernel modules (nvidia & nvidia_uvm) are built nicely and work well!

I'm looking forward for the next Nvidia driver patch(es) (if they are needed) for soon to be released Linux Kernel 5.8-rc+.

Thank you very much again!

ejmarkow

Revision history for this message
Butterfly (kelebek333) wrote :

I added new package of nvidia-340 supported up linux 5.8 to PPA repository for focal and bionic base.

------------
nvidia-graphics-drivers-340 (340.108-2lmtrbionic) bionic; urgency=medium

  * Added Piotr Oniszczuk's (@warpme) minimyth2 based patch for linux 5.8 series.
  * Added mmap_sem fix to nvidia_uvm_lite_api.c file.
------------

Revision history for this message
sally (julesflwr) wrote :

I just upgraded to Ubuntu 20.10 without realizing this problem with the nvidia-340.108 . The upgrade failed to install this driver with the 5.8 kernel that comes with the upgrade. Fortunately, I still have the 5.4 kernel that is compatible. I have a Dell Inspiron 1400 with legacy GPU GeForce 8400M GS. I wondered whether there is or will be a fix for the nvidia driver to make it compatible with the 5.8 kernel in Ubuntu 20.10. Thank you for your help.

Revision history for this message
Ayush Kumar (thelivingdodo001) wrote :

Can verify the issue faced by sally (julesflwr). I too upgrade without realizing the kernel incompatibility.

Butterfly (kelebek333),
Thanks a lot for your work, can you please add package of nvidia-340 for groovy too?
Again, thank you for your PPA repository!

Revision history for this message
Abdel Bolanos Martinez (abdel-bolanos) wrote :

Hi, I found the same issue with nvidia-340 on groovy (kernel 5.8).

Setting up nvidia-340 (340.108-0ubuntu5) ...
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia-340
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Adding system user `nvidia-persistenced' (UID 132) ...
Adding new group `nvidia-persistenced' (GID 141) ...
Adding new user `nvidia-persistenced' (UID 132) with group `nvidia-persistenced' ...
Not creating home directory `/'.
Loading new nvidia-340-340.108 DKMS files...
Building for 5.8.0-22-generic
Building for architecture x86_64
Building initial module for 5.8.0-22-generic
ERROR (dkms apport): kernel package linux-headers-5.8.0-22-generic is not supported
Error! Bad return status for module build on kernel: 5.8.0-22-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 desktop-file-utils (0.24-1ubuntu4) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.32-0ubuntu3) ...
Processing triggers for man-db (2.9.3-2) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu2) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for initramfs-tools (0.137ubuntu12) ...
update-initramfs: Generating /boot/initrd.img-5.8.0-22-generic
Errors were encountered while processing:
 nvidia-340

If you need my log file, please let me know.

Revision history for this message
Butterfly (kelebek333) wrote :

I added Nvidia-340 driver (supported up linux 5.9) to PPA repository for Groovy. But I will not update of nvidia-340 for newer versions of Linux kernel on Groovy.

I hope to keep PPA repository for Bionic and Focal (LTS) base up to date for newer versions of Linux kernel.

Revision history for this message
sally (julesflwr) wrote :

Thank you Butterfly. I was able to install your driver with linux 5.8 without issues.

summary: - Nvidia 340.108 fails to install with kernels 5.5 and 5.6
+ Nvidia 340.108 fails to install with kernels 5.5 onward
Changed in nvidia-graphics-drivers-340 (Ubuntu):
importance: Undecided → High
tags: added: focal groovy
tags: removed: focal
tags: added: rls-gg-incoming
Revision history for this message
Abdel Bolanos Martinez (abdel-bolanos) wrote :

Hi Butterfly. Sorry to ask. How can I install that driver in Groovy for linux 5.8?
Thanks in advance.

Revision history for this message
Butterfly (kelebek333) wrote :

Hi @abdel-bolanos,

You can look to comment #1 for PPA repository.

Revision history for this message
Abdel Bolanos Martinez (abdel-bolanos) wrote :

Much appreciated Butterfly!

tags: added: regression-release
Revision history for this message
VPablo (villumar) wrote :

Thank you Butterfly (kelebek333) for 5.8 (groovy) update.

Revision history for this message
Ejmarkow (ejmarkow) wrote :

I would like to thank and commend Butterfly (kelebek333) for making the latest Linux Kernel 5.9 series "buildfix_kernel_5.9.patch" available for NVIDIA driver 340.108.

Applied this patch using Linux Kernel 5.9.2 and it is working perfectly.

Summary of patches for NVIDIA driver 340.108 (must be applied in order) using Linux Kernel 5.9 series:

buildfix_kernel_5.6.patch
buildfix_kernel_5.7.patch
buildfix_kernel_5.7-reinstate-legacy-support.patch
buildfix_kernel_5.8.patch
buildfix_kernel_5.9.patch

Thank you again and keep up the great work!

$ uname -a
Linux galicia 5.9.2-git-ee336b3-Pogorze-Karpackie-CUSTOM-KERNEL #1 SMP Fri Oct 30 20:38:21 CET 2020 x86_64 GNU/Linux

$ dmesg | grep -i 'nvidia unix'
NVRM: loading NVIDIA UNIX x86_64 Kernel Module 340.108 Wed Dec 11 11:06:58 PST 2019

$ dmesg | grep -i 'nvidia_uvm'
nvidia_uvm: Loaded the UVM driver, major device number 244

$ lsmod | grep -i 'nvidia'
nvidia_uvm 45056 0
nvidia 10592256 54 nvidia_uvm
drm 532480 3 nvidia

Changed in nvidia-graphics-drivers-340 (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
tags: removed: rls-gg-incoming
tags: added: rls-gg-incoming
Changed in nvidia-graphics-drivers-340 (Ubuntu):
status: Confirmed → In Progress
Changed in nvidia-graphics-drivers-340 (Ubuntu Groovy):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Alberto Milone (albertomilone)
description: updated
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello ppp, or anyone else affected,

Accepted nvidia-graphics-drivers-340 into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/340.108-0ubuntu5.20.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nvidia-graphics-drivers-340 (Ubuntu Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-groovy
Changed in nvidia-graphics-drivers-340 (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
VPablo (villumar) wrote :

Installed the proposed package without problems and restarted the system as well.

Version: 340.108-0ubuntu5.20.10.1

The problem of the original was that it will not install, this does.

Thank you.

tags: added: verification-done verification-done-groovy
removed: verification-needed verification-needed-groovy
Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

Confirming: 340.108-0ubuntu5.20.10.1 installs, compiles and runs.

It does however compain:
> /var/lib/dkms/nvidia-340/340.108/source/dkms.conf: Zeile 16: PATCH{7]=do-not-call-pci_save_state.patch: Befehl nicht gefunden

(/var/lib/dkms/nvidia-340/340.108/source/dkms.conf: line 16: PATCH{7]=do-not-call-pci_save_state.patch: command not found)

It seems, patch "o-not-call-pci_save_state.patch" ist missing in the package.

tags: removed: rls-gg-incoming
Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

The problem in line 16 obviously is in "PATCH{7]" which has wrong brackets.

Tho it needs to be fixed in /usr/src/nvidia-340-340.108/dkms.conf instead which is the source for the mentioned file in the build tree.

If you already successfully installed the version where the patch didn't apply, you will most probably need to remove and unbuild the module to try the build again.

Something like:

dkms remove -m nvidia-340/340.108 -k all
dkms unbuild -m nvidia-340/340.108 -k all
dkms install -m nvidia-340/340.108 -k all

should do the trick. Not tested tho, just our of my memory

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

Thanks, that worked.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Whoops, I also missed that bracket typo while reviewing the package in the SRU queue. I think we might need to re-upload with that fixed, as otherwise we're missing one patch from this version.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello ppp, or anyone else affected,

Accepted nvidia-graphics-drivers-340 into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/340.108-0ubuntu5.20.10.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-groovy
removed: verification-done verification-done-groovy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-340 - 340.108-0ubuntu7

---------------
nvidia-graphics-drivers-340 (340.108-0ubuntu7) hirsute; urgency=medium

  * debian/templates/dkms_nvidia.conf.in:
    - Fix typo where a curly bracket was used instead of a square one.

 -- Alberto Milone <email address hidden> Mon, 16 Nov 2020 11:22:08 +0100

Changed in nvidia-graphics-drivers-340 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

On my Thinkpad T61 I still see garbled screen content resuming from sleep. Is this to e expected, or are will still missing some patch?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That would be a different issue that you need to open a new bug about.

Revision history for this message
ppp (pigeonskiller) wrote :

Why drivers are not available for Ubuntu 20.04 which is stable and long term support?

Revision history for this message
Alexander Eifler (eifx) wrote :

Hello,

thank you for releasing the Bugfix 340.108-0ubuntu5.20.10.2. I have tested it on my system and it works fine! I have installed this package via the proposed way:

* "Enabling Pre-released updates" in the developers tab
* Activate the Nvidia-Driver in the "Additional Drivers" section

My System:

* GT218M (GeForce G 105M)
* Ubuntu 20.04
* uname -a: Linux eifx-laptop 5.8.0-29-generic #31-Ubuntu SMP Fri Nov 6 12:37:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Good to hear. Unfortunately that version is intended for Ubuntu 20.10 so needs to be tested there before it is approved.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Or is that a typo and you meant to say you are using Ubuntu 20.10 already?

Revision history for this message
Alexander Eifler (eifx) wrote :

Oh sorry - yes, it's a typo. Sorry! I use Ubuntu 20.10.

Revision history for this message
Lukas Kuster (koschder) wrote :

I can confirm this was fixed with version 340.108-0ubuntu5.20.10.2.
The module failed to build after upgrading to groovy, but after installing the package from proposed it worked.
uname -a: Linux ubuntu-desktop 5.8.0-29-generic #31-Ubuntu SMP Fri Nov 6 12:37:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

tags: added: verification-done verification-done-groovy
removed: verification-needed verification-needed-groovy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-340 - 340.108-0ubuntu5.20.10.2

---------------
nvidia-graphics-drivers-340 (340.108-0ubuntu5.20.10.2) groovy; urgency=medium

  * debian/templates/dkms_nvidia.conf.in:
    - Fix typo where a curly bracket was used instead of a square one.

nvidia-graphics-drivers-340 (340.108-0ubuntu5.20.10.1) groovy; urgency=medium

  * debian/templates/dkms_nvidia.conf.in,
    debian/dkms_nvidia/patches/buildfix_kernel_5.7.patch,
    debian/dkms_nvidia/patches/buildfix_kernel_5.8.patch,
    debian/dkms_nvidia/patches/buildfix_kernel_5.9.patch:
    - Fix build failure with Linux 5.7, 5.8, and 5.9 (LP: #1872950).

 -- Alberto Milone <email address hidden> Mon, 16 Nov 2020 11:27:30 +0100

Changed in nvidia-graphics-drivers-340 (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for nvidia-graphics-drivers-340 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
ppp (pigeonskiller) wrote :

@Butterfly

Hi kelebek333, just to inform you that a new patch for Nvidia 340.108 and kernel 5.10 is available here:

https://github.com/warpme/minimyth2/blob/master/script/nvidia/nvidia-340.108/files/

Thanks for your great contribution to community and have a nice day.

Revision history for this message
satmandu (satadru-umich) wrote :

Attaching the nvidia 340.108 patch for kernel 5.10 from the aforementioned link.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug is closed. If there's a problem with kernel 5.10 then please open a new bug about it.

Revision history for this message
Alex (topic001) wrote :

It affects me after yesterday upgrade to 5.8.
Is the release for kernel 5.8 excepted?

uname -r
5.8.0-34-generic

Revision history for this message
Alex (topic001) wrote :

Used Software&Updates App -> Additional Drivers -> Using NVIDIA binary driver - version 340.108 from nvidia-340 (proprietary, tested), Apply Changes.

Error message:
pk-client-error-quark: Error while installing package: installed nvidia-340 package post-installation script subprocess returned error exit status 10(313)

uname -r
5.8.0-34-generic

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

https://launchpad.net/bugs/1910709

use that for tracking the new build-failure on focal

Revision history for this message
Simon Iremonger (ubuntu-iremonger) wrote :

As per tjaalton's link -- new nvidia-340 in focal-proposed for 20.04 users:-
https://launchpad.net/bugs/1910709
Needs testing, especially for regressions for those still on Kernel 5.4.

Revision history for this message
Anbuselvan Rocky (anburocky3) wrote :

@butterfly was trying to install the package but it says, unable to locate package.

This is what i tried,

Imported the ppa,
`sudo add-apt-repository ppa:kelebek333/nvidia-legacy`
`sudo apt update`

and tried,
`sudo apt install nvidia-graphics-drivers-340` but it says unable to locate package.

Am i doing anything wrong? If so, kindly guide.
i'm using Ubuntu 20.04.1

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Four problems with that :(

* PPAs are not supported.

* This bug is closed.

* You should use bug 1910709 for 20.04.

* Bug 1910709 is also closed.

If the fix provided for 20.04 in bug 1910709 does not work for you then please open a new bug by running:

  ubuntu-bug nvidia-graphics-drivers-340

But if you are using kernel 5.10 then you can use bug 1908278.

Revision history for this message
Butterfly (kelebek333) wrote :

@Anbuselvan Rocky (anburocky3),

You can install nvidia-340 package after adding PPA.

sudo add-apt-repository ppa:kelebek333/nvidia-legacy
sudo apt update
sudo apt install nvidia-340

PPA is supports currently up to version 5.10 of Linux kernel and supports bionic, focal and groovy bases.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Updated released to Ubuntu 20.04 LTS Focal

Published in focal-updates on on 2021-01-21

Changelog entry is

nvidia-graphics-drivers-340 (340.108-0ubuntu5.20.04.1) focal; urgency=medium

  * Backport to focal. (LP: #1910709)

 -- Timo Aaltonen <email address hidden> Thu, 14 Jan 2021 09:40:28 +0200

Changed in nvidia-graphics-drivers-340 (Ubuntu Focal):
status: New → Fix Released
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

@kelebek333

Using nvidia-graphics-drivers-340 from the Ubuntu archive is preffered, as those drivers are signed by the Canonical secureboot signing keys and work with UEFI Secureboot systems without needing to enroll any mok-util keys or disabling secureboot, when installed using $ ubuntu-drivers tool.

Revision history for this message
Butterfly (kelebek333) wrote :

Hi Dimitri John Ledkov (@xnox),

What happens when installed driver with ubuntu-drivers is updated with the update manager? In this case, new module that is not installed with ubuntu-driver will not be signed? Can you share an official reference that the Ubuntu-drivers tool automatically signs the modules? I have never come across any information about the auto-signature capability of the ubuntu-drivers tool and I wondering how it works.

Best regards.

Revision history for this message
Butterfly (kelebek333) wrote :

@xnox,

I guess what you're talking about is related this commit. https://github.com/tseliot/ubuntu-drivers-common/commit/f24220e1565610ade7da723adfcf7a25d2adefcb

As I understand that, ubuntu-drivers auto installs linux-modules-nvidia-* package if available together nvidia driver package. So the nvidia driver can work with secureboot. If so, ubuntu-drivers is not auto-sign building nvidia driver.

However, there is no package for linux-modules-nvidia-* related to nvidia-340 driver in repository. In other words, nvidia-340 driver installed from official repository will not work with secureboot.

If there is wrong in my writing, can you correct it?

Revision history for this message
Heinrich Stoellinger (hstoellinger1) wrote :

Hello,
I have just installed Kubuntu 21.04 on my old Sony laptop (VGN-AW11M_H v: C6010CXT).
As usual, the Nouveau driver was installed for my graphics card
Device-1: NVIDIA G98M [GeForce 9300M GS] driver: nvidia v: 340.108.
With the Nouveau driver the system tends to work kind of o.k., but freezes, eg. sometimes when moving a window to the upper edge of my KDE monitor, so as to make it "full screen".
I used the backported NVIDIA driver o.k. under 20.10 (kernel 5.8.0-26-generic x86_64). Is there a backport already for 21.04 (vmlinuz-5.10.0-14-generic)?
Thanks for your help
H. Stoellinger

Revision history for this message
Heinrich Stoellinger (hstoellinger1) wrote :

Hello again,
Just because I am a curious lad, I tried out

sudo add-apt-repository ppa:kelebek333/nvidia-legacy
sudo apt update
sudo apt install nvidia-340

... but that didn't work...

Revision history for this message
Butterfly (kelebek333) wrote :

@hstoellinger1, PPA not supported 21.04 hirsute base.

Revision history for this message
Heinrich Stoellinger (hstoellinger1) wrote :

Does anybody know whether there is a chance that 21.04 might be supported? Is anybody working on it?

Revision history for this message
Heinrich Stoellinger (hstoellinger1) wrote :

Actually, Nouveau does kind of work with Kubuntu 21.04. However, it seems to only support a screen width of up to 1280px. My screen is 1680px wide.

Revision history for this message
Butterfly (kelebek333) wrote :

@hstoellinger1, Nvidia-340 driver added to PPA for hirsute (21.04) base. You can install nvdia-340 driver from PPA. The driver in PPA repository currently supports up to 5.12 of Linux kernel. https://launchpad.net/~kelebek333/+archive/ubuntu/nvidia-legacy

-----------------------------------

Nvidia-340 driver's official support for hirsute base is no longer available.

nvidia-graphics-drivers-340 (340.108-0ubuntu8) hirsute; urgency=medium

  * Drop support for the 340 driver, in favour of the nouveau driver
    since it is no longer supported by NVIDIA:
    https://nvidia.custhelp.com/app/answers/detail/a_id/3142/~/support-timeframes-for-unix-legacy-gpu-releases

 -- Alberto Milone <...> Wed, 10 Mar 2021 17:18:43 +0100

Revision history for this message
Heinrich Stoellinger (hstoellinger1) wrote : Re: [Bug 1872950] Re: Nvidia 340.108 fails to install with kernels 5.5 onward

Hello,
I added the PPA and then tried to install the driver package. But -
during fetching packages,
apt asks me to insert the following DVD/CD:
»Kubuntu 21.04 _Hirsute Hippo_ - Alpha amd64 (20210224)«
how/where can I get that DVD/CD?
Thanks for your help
H. Stoellinger

Am 21.03.21 um 00:20 schrieb Butterfly:
> @hstoellinger1, Nvidia-340 driver added to PPA for hirsute (21.04) base.
> You can install nvdia-340 driver from PPA. The driver in PPA repository
> currently supports up to 5.12 of Linux kernel.
> https://launchpad.net/~kelebek333/+archive/ubuntu/nvidia-legacy
>
>
> -----------------------------------
>
>
> Nvidia-340 driver's official support for hirsute base is no longer available.
>
> nvidia-graphics-drivers-340 (340.108-0ubuntu8) hirsute; urgency=medium
>
> * Drop support for the 340 driver, in favour of the nouveau driver
> since it is no longer supported by NVIDIA:
> https://nvidia.custhelp.com/app/answers/detail/a_id/3142/~/support-timeframes-for-unix-legacy-gpu-releases
>
> -- Alberto Milone <...> Wed, 10 Mar 2021 17:18:43 +0100
>

Revision history for this message
Butterfly (kelebek333) wrote :

@hstoellinger1, this not related PPA repository. Open Software and Updates (software sources) and disable DVD/CD repository.

Revision history for this message
SunBear (sunbear-c22) wrote :

@xnox The nvidia-340 driver can't seem to work with 5.11.0-25-generic that is presently used by Ubuntu Focal LTS. How should I resolve this issue?

~$ sudo dpkg --configure -a
[sudo] password for master:
Sorry, try again.
[sudo] password for master:
Setting up nvidia-340 (340.108-0ubuntu5.20.04.2) ...
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia-340
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Removing old nvidia-340-340.108 DKMS files...

------------------------------
Deleting module version: 340.108
completely from the DKMS tree.
------------------------------
Done.
Loading new nvidia-340-340.108 DKMS files...
Building for 5.11.0-25-generic
Building for architecture x86_64
Building initial module for 5.11.0-25-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-340.0.crash'
Error! Bad return status for module build on kernel: 5.11.0-25-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.2) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-25-generic
I: The initramfs will attempt to resume from /dev/nvme0n1p2
I: (UUID=107580ad-2775-4369-953e-7b873462c121)
I: Set the RESUME variable to override this.
Errors were encountered while processing:
 nvidia-340

Revision history for this message
SunBear (sunbear-c22) wrote :
Download full text (3.2 KiB)

Some of the error Msg in nvidia-340.0.crash

ProblemType: Package
DKMSBuildLog:
 DKMS make.log for nvidia-340-340.108 for kernel 5.11.0-25-generic (x86_64)
 Mon 02 Aug 2021 04:20:03 PM +08
 NVIDIA: calling KBUILD...
 make[1]: Entering directory '/usr/src/linux-headers-5.11.0-25-generic'
 test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
 echo >&2; \
 echo >&2 " ERROR: Kernel configuration is invalid."; \
 echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
 echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
 echo >&2 ; \
 /bin/false)
 make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia-340/340.108/build \
 single-build= \
.
.
.
 In file included from /var/lib/dkms/nvidia-340/340.108/build/nv-frontend.c:13:
 /var/lib/dkms/nvidia-340/340.108/build/nv-linux.h: At top level:
 /var/lib/dkms/nvidia-340/340.108/build/nv-linux.h:122:10: fatal error: asm/kmap_types.h: No such file or directory
   122 | #include <asm/kmap_types.h> /* page table entry lookup */
       | ^~~~~~~~~~~~~~~~~~
 compilation terminated.
 make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/nvidia-340/340.108/build/nv-frontend.o] Error 1
 make[2]: Target '__build' not remade because of errors.
 make[1]: *** [Makefile:1848: /var/lib/dkms/nvidia-340/340.108/build] Error 2
 make[1]: Target 'modules' not remade because of errors.
 make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-25-generic'
 NVIDIA: left KBUILD.
 nvidia.ko failed to build!
 make: *** [Makefile:202: nvidia.ko] Error 1
 make: Target 'module' not remade because of errors.
 make: Entering directory '/var/lib/dkms/nvidia-340/340.108/build/uvm'
 cd ./..; make module SYSSRC=/lib/modules/5.11.0-25-generic/build SYSOUT=/lib/modules/5.11.0-25-generic/build KBUILD_EXTMOD=./..
 make[1]: Entering directory '/var/lib/dkms/nvidia-340/340.108/build'
 NVIDIA: calling KBUILD...
 make[2]: Entering directory '/usr/src/linux-headers-5.11.0-25-generic'
 test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
 echo >&2; \
 echo >&2 " ERROR: Kernel configuration is invalid."; \
 echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
 echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
 echo >&2 ; \
 /bin/false)
 make -f ./scripts/Makefile.build obj=.. \
 single-build= \
 need-builtin=1 need-modorder=1
 scripts/Makefile.build:44: ../Makefile: No such file or directory
 make[3]: *** No rule to make target '../Makefile'. Stop.
 make[2]: *** [Makefile:1848: ..] Error 2
 make[2]: Leaving directory '/usr/src/linux-headers-5.11.0-25-generic'
 NVIDIA: left KBUILD.
 nvidia.ko failed to build!
 make[1]: *** [Makefile:202: nvidia.ko] Error 1
 make[1]: Leaving directory '/var/lib/dkms/nvidia-340/340.108/build'
 make: *** [Makefile:222: ../Module.symvers] Error 2
 make: Leaving directory '/var/lib/dkms/nvidia-340/340.108/build/uvm'
DKMSKernelVersion: 5.11.0-25-generic
Date: Mon Aug 2 16:20:23 2021
Package: nvidia-340 340.108-0ubuntu5.20.04.2
PackageVersion: 340.108-0ubuntu5.20.04.2
SourcePack...

Read more...

Revision history for this message
Alberto Milone (albertomilone) wrote :

Sorry but the NVIDIA 340 driver reached end of life.

Revision history for this message
Ameya Vikram Singh (ameya-v-singh) wrote (last edit ):

Would it still be possible to get a version which might be compatible with Linux Kernel 5.11 in Ubuntu 20.04?

Revision history for this message
gulos (gulos) wrote :

To anyone coming to this bug, please see the instructions in #49, https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+bug/1872950/comments/49:

sudo add-apt-repository ppa:kelebek333/nvidia-legacy
sudo apt update
sudo apt install nvidia-340

Nvidia drivers maintained in this ppa:
https://launchpad.net/~kelebek333/+archive/ubuntu/nvidia-legacy

Working well for me on 5.11.0-38 kernel.

Revision history for this message
Heinrich Stoellinger (hstoellinger1) wrote :

Does the patch also work for Kubuntu 21.04?

Revision history for this message
sally (julesflwr) wrote :

It is still working for me.

On 11/25/21 5:17 AM, Heinrich Stoellinger wrote:
> Does the patch also work for Kubuntu 21.04?
>

Revision history for this message
Heinrich Stoellinger (hstoellinger1) wrote :

Thanks for trying to help!
When trying to do "sudo apt install nvidia-340" I get the message
"Fehler: Umbenennen beinhaltet Überschreiben von /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib mit
/usr/lib/x86_64-linux-gnu/libGL.so.1 nicht erlaubt".
Roughly translated to English...
"Error: rename includes overwriting of /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib with
/usr/lib/x86_64-linux-gnu/libGL.so.1. This is not allowed".
I have looked at the permission properties of the respective symbolic links and files, set them to 777 --- but to no avail.
Any ideas?
Thanks again for your help!
Regards from snowy (first time this autumn!) Austria

Revision history for this message
Heinrich Stoellinger (hstoellinger1) wrote :

Hello,
I have given up on the Nvidia-driver, moving on the Kubuntu 21.10 and consequently Nouveau...
Thanks again

Revision history for this message
sally (julesflwr) wrote :

Is there an Nvidia-340 driver for Ubuntu-22.04 kernel 5.15? Thank you.

Revision history for this message
satmandu (satadru-umich) wrote :

You can use https://launchpad.net/~kelebek333/+archive/ubuntu/nvidia-legacy for support on jammy, but why bother?

The legacy Nvidia driver doesn't support Wayland with mutter, so you're probably better off just using the nouveau driver anyways.

Revision history for this message
nmaxx (nmaxx) wrote :

Many thanks to Butterfly (kelebek333) for the PPA. :)

I can finally use the HWE kernel on Linux Mint 20 with my old GeForce 8400GS.
I tried nouveau, but on that card it is essentially software-rendering speed we're talking about (10-20 fps in dxx-rebirth vs. ~200 fps with the 340 drivers).

Revision history for this message
sally (julesflwr) wrote :

I second nmaxx's thanks. Nouveau is very slow and my old laptop also has the GeForce 8400GS GPU
so I was very glad to see the update.

Revision history for this message
Lucas Gallindo (lgallindo) wrote :

I just got this issue after a clean install of LUbuntu 22.04.

Revision history for this message
vatbier (vatbier) wrote :

@Butterfly

Hi kelebek333, can you add patches for 22.10 (kernel 5.19) and 23.04 (6.2) ?

In inttf-nvidia-patcher.sh (from https://www.if-not-true-then-false.com/2020/inttf-nvidia-patcher/ ) I see there are these newer patches:
      'kernel-5.16.patch'
      'kernel-5.17.patch'
      'kernel-5.18.patch'
      'kernel-6.0.patch'
      'kernel-6.2.patch'

Thanks in advance! Your ppa is much appreciated!
(Currently running your packages on Kubuntu 22.04)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.