Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 41

Thread: new kernel 6.5.0-14(22.04) can not compile NVIDIA display card driver

  1. #21
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: new kernel 6.5.0-14(22.04) can not compile NVIDIA display card driver

    Quote Originally Posted by johndpope View Post
    almost helpful - but hit a snag - need step 0 to be remove existing alternatives.
    Code:
    error - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12 -(torch2) ➜  ~ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12update-alternatives: error: alternative g++ can't be slave of gcc: it is a master alternative
    
    sudo update-alternatives --remove gcc /usr/bin/gcc-11sudo update-alternatives --remove gcc /usr/bin/gcc-12sudo update-alternatives --remove g++ /usr/bin/g++-11sudo update-alternatives --remove g++ /usr/bin/g++-12
    A few different ways...

    The correct way for most people...

    List what is there in that section:
    Code:
    $ sudo update-alternatives --list gcc
    /usr/bin/gcc-10
    /usr/bin/gcc-11
    /usr/bin/gcc-12
    Remove one
    Code:
    $ sudo update-alternatives --remove gcc /usr/bin/gcc-10
    $ sudo update-alternatives --list 
    /usr/bin/gcc-11
    /usr/bin/gcc-12
    Remove all... in gcc
    Code:
    $ sudo update-alternatives --remove-all gcc
    Removes all

    The alternate methods
    Code:
    $ grep . /var/lib/dpkg/alternatives/gcc
    manual
    /usr/bin/gcc
    g++
    /usr/bin/g++
    gcov
    /usr/bin/gcov
    /usr/bin/gcc-11
    10
    /usr/bin/g++-10
    /usr/bin/gcov-10
    11
    /usr/bin/g++-11
    /usr/bin/gcov-11
    /usr/bin/gcc-12
    12
    /usr/bin/g++-12
    /usr/bin/gcov-12
    Open & edit the file to remove one...
    Code:
    sudo nano /var/lib/dpkg/alternatives/gcc
    Remove one (manually)
    Code:
    manual
    /usr/bin/gcc
    g++
    /usr/bin/g++
    gcov
    /usr/bin/gcov
    /usr/bin/gcc-11
    10
    /usr/bin/g++-10
    /usr/bin/gcov-10
    11
    /usr/bin/g++-11
    /usr/bin/gcov-11
    /usr/bin/gcc-12
    12
    /usr/bin/g++-12
    /usr/bin/gcov-12
    Remove all (manually)
    Code:
    sudo rm /var/lib/dpkg/alternatives/gcc
    With manually, one typo and it's toast. Keep a backup to restore, or delete and start over.

    EDIT: For FYI... If you do this, that is all the sections within update-alternatives.
    Code:
    ls /var/lib/dpkg/alternatives/
    Last edited by MAFoElffen; January 18th, 2024 at 12:22 AM. Reason: typo

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  2. #22
    Join Date
    Jan 2024
    Beans
    1

    Re: new kernel 6.5.0-14(22.04) can not compile NVIDIA display card driver

    Quote Originally Posted by MAFoElffen View Post
    ...
    NVidia drivers sometime have a problem compiling the drivers if there is too much of a difference between the installed compiler and the version of compiler the running kernel was compiled with... Solution- install that compiler. This works right now for recently supported drivers (with kernel 6.5.0), but not currently for legacy drivers. For that work-around, skip this, and see below to run the working kernel...
    ...
    What would you define as a legacy driver? I looked it up and found the following link from Nvidia that mention legacy cards: https://www.nvidia.com/en-us/drivers/unix/legacy-gpu/
    Yet my graphics card wasn't listed (GTX 960).
    Doing the non-legacy card steps didn't resolve the issues I encountered (FPS drops while gaming), but doing your legacy steps did resolve my issues.
    In order to help other people that come across this thread, is the link I provided a good but incomplete list of legacy cards? or is there a more comprehensive list or rule to establish this?

    Thanks for all of your help!

  3. #23
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: new kernel 6.5.0-14(22.04) can not compile NVIDIA display card driver

    If you did
    Code:
    sudo lspci -nnnk | grep -A3 -E 'VGA|Display|3D'
    By the chip ID, looked up here: http://us.download.nvidia.com/XFree8...rtedchips.html

    You will see that that card is still supported by the 535.154.05 driver...

    I go the the Nvidia Driver support page and look up the GPU, then look at the readme's to see what is supported.
    I often visit these two links first:
    https://www.nvidia.com/en-us/drivers/unix/
    https://www.nvidia.com/download/find.aspx

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  4. #24
    Join Date
    Apr 2009
    Location
    Aotearoha
    Beans
    2,692
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: new kernel 6.5.0-14(22.04) can not compile NVIDIA display card driver

    Near future crystal ball gazing:
    The Nvidia Maxwell 900s & Pascal 1000 will not be supported by the new open source kernel module because they do not have the GSP processor.
    Both nouveau & Nvidia will use the new module.
    The Maxwell & Pascal cards have very bad support in nouveau because the firmware is not available or not distributable..
    So It is possible both of these will be dropped into another legacy version when the open source kernel module is deemed to be stable/feature set complete.

    Cards prior to Maxwell were the sweet-spot for performance with nouveau which is a shame as the 960/970 were a big generational step in the day.

  5. #25
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: new kernel 6.5.0-14(22.04) can not compile NVIDIA display card driver

    Quote Originally Posted by BicyclerBoy View Post
    Near future crystal ball gazing:
    The Nvidia Maxwell 900s & Pascal 1000 will not be supported by the new open source kernel module because they do not have the GSP processor.
    Both nouveau & Nvidia will use the new module.
    The Maxwell & Pascal cards have very bad support in nouveau because the firmware is not available or not distributable..
    So It is possible both of these will be dropped into another legacy version when the open source kernel module is deemed to be stable/feature set complete.

    Cards prior to Maxwell were the sweet-spot for performance with nouveau which is a shame as the 960/970 were a big generational step in the day.
    Nouveau = the Opensource driver... Which does not support "compute" or GSP...

    What are you trying to say? Do you even know what the GPU System Processor is and what they are on? An RTX 4090 does not have GSP turned on by default... Nor will the RTX 5090 when it is released. It takes the non-free firmware to support that, and some other things turned on in non-free modules

    From: http://us.download.nvidia.com/XFree8...EADME/gsp.html
    Turing and later GPUs are capable of using the GSP firmware by setting the kernel module parameter NVreg_EnableGpuFirmware=1. However, note feature and GPU support limitations below.

    The following GPUs default to using the GSP firmware:
    NVIDIA GPU product Device PCI ID
    Tesla T10 1E37 10DE 1370
    NVIDIA T4G 1EB4 10DE 157D
    Tesla T4 1EB8
    NVIDIA T4 32GB 1EB9
    NVIDIA A100-PG509-200 20B0 10DE 1450
    NVIDIA A100-SXM4-40GB 20B0
    NVIDIA A100-PCIE-40GB 20B1 10DE 145F
    NVIDIA A100-SXM4-80GB 20B2 10DE 1463
    NVIDIA A100-SXM4-80GB 20B2 10DE 147F
    NVIDIA A100-SXM4-80GB 20B2 10DE 1484
    NVIDIA PG506-242 20B3 10DE 14A7
    NVIDIA PG506-243 20B3 10DE 14A8
    NVIDIA A100-PCIE-80GB 20B5 10DE 1533
    NVIDIA PG506-230 20B6 10DE 1491
    NVIDIA PG506-232 20B6 10DE 1492
    NVIDIA A30 20B7 10DE 1532
    NVIDIA A100-PG506-207 20F0 10DE 1583
    NVIDIA A100-PCIE-40GB 20F1 10DE 145F
    NVIDIA A100-PG506-217 20F2 10DE 1584
    NVIDIA A40 2235 10DE 145A
    NVIDIA A10 2236
    NVIDIA A10G 2237
    NVIDIA A16 25B6 10DE 14A9
    NVIDIA A2 25B6 10DE 157E
    NVIDIA A800-80 20F5
    NVIDIA A800-40 20F6
    NVIDIA L40 26B5
    NVIDIA L40G 26B8
    NVIDIA L4 27B8
    But those are all compute modules...

    As for Nouveau. things are well supported (albeit being tragically freaking buggy for a bit last year in the newer kernels for the RTX2060's):
    https://nouveau.freedesktop.org/FeatureMatrix.html
    https://nouveau.freedesktop.org/CodeNames.html

    I don't know. Are you bored? It seems like I spend a lot of time clearing up things that you bring up, to clarify what you mention off-hand which confuses people with their problems... Instead of making things more clear. Are you not here to help and assist people?

    Maybe I should not spend so much time explaining these things to you. I and a few others here help test the Dev systems and drivers. Maybe you should help spend some time helping with that testing so you can see for yourself and what it takes to make them work, and how to fix them when they are not.

    I am really trying my best to be polite.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  6. #26
    Join Date
    Apr 2009
    Location
    Aotearoha
    Beans
    2,692
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: new kernel 6.5.0-14(22.04) can not compile NVIDIA display card driver

    Truly sorry to offend.
    There was discussion around what was legacy.
    What I said was Near future crystal ball gazing .
    I can now see this was not clear enough.
    I was only guessing about the future legacy plans for the Maxwell & Pascal cards.

    As far as I understand none of the newer cards can work well without the GSP support, GTX1650 & later.
    But nouveau is working on this.

  7. #27
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: new kernel 6.5.0-14(22.04) can not compile NVIDIA display card driver

    @BicyclerBoy

    No offense taken at all.

    Maybe we should PM, and clear some things up? If a good idea, please PM me.

    That way we don't muddy us this Thread.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  8. #28
    Join Date
    Feb 2024
    Beans
    4

    Re: new kernel 6.5.0-14(22.04) can not compile NVIDIA display card driver

    Quote Originally Posted by MAFoElffen View Post
    If now solved: Please visit the "Thread Tools" link in the upper right of the page & mark this thread as "Solved"... So that other may find your solution to help them with resolving this problem.

    I have a felling that within the next few years, with how this has been going with kernel series changes, and now the announcement that LTS versions are going to be getting longer support... I'm just going to post both my fixes in this post, so that other may be able to find a solution to their similar problem. Thank you for the opportunity to look into this and helping. That way, we both can share how to solve this for others. I'll get the Moderators to add the link to this post to Post #2 of my Graphics Resolution Sticky.

    To check which Compiler the system is using and compare it to what the current kernel was compiled with:
    Code:
    grep -e 'linux-gnu-gcc-' /proc/version
    uname -r
    gcc --version | grep -e 'gcc'
    To install and change gcc compilers:

    NVidia drivers sometime have a problem compiling the drivers if there is too much of a difference between the installed compiler and the version of compiler the running kernel was compiled with... Solution- install that compiler. This works right now for recently supported drivers (with kernel 6.5.0), but not currently for legacy drivers. For that work-around, skip this, and see below to run the working kernel...

    Install the matching compiler:
    Code:
    sudo apt update
    sudo apt install gcc-12 g++-12
    Look to see which compiler pieces are installed
    Code:
    apt list g{cc,++}-*{0,1,2,3,4,5,6,7,8,9} --installed
    For example, mine:
    Code:
    mafoelffen@msi-ubuntu:~$ apt list g{cc,++}-*{0,1,2,3,4,5,6,7,8,9} --installed
    Listing... Done
    g++-11/jammy-updates,jammy-security,now 11.4.0-1ubuntu1~22.04 amd64 [installed,automatic]
    g++-12/jammy-updates,jammy-security,now 12.3.0-1ubuntu1~22.04 amd64 [installed]
    gcc-11/jammy-updates,jammy-security,now 11.4.0-1ubuntu1~22.04 amd64 [installed,automatic]
    gcc-12/jammy-updates,jammy-security,now 12.3.0-1ubuntu1~22.04 amd64 [installed,automatic]
    
    mafoelffen@msi-ubuntu:~$ ls -larth `find /usr/bin/ -name gcc-*` | grep -v 'nm\|ar\|ra'
    lrwxrwxrwx 1 root root 23 May 13  2023 /usr/bin/gcc-12 -> x86_64-linux-gnu-gcc-12
    lrwxrwxrwx 1 root root 23 May 13  2023 /usr/bin/gcc-11 -> x86_64-linux-gnu-gcc-11
    
    mafoelffen@msi-ubuntu:~$ ls -larth `find /usr/bin/ -name g++-*` | grep -v 'nm\|ar\|ra'
    lrwxrwxrwx 1 root root 23 May 13  2023 /usr/bin/g++-12 -> x86_64-linux-gnu-g++-12
    lrwxrwxrwx 1 root root 23 May 13  2023 /usr/bin/g++-11 -> x86_64-linux-gnu-g++-11
    Add them to an update-alternatives group
    Code:
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12
    Temporarily pick gcc-12
    Code:
    mafoelffen@msi-ubuntu:~$ sudo update-alternatives --config gcc
    
    There are 2 choices for the alternative gcc (providing /usr/bin/gcc).
    
      Selection    Path             Priority   Status
    ------------------------------------------------------------
    * 0            /usr/bin/gcc-12   12        auto mode
      1            /usr/bin/gcc-11   11        manual mode
      2            /usr/bin/gcc-12   12        manual mode
    
    Press <enter> to keep the current choice[*], or type selection number: 2
    Reinstall my driver
    Code:
    sudo apt install --yes nvidia-driver-535 nvidia-dkms-535
    Optionally, install Nvidia Cuda
    Code:
    sudo apt install --yes nvidia-cuda-toolkit
    Reboot to test

    After you are through, rest the compiler back to what it was...
    Code:
    mafoelffen@msi-ubuntu:~$ sudo update-alternatives --config gcc
    There are 2 choices for the alternative gcc (providing /usr/bin/gcc).
    
      Selection    Path             Priority   Status
    ------------------------------------------------------------
      0            /usr/bin/gcc-12   12        auto mode
      1            /usr/bin/gcc-11   11        manual mode
    * 2            /usr/bin/gcc-12   12        manual mode
    
    Press <enter> to keep the current choice[*], or type selection number: 1
    update-alternatives: using /usr/bin/gcc-11 to provide /usr/bin/gcc (gcc) in manual mode
    If this work-around helped, then join this Bug Report as "Also Affects Me": https://ubuntuforums.org/showthread....4#post14175164



    Legacy Drivers: Use 6.2.0 series kernels...
    Code:
    sudo apt remove --purge --yes linux-headers-6.5.0-14-generic linux-image-6.5.0-14-generic linux-modules-6.5.0-14-generic linux-modules-extra-6.5.0-14-generic
    sudo apt install --reinstall --yes linux-headers-6.2.0-39-generic linux-image-6.2.0-39-generic linux-modules-6.2.0-39-generic linux-modules-extra-6.2.0-39-generic
    sudo apt-mark hold linux-headers-6.2.0-39-generic linux-image-6.2.0-39-generic linux-modules-6.2.0-39-generic linux-modules-extra-6.2.0-39-generic
    When they come up with a fix to compile NVidia Legacy drivers with Linux kernel 6.5 series kernels, then you can re-add that kernel series by unpinning the kernels via
    Code:
    sudo apt-mark unhold linux-headers-6.2.0-39-generic linux-image-6.2.0-39-generic linux-modules-6.2.0-39-generic linux-modules-extra-6.2.0-39-generic
    sudo apt update && sudo apt upgrade
    Hello,

    I would not say that this issue is solved!

    My Ubuntu is 22.04, and I installed the kernel 6.5 recently, at first it worked with the driver 535 from Nvidia in the first try, after I installed kernel 6.5 from Ubuntu Mainline Kernel Installer, but then, 2 days later my Ubuntu was failling to boot, after an automatic update. Then, looking in the foruns and reading about why nvidia driver would fail, I went to look about the version this kernel used from GCC, and there was version 13!

    Why it would automatically update the kernel to a version that is compiled with an umcompatible version of GCC?

    Then, that is the reason that I cant use the nvidia driver (535), even trying to follow the steps of this tutorial.

    So, what solution I have to fix this issue and be able to install nvidia driver?

  9. #29
    Join Date
    Mar 2011
    Beans
    1,994

    Re: new kernel 6.5.0-14(22.04) can not compile NVIDIA display card driver

    It is not clear to me where you got the 6.5 kernel you mention compiled with gcc-13, but the kernel 6.5 from the hwe packages uses the gcc-12 compiler.
    $ sudo strings vmlinuz-6.5.0-15-generic |grep gcc
    Agcc,
    6.5.0-15-generic (buildd@bos03-amd64-040) (x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #15~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 12 18:54:30 UTC 2

    The dependencies have been added to make the gcc-12 download also with the 6.5 kernel, and it gets used to build the nvidia.ko module automatically, no /bin/gcc link changes needed. Select the nvidia driver from the Software & Updates/Additional Drivers tab, apply changes, and the progress bar should complete without errors, automatically using the gcc-12.

  10. #30
    Join Date
    Feb 2024
    Beans
    4

    Re: new kernel 6.5.0-14(22.04) can not compile NVIDIA display card driver

    Quote Originally Posted by ubfan1 View Post
    It is not clear to me where you got the 6.5 kernel you mention compiled with gcc-13, but the kernel 6.5 from the hwe packages uses the gcc-12 compiler.
    $ sudo strings vmlinuz-6.5.0-15-generic |grep gcc
    Agcc,
    6.5.0-15-generic (buildd@bos03-amd64-040) (x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #15~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 12 18:54:30 UTC 2

    The dependencies have been added to make the gcc-12 download also with the 6.5 kernel, and it gets used to build the nvidia.ko module automatically, no /bin/gcc link changes needed. Select the nvidia driver from the Software & Updates/Additional Drivers tab, apply changes, and the progress bar should complete without errors, automatically using the gcc-12.
    When typing
    Code:
    cat /proc/version
    This is what I get
    Code:
    Linux version 6.5.0-060500-generic (kernel@kathleen) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-6ubuntu1) 13.2.0, GNU ld (GNU Binutils for Ubuntu) 2.41) #202308271831 SMP PREEMPT_DYNAMIC Thu Nov 16 11:17:07 UTC 2023
    Attached Images Attached Images
    Last edited by ajgreeny; February 10th, 2024 at 09:35 AM. Reason: Unneeded large image removed

Page 3 of 5 FirstFirst 12345 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •