390 seems to wait NV for new driver. or use fallback kernel to 6.2 or lower. I also guess you can try ubuntu repo’s driver, maybe can work.
In ubuntu forum, someone says the latest kernel (6.5.0-14) is compiled by GCC12. That is why the NV binary driver can only compiled by GCC12. Maybe NV newer drivers will only support GCC12. That means some old display card maybe not supported by new kernel.
That’s what i’m afraid to understand … i already tried to revert to preceding kernel with no luck … i guess i need to revert even further …
Thanks anyway :)
Nvidia team, any official statement on this, please ?
Same here i tried to fall back to 6.2 and didn’t work, tried to fall back to 5.15 and i got stuck when booting to black screen and blinking cursor :"(
i manually installed nvidia-driver-418 using sudo apt install nvidia-driver-418 with gcc 12 and it’s working fine and my gpu is recognized in ubuntu settings
i can now choose the version of gcc to use for compilation (from ubuntu forum) :
it prioritize gcc-12 over gcc-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
sudo update-alternatives --config gcc
(select gcc-12 here)
before compiling i purged all nvidia files with :
sudo apt autoremove nvidia* --purge
then manually compilie/intall with :
sudo apt install nvidia-driver-390
as expected no dice, same error :(
then tried (after purging again)
sudo apt install nvidia-driver-418
which fetches nvidia-dkms-470 … driver stuff. It compiled fine but refused to install at reboot saying that 470 driver will ignore my card, i need the nvidia-390 driver !
This problem has happened before, we just have to wait a while for the problem to be solved, for now you can start Ubuntu with a previous kernel which must be version 6.2, greetings…
ok, solved
My card doesn’t support drivers above 390 and it is not maintained any more by nvidia
my only option was to revert back to kernel 5.15 (6.2 doesn’t work either)
after removal of those kernel and GRUB cleaning all is well apparently now !
After you uninstall the driver, ubuntu can not enter desktop certainly. When you enter black screen, press ctrl-F1~F6, you can enter txt command, and you can install the driver. If you have installed ssh tool, you can also loggin from other client, when black screen. After you install the driver, you can see the graphic desktop. Now i have uninstall GCC11 and install GCC12 instead, the 535 driver works well with now kernel 6.5.0-14. Of course, if you need to use GCC11, you can use update-alternatives command to keep and switch both GCC11 and 12.
I attempted the solution found here, selected gcc-12, tried to recompile (after doing a full purge removal of nvidia*) and (by) reinstalling nvidia-dkms-535 Ubuntu package.
I confirm in the crash log /var/crash/nvidia-kernel-source-535.0.crash that indeed I am using GCC 12, but compilation fails with
/var/lib/dkms/nvidia/535.54.03/build/common/inc/nv-mm.h:88:16 error: too many arguments to function ‘get_user_pages’
It appears that the call in nv-mm.h is
return get_user_pages(current, current–>mm, start, nr_pages, write…
Whereas what is defined in linux/mm.h is
get_user_pages(start, nr_pages, …
You can try to kick out the general display dirver by modifying the blacklist.conf. Then try to download the latest binary drivers(535.146.02) from NVIDIA website and install. That’s all right run with kernel 6.5.0-14 and GCC12. By the way, after you block the general driver and reboot, the graphic desktop maybe not start. You need to press ctrl+F1~F6 to enter txt command and install the driver.
Thank you. I will give this a shot in the morning, and let you know how it goes. Hopefully soon this gets resolved with Ubuntu and the DKMS approach. It appreciate the set-it-forget-it nature of that solution.
In the meanwhile, I reverted to GCC-11 and linux 6.2, which is working.
Thank for all. Now this problem has been resolved. ‘MAFoElffen’ in Ubuntu forum has written the whole solution in bottom of my post.
[SOLVED] new kernel 6.5.0-14(22.04) can not compile NVIDIA display card driver - Page 2 (ubuntuforums.org)
there is an idea for 390.157 drive. it works for me.
- apply this patch
- change all “vma->flags”
- remove or comment out line with
nv_drm_driver.dumb_destroyfrom.../nvidia-drm/nvidia-drm-drv.c - add “include <drm/drm_modeset_helper.h>” to “…/nvidia-drm/nvidia-drm-fb.c” on line 32
- build modules again
keep it mind it’s not official fix.
Just wanted to add that I got bitten by this too last week: am running 22.04+515 on my work machine (due to external monitor issues) and it wasn’t able to automatically build the dkms module for kernel 6.5. Booted with a different kernel and then decided to uninstall the HWE kernel package for good measure since I don’t need the latest.
My personal machine didn’t have any problems, but it is 22.04+535. My default gcc is 11 but it looks like 12 is also installed. (12 is also on my work machine so I guess there is something too old about the driver 515.)
Did you find any solution?
My current “solution” is to roll back to 6.2.
I’ve been busy at work, and haven’t had a chance yet to try the solution linked by sakalaboator, which looks to have more complete use of update-alternatives.
When I have tried it I’ll report back.
For the ones looking for a workaround of sorts, the manual install of the 550 driver does not lead to this problem: Linux x64 (AMD64/EM64T) Display Driver | 550.40.07 | Linux 64-bit | NVIDIA
Tested on 23.10, 6.5.0-15-generic.
The same might be true for other driver versions being installed via the same method. So, as long as the driver ppa suffers from the above issue, this may act as a valid way to receive current drivers and keep the equally current kernel versions in place.
Perhaps it also acts as a different starting point in terms of closing in on the actual culprit since, with the manual installation working, the driver files themselves may indeed be fine and not generally at odds with the newer kernel.
If you follow the Link to my posts at Ubuntu Forums post that sakaloator linked with my workarounds… I have a work-around posted for driver nvidia-driver-390…
There is a PPA where someone there recompiled and repackaged the driver to work with the newer kernels.
Never mind. Here is the direct link to that the Bug Report Comment where I posted the work-around for 390: Comment #15 : Bug #2051457 : Bugs : gcc-defaults package : Ubuntu
Surprisingly, this is still an issue at the moment of writing this comment. I cannot update to driver version 550, because this is for an old card (MacBook Pro A1398 with GeForce GT 750M)
I created the patch including all changes described in this thread.
What worked for me was to create a new deb package.
apt-get source nvidia-graphics-drivers-390
cd nvidia-graphics-drivers-390-390.157
copy the patch to debian/dkms_nvidia/
edit the file debian/templates/dkms_nvidia.conf.in to add the patch in the list
PATCH[3]=“buildfix_kernel_6.5.patch”
bump the package version: dch -i
rebuild the package : dpkg-buildpackage -us -uc
then install the resulting package
That would be nice if an Ubuntu dev could pick this up.