Needs update for new Nvidia graphics cards #11

Closed
opened 2024-08-31 06:47:12 +00:00 by romangg · 21 comments
romangg commented 2024-08-31 06:47:12 +00:00 (Migrated from gitlab2.manjaro.org)

For newer cards, install the open driver by default.

Notes:

  • CachyOS has (re)written the tool in Rust as chwd. Limited to DKMS drivers.
  • Garuda's MHWD is rebranded from us but in active development. Limited to DKMS drivers.
  • BigLinux just uses a script
For newer cards, install the open driver by default. Notes: - CachyOS has (re)written the tool in Rust as [chwd](https://github.com/CachyOS/chwd). Limited to DKMS drivers. - Garuda's [MHWD](https://gitlab.com/garuda-linux/applications/mhwd-garuda) is rebranded from us but in active development. Limited to DKMS drivers. - BigLinux just uses a [script](https://github.com/biglinux/mhwd-biglinux)
romangg commented 2024-08-31 06:47:12 +00:00 (Migrated from gitlab2.manjaro.org)

assigned to @philm

assigned to @philm
philm commented 2024-08-31 11:07:33 +00:00 (Migrated from gitlab2.manjaro.org)

Those open drivers don't work yet for all cards and if you have a mixed setup Nvidia still recommends the proprietary ones. So far we still ship the later for all cards, even new ones. We have to figure out in which Debian package that helper script got added and how to extract that one.

Ubuntu has their own ubuntu-drivers tool but didn't adopt to 560 series yet at all.
CachyOS tool I checked. We can't use that on our end. It is too specific coded for that distro. Garuda and others might only update their DB but didn't do much with the mhwd script yet. Only alter it to work with standard Arch.

So it is better to integrate the Nvidia detection tool to install the needed drivers or get at least its recommendation. 560 release we might not ship any time soon anyway to testing nor stable. It is a feature driver and has still a lot of issues reported: https://forums.developer.nvidia.com/t/560-release-feedback-discussion/300830

Those open drivers don't work yet for all cards and if you have a mixed setup Nvidia still recommends the proprietary ones. So far we still ship the later for all cards, even new ones. We have to figure out in which Debian package that helper script got added and how to extract that one. Ubuntu has their own ubuntu-drivers tool but didn't adopt to 560 series yet at all. CachyOS tool I checked. We can't use that on our end. It is too specific coded for that distro. Garuda and others might only update their DB but didn't do much with the mhwd script yet. Only alter it to work with standard Arch. So it is better to integrate the Nvidia detection tool to install the needed drivers or get at least its recommendation. 560 release we might not ship any time soon anyway to testing nor stable. It is a feature driver and has still a lot of issues reported: https://forums.developer.nvidia.com/t/560-release-feedback-discussion/300830
yochananmarqos1 commented 2024-08-31 16:19:23 +00:00 (Migrated from gitlab2.manjaro.org)

changed the description

changed the description
yochananmarqos1 commented 2024-08-31 16:36:11 +00:00 (Migrated from gitlab2.manjaro.org)

changed the description

changed the description
yochananmarqos1 commented 2024-09-02 17:25:11 +00:00 (Migrated from gitlab2.manjaro.org)

The supported-gpus.json in the NVIDIA driver source .run file can be used to check if a card is supported by the open kernel driver. The file is not currently installed in the nvidia-utils packages, however it could be installed to /usr/share/doc/nvidia-utils/ or something.

Get the device ID:

❯ cat /sys/bus/pci/devices/0000:01:00.0/device
0x2520

Check if the device has the kernelopen feature:

❯ jq '.chips[] | select(.devid=="0x2520")' < supported-gpus.json
{
  "devid": "0x2520",
  "name": "NVIDIA GeForce RTX 3060 Laptop GPU",
  "features": [
    "dpycbcr420",
    "dpgsynccompatible",
    "hdmi4k60rgb444",
    "hdmigsynccompatible",
    "runtimepm",
    "vdpaufeaturesetK",
    "kernelopen"
  ]
}
The `supported-gpus.json` in the NVIDIA driver source `.run` file can be used to check if a card is supported by the open kernel driver. The file is not currently installed in the `nvidia-utils` packages, however it could be installed to `/usr/share/doc/nvidia-utils/` or something. Get the device ID: ``` ❯ cat /sys/bus/pci/devices/0000:01:00.0/device 0x2520 ``` Check if the device has the `kernelopen` feature: ``` ❯ jq '.chips[] | select(.devid=="0x2520")' < supported-gpus.json { "devid": "0x2520", "name": "NVIDIA GeForce RTX 3060 Laptop GPU", "features": [ "dpycbcr420", "dpgsynccompatible", "hdmi4k60rgb444", "hdmigsynccompatible", "runtimepm", "vdpaufeaturesetK", "kernelopen" ] } ```
yochananmarqos1 commented 2024-09-03 00:42:50 +00:00 (Migrated from gitlab2.manjaro.org)

Those open drivers don't work yet for all cards and if you have a mixed setup Nvidia still recommends the proprietary ones.

Source, please?

We have to figure out in which Debian package that helper script got added...

I already did and mentioned it in the Team Sync Matrix channel. NVIDIA provides nvidia-driver-assistant packages for various distros with DEBs and RPMs, however nothing Arch based is supported.

It's just a Python script referencing the supported-gpus.json (included in the package). We'd have to completely rewrite it to adapt. Either way, isn't that what MHWD is already for?

Main repo:

https://developer.download.nvidia.com/compute/cuda/repos/ distro / architecture / package

> Those open drivers don't work yet for all cards and if you have a mixed setup Nvidia still recommends the proprietary ones. Source, please? > We have to figure out in which Debian package that helper script got added... I already did and mentioned it in the Team Sync Matrix channel. NVIDIA provides `nvidia-driver-assistant` packages for various distros with DEBs and RPMs, however nothing Arch based is supported. It's just a Python script referencing the `supported-gpus.json` (included in the package). We'd have to completely rewrite it to adapt. Either way, isn't that what MHWD is already for? Main repo: https://developer.download.nvidia.com/compute/cuda/repos/ distro / architecture / package
bigbruno commented 2024-11-20 15:46:18 +00:00 (Migrated from gitlab2.manjaro.org)

I think that having an official script from nvidia recommending the driver version, it would be more practical to get the information from their script and if necessary create exceptions if they are needed for specific situations.

I made a simple script to extract the script and the json from the .deb package:

get-nvidia-driver-assistant

show-driver is a really simple script to use verbose mode and filter the recommended driver, this way we can get the recommended driver even if we are on a distribution not supported by the official nvidia script:

show-driver

One point that is not directly related to Nvidia, but is a problem that has been occurring a lot in relation to Nvidia, is that Plasma rendering in Software mode, which sometimes occurs with the Nvidia driver, generates problems in the Plasma taskbar and all the icons accumulate on the left side of the screen.

A few weeks ago I identified that it was a problem in Kirigami and reported the location of the problem via Telegram, it was resolved and is already in the Manjaro Testing repository, when it goes to Stable it should reduce one of the most recurring problems I have seen with Nvidia users.

I think that having an official script from nvidia recommending the driver version, it would be more practical to get the information from their script and if necessary create exceptions if they are needed for specific situations. I made a simple script to extract the script and the json from the .deb package: [get-nvidia-driver-assistant](/uploads/844a8366cb2203dc11e00f132ba543c5/get-nvidia-driver-assistant) show-driver is a really simple script to use verbose mode and filter the recommended driver, this way we can get the recommended driver even if we are on a distribution not supported by the official nvidia script: [show-driver](/uploads/9003e5937e86aa281b5e255f33e88bf4/show-driver) One point that is not directly related to Nvidia, but is a problem that has been occurring a lot in relation to Nvidia, is that Plasma rendering in Software mode, which sometimes occurs with the Nvidia driver, generates problems in the Plasma taskbar and all the icons accumulate on the left side of the screen. A few weeks ago I identified that it was a problem in Kirigami and reported the location of the problem via Telegram, it was resolved and is already in the Manjaro Testing repository, when it goes to Stable it should reduce one of the most recurring problems I have seen with Nvidia users.
philm commented 2024-11-23 02:05:56 +00:00 (Migrated from gitlab2.manjaro.org)

@bigbruno I created now a package out of that: https://gitlab.manjaro.org/packages/extra/nvidia-driver-assistant. We might need to enhance the script to give the user suggested cmds to install the drivers. For now it only shows the recommended driver.

@bigbruno I created now a package out of that: https://gitlab.manjaro.org/packages/extra/nvidia-driver-assistant. We might need to enhance the script to give the user suggested cmds to install the drivers. For now it only shows the recommended driver.
fhdk commented 2024-11-23 07:51:58 +00:00 (Migrated from gitlab2.manjaro.org)

@philm as per your request I look into the driver tool.

The driver tool generates an install command which the user can choose to install using the --install argument.

How are we going to install the drivers - using mhwd or using pacman?

/fhdk/nvidia-driver-assistant

@philm as per your request I look into the driver tool. The driver tool generates an install command which the user can choose to install using the --install argument. How are we going to install the drivers - using mhwd or using pacman? [/fhdk/nvidia-driver-assistant](https://gitlab.manjaro.org/fhdk/nvidia-driver-assistant)
fhdk commented 2024-11-23 08:33:40 +00:00 (Migrated from gitlab2.manjaro.org)

I don't own a system with Nvidia GPU

Can you provide such output - showing the recommended driver?

Perhaps @bigbruno can collect some samples for me to work with?

I don't own a system with Nvidia GPU Can you provide such output - showing the recommended driver? Perhaps @bigbruno can collect some samples for me to work with?
philm commented 2024-11-23 09:22:06 +00:00 (Migrated from gitlab2.manjaro.org)

I think we should aim for pacman and using the dkms packages for simplicity. mhwd can then use a similar function to define when mhwd is installing the compiled extramodules per kernel.

I think we should aim for pacman and using the dkms packages for simplicity. mhwd can then use a similar function to define when mhwd is installing the compiled extramodules per kernel.
philm commented 2024-11-23 09:36:38 +00:00 (Migrated from gitlab2.manjaro.org)

Seems we need to add Version_ID also to the os-release file:

nvidia-driver-assistant --verbose
DEBUG:root:get_nvidia_devices(): Processing Vendor: 10DE, Device ID: 0x28A0, class 0x0300
DEBUG:root:pci:v000010DEd000028A0sv00001D05sd00001295bc03sc00i00
Detected GPUs:
  NVIDIA GeForce RTX 4060 Laptop GPU - (pci_id 0x28A0)

DEBUG:root:recommend_driver(): Do device IDs support the open driver?
DEBUG:root:recommend_driver(): using json logic
DEBUG:root:recommend_driver(): all devices support open
DEBUG:root:Recommended driver: open
DEBUG:root:get_distro(): detected manjaro 24.2.0 distribution is supported
Detected system:
  Manjaro Linux 24.2.0

DEBUG:root:OS detected: manjaro
Please copy and paste the following command to install the open kernel module flavour:
  sudo pacman -S KERNEL-nvidia-open
Seems we need to add Version_ID also to the os-release file: ``` nvidia-driver-assistant --verbose DEBUG:root:get_nvidia_devices(): Processing Vendor: 10DE, Device ID: 0x28A0, class 0x0300 DEBUG:root:pci:v000010DEd000028A0sv00001D05sd00001295bc03sc00i00 Detected GPUs: NVIDIA GeForce RTX 4060 Laptop GPU - (pci_id 0x28A0) DEBUG:root:recommend_driver(): Do device IDs support the open driver? DEBUG:root:recommend_driver(): using json logic DEBUG:root:recommend_driver(): all devices support open DEBUG:root:Recommended driver: open DEBUG:root:get_distro(): detected manjaro 24.2.0 distribution is supported Detected system: Manjaro Linux 24.2.0 DEBUG:root:OS detected: manjaro Please copy and paste the following command to install the open kernel module flavour: sudo pacman -S KERNEL-nvidia-open ```
fhdk commented 2024-11-23 10:02:38 +00:00 (Migrated from gitlab2.manjaro.org)

https://www.linux.org/docs/man5/os-release.html

that would be - in this case 24.2.0

https://www.linux.org/docs/man5/os-release.html that would be - in this case `24.2.0`
philm commented 2024-11-23 10:03:21 +00:00 (Migrated from gitlab2.manjaro.org)

I used rolling for now since it is part of the filesystem package.

I used rolling for now since it is part of the filesystem package.
philm commented 2024-11-23 10:04:35 +00:00 (Migrated from gitlab2.manjaro.org)

I added more lines of code and got to this one now:

python ./nvidia-driver-assistant --verbose
DEBUG:root:get_nvidia_devices(): Processing Vendor: 10DE, Device ID: 0x28A0, class 0x0300
DEBUG:root:pci:v000010DEd000028A0sv00001D05sd00001295bc03sc00i00
Detected GPUs:
  NVIDIA GeForce RTX 4060 Laptop GPU - (pci_id 0x28A0)

DEBUG:root:recommend_driver(): Do device IDs support the open driver?
DEBUG:root:recommend_driver(): using json logic
DEBUG:root:recommend_driver(): all devices support open
DEBUG:root:Recommended driver: open
DEBUG:root:get_distro(): detected manjaro rolling distribution is supported
Detected system:
  Manjaro Linux rolling

DEBUG:root:OS detected: manjaro
Please copy and paste the following command to install the open kernel module flavour:
  sudo pacman -S linux612-nvidia-open


python ./nvidia-driver-assistant --install
Detected GPUs:
  NVIDIA GeForce RTX 4060 Laptop GPU - (pci_id 0x28A0)

Detected system:
  Manjaro Linux rolling

Using the NVIDIA driver implies acceptance of the NVIDIA Software
License Agreement, contained in the "LICENSE" file in the
"/usr/share/nvidia-driver-assistant/driver_eula" directory

Installing the following package for the open kernel module flavour:
  sudo pacman -S linux612-nvidia-open

Error: failed to execute the following command:
  sudo pacman -S linux612-nvidia-open
I added more lines of code and got to this one now: ``` python ./nvidia-driver-assistant --verbose DEBUG:root:get_nvidia_devices(): Processing Vendor: 10DE, Device ID: 0x28A0, class 0x0300 DEBUG:root:pci:v000010DEd000028A0sv00001D05sd00001295bc03sc00i00 Detected GPUs: NVIDIA GeForce RTX 4060 Laptop GPU - (pci_id 0x28A0) DEBUG:root:recommend_driver(): Do device IDs support the open driver? DEBUG:root:recommend_driver(): using json logic DEBUG:root:recommend_driver(): all devices support open DEBUG:root:Recommended driver: open DEBUG:root:get_distro(): detected manjaro rolling distribution is supported Detected system: Manjaro Linux rolling DEBUG:root:OS detected: manjaro Please copy and paste the following command to install the open kernel module flavour: sudo pacman -S linux612-nvidia-open python ./nvidia-driver-assistant --install Detected GPUs: NVIDIA GeForce RTX 4060 Laptop GPU - (pci_id 0x28A0) Detected system: Manjaro Linux rolling Using the NVIDIA driver implies acceptance of the NVIDIA Software License Agreement, contained in the "LICENSE" file in the "/usr/share/nvidia-driver-assistant/driver_eula" directory Installing the following package for the open kernel module flavour: sudo pacman -S linux612-nvidia-open Error: failed to execute the following command: sudo pacman -S linux612-nvidia-open ```
fhdk commented 2024-11-23 10:06:23 +00:00 (Migrated from gitlab2.manjaro.org)

The instructions and branch_instructions dictionary at the top of the file contains the commands which is either printed as a hint or executed when --install is used.

Also I have a manjaro_get_kernel_package() extracting from platform.release()

The instructions and branch_instructions dictionary at the top of the file contains the commands which is either printed as a hint or executed when --install is used. Also I have a manjaro_get_kernel_package() extracting from platform.release()
fhdk commented 2024-11-23 10:13:28 +00:00 (Migrated from gitlab2.manjaro.org)

If we aim for pacman and dkms

  • nvidia-390xx-{dkms,settings,utils}
  • nvidia-470xx-{dkms,settings,utils}
  • nvidia-{dkms,settings,utils}
  • nvidia-open-{dkms,settings,utils}
  • nvidia-prime

Then there is opencl packages and cuda

Refactoring for Arch should be simple once we got the Manjaro part right.

If we aim for pacman and dkms - nvidia-390xx-{dkms,settings,utils} - nvidia-470xx-{dkms,settings,utils} - nvidia-{dkms,settings,utils} - nvidia-open-{dkms,settings,utils} - nvidia-prime Then there is opencl packages and cuda Refactoring for Arch should be simple once we got the Manjaro part right.
philm commented 2024-11-23 10:19:44 +00:00 (Migrated from gitlab2.manjaro.org)

For now I went for this simple solution: gitlab.manjaro.org/packages/extra/nvidia-driver-assistant/-@931501cf68 We still have to package the open drivers as binary extramodules.

For now I went for this simple solution: https://gitlab.manjaro.org/packages/extra/nvidia-driver-assistant/-/commit/931501cf6842c9974245fe727526aa4c55962aa1 We still have to package the open drivers as binary extramodules.
philm commented 2024-11-23 11:05:51 +00:00 (Migrated from gitlab2.manjaro.org)

@fhdk branches seems only to work for Ubuntu and 560+ drivers. We have to see if the script would also detect the legacy branches like 470xx and 390xx. For Ubuntu driver branches would be like this:

nvidia-driver-470
nvidia-driver-470-server
nvidia-driver-535
nvidia-driver-535-open
nvidia-driver-535-server
nvidia-driver-535-server-open
nvidia-driver-550
nvidia-driver-550-open
nvidia-driver-550-server
nvidia-driver-550-server-open

Ours would be:

KERNEL-nvidia-390xx
KERNEL-nvidia-470xx
KERNEL-nvidia
KENREL-nvidia-open

We might need some similar to ubuntu_get_latest_driver_branch() if we want to add legacy driver support to this tool.

@fhdk branches seems only to work for Ubuntu and 560+ drivers. We have to see if the script would also detect the legacy branches like 470xx and 390xx. For Ubuntu driver branches would be like this: ``` nvidia-driver-470 nvidia-driver-470-server nvidia-driver-535 nvidia-driver-535-open nvidia-driver-535-server nvidia-driver-535-server-open nvidia-driver-550 nvidia-driver-550-open nvidia-driver-550-server nvidia-driver-550-server-open ``` Ours would be: ``` KERNEL-nvidia-390xx KERNEL-nvidia-470xx KERNEL-nvidia KENREL-nvidia-open ``` We might need some similar to `ubuntu_get_latest_driver_branch()` if we want to add legacy driver support to this tool.
philm commented 2024-11-23 11:17:39 +00:00 (Migrated from gitlab2.manjaro.org)

This small script might be needed to been added to the MHWDCONFIG file to get the module righ:

#!/bin/bash

DEPKMOD="nvidia"
[[ "$(nvidia-recommended-driver)" == "open" ]] && DEPKMOD="nvidia-open"

echo "Recommended module: $DEPKMOD"
This small script might be needed to been added to the MHWDCONFIG file to get the module righ: ``` #!/bin/bash DEPKMOD="nvidia" [[ "$(nvidia-recommended-driver)" == "open" ]] && DEPKMOD="nvidia-open" echo "Recommended module: $DEPKMOD" ```
philm commented 2025-01-13 04:58:02 +00:00 (Migrated from gitlab2.manjaro.org)
Added via https://gitlab.manjaro.org/applications/mhwd-db/-/commit/6ecc10b3476688aa3d54f8c80f2f2b317cea0543
yochananmarqos1 (Migrated from gitlab2.manjaro.org) closed this issue 2025-10-03 16:09:57 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
applications/mhwd-db#11
No description provided.