Initial SPEC upload (#6120).

el9
Vitaly Zaitsev 3 years ago
parent 4776c85e67
commit 3a25ad197d
No known key found for this signature in database
GPG Key ID: BF99FC6DD45AB90A

1
.gitignore vendored

@ -0,0 +1 @@
/NVIDIA-Linux-x86_64-470.74.run

@ -0,0 +1,4 @@
# RPM Fusion nvidia udev rules
SUBSYSTEM=="pci", ATTRS{vendor}=="0x12d2", ATTRS{class}=="0x030000", TAG+="systemd", ENV{SYSTEMD_WANTS}="nvidia-fallback.service"
SUBSYSTEM=="pci", ATTRS{vendor}=="0x10de", ATTRS{class}=="0x030[02]00", TAG+="systemd", ENV{SYSTEMD_WANTS}="nvidia-fallback.service"

@ -0,0 +1,2 @@
KERNEL=="nvidia_uvm", RUN+="/usr/bin/bash -c '/usr/bin/mknod -m 666 /dev/nvidia-uvm c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'"
KERNEL=="nvidia_uvm", RUN+="/usr/bin/bash -c '/usr/bin/mknod -m 666 /dev/nvidia-uvm-tools c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 1'"

@ -0,0 +1,11 @@
KERNEL=="nvidia", RUN+="/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidiactl c 195 255'"
KERNEL=="nvidia", RUN+="/usr/bin/bash -c 'for i in $$(cat /proc/driver/nvidia/gpus/*/information | grep Minor | cut -d \ -f 4); do /usr/bin/mknod -Z -m 666 /dev/nvidia$${i} c 195 $${i}; done'"
KERNEL=="nvidia_modeset", RUN+="/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidia-modeset c 195 254'"
# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"
# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on"
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on"

@ -0,0 +1,8 @@
# Enable complete power management. From:
# file:///usr/share/doc/nvidia-driver/html/powermanagement.html
enable nvidia-suspend.service
enable nvidia-hibernate.service
# Resume is triggered by nvidia-sleep.sh:
disable nvidia-resume.service

@ -0,0 +1,3 @@
# Omit the nvidia driver from the ramdisk, to avoid needing to regenerate
# the ramdisk on updates.
omit_drivers+=" nvidia nvidia-drm nvidia-modeset nvidia-uvm "

@ -0,0 +1,7 @@
This file is provided by RPMFusion project
Please look for documentation at http://rpmfusion.org/Howto/nVidia
To uninstall the package, use the following command:
$ sudo yum remove xorg-x11-drv-nvidia\* kmod-nvidia\*

@ -0,0 +1,17 @@
[Unit]
Description=Fallback to nouveau as nvidia did not load
After=akmods.service
Before=display-manager.service
ConditionKernelCommandLine=rd.driver.blacklist=nouveau
ConditionPathExists=!/sys/module/nvidia
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=-/sbin/modprobe nouveau
ExecStartPost=-/bin/plymouth message --text="NVIDIA kernel module missing. Falling back to nouveau"
[Install]
WantedBy=graphical.target

@ -0,0 +1,7 @@
#
# Save and restore all video memory allocations.
options nvidia NVreg_PreserveVideoMemoryAllocations=1
#
# The destination should not be using tmpfs, so we prefer
# /var/tmp instead of /tmp
options nvidia NVreg_TemporaryFilePath=/var/tmp

@ -0,0 +1,11 @@
# Make a soft dependency for nvidia-uvm as adding the module loading to
# /usr/lib/modules-load.d/nvidia-uvm.conf for systemd consumption, makes the
# configuration file to be added to the initrd but not the module, throwing an
# error on plymouth about not being able to find the module.
# Ref: /usr/lib/dracut/modules.d/00systemd/module-setup.sh
# Even adding the module is not the correct thing, as we don't want it to be
# included in the initrd, so use this configuration file to specify the
# dependency.
softdep nvidia post: nvidia-uvm

@ -0,0 +1,16 @@
#This file is provided by xorg-x11-drv-nvidia
#Do not edit
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
Option "SLI" "Auto"
Option "BaseMosaic" "on"
EndSection
Section "ServerLayout"
Identifier "layout"
Option "AllowNVIDIAGPUScreens"
EndSection

@ -0,0 +1,61 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 Simone Caronni <negativo17@gmail.com>
# Licensed under the GNU General Public License Version or later
import sys
def main():
if len(sys.argv) != 2:
print("usage: %s README.txt" % sys.argv[0])
return 1
f = open(sys.argv[1])
in_section = False
in_table = False
pids = []
sections = ["NVIDIA GEFORCE GPUS", "NVIDIA RTX/QUADRO GPUS", "NVIDIA NVS GPUS", "NVIDIA TESLA GPUS", "NVIDIA GRID GPUS"]
for section in sections:
for line in f.readlines():
# Find the right data tables
if line.find(section) != -1:
in_section = True
continue
if not in_section:
continue
# Remove Windows and Linux line endings
line = line.replace('\r', '')
line = line.replace('\n', '')
# End of section
if len(line) > 0 and not line.startswith(' '):
in_section = False
in_table = False
continue
if len(line) == 0:
continue
# Skip the header
if line.startswith(' ---'):
in_table = True
continue
if not in_table:
continue
# PCI ID
pid = int(line[50:54], 16)
if not pid in pids:
pids.append(pid)
for pid in pids:
vid = 0x10de
print("pci:v%08Xd%08Xsv*sd*bc*sc*i*" % (vid, pid))
if __name__ == "__main__":
main()

@ -0,0 +1,8 @@
#This file is provided by xorg-x11-drv-nvidia
#Do not edit
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
EndSection

@ -0,0 +1 @@
SHA512 (NVIDIA-Linux-x86_64-470.74.run) = 21e4290d98bbbf09eed7be32df8743f0adf728f9e88869afb02fc1d0f0be87cf42af2d4f04322a76d68a1704ef044e83cd403377e60af917ff3ec0a04985801a

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2016 Richard Hughes <richard@hughsie.com> -->
<component type="driver">
<id>xorg-x11-drv-nvidia-470xx</id>
<name>NVIDIA Linux Graphics Driver</name>
<summary>Accelerated Linux Graphics Driver</summary>
<description>
<p>
The NVIDIA Accelerated Linux Graphics Driver brings accelerated 2D
functionality and high-performance OpenGL support to Linux with the
use of NVIDIA graphics processing units.
</p>
<p>
These drivers provide optimized hardware acceleration for OpenGL and X
applications and support nearly all recent NVIDIA GPU products.
The NVIDIA graphics driver uses a Unified Driver Architecture: the single
graphics driver supports all modern NVIDIA GPUs.
</p>
</description>
<url type="homepage">http://www.nvidia.com/</url>
<icon type="local" width="128" height="128">/usr/share/pixmaps/xorg-x11-drv-nvidia-470xx.png</icon>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LicenseRef-proprietary:NVIDIA</project_license>
<developer_name>NVIDIA Corporation</developer_name>
<keywords>
<keyword>CUDA</keyword>
<keyword>GeForce</keyword>
<keyword>NVIDIA</keyword>
<keyword>OpenGL</keyword>
<keyword>Quadro</keyword>
<keyword>Tesla</keyword>
<keyword>Video</keyword>
<keyword>Vulkan</keyword>
<keyword>av1</keyword>
<keyword>avc</keyword>
<keyword>driver</keyword>
<keyword>h264</keyword>
<keyword>h265</keyword>
<keyword>hevc</keyword>
<keyword>jpeg</keyword>
<keyword>mpeg2</keyword>
<keyword>vaapi</keyword>
<keyword>vc-1</keyword>
<keyword>vp8</keyword>
<keyword>vp9</keyword>
</keywords>
<url type="bugtracker">https://bugzilla.rpmfusion.org</url>
<update_contact>xorg-x11-drv-nvidia-470xx-owner@rpmfusion.org</update_contact>
</component>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save