Skip to content

Commit

Permalink
feat: add udev rules for nvidia extra device PM (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsherman authored Oct 29, 2024
1 parent 32d3b29 commit a99434a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Containerfile.nvidia
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ COPY files/usr/lib/systemd/system/ublue-nvctk-cdi.service /tmp/ublue-os-nvidia-a
COPY files/usr/lib/systemd/system/ublue-nvctk-cdi.service /tmp/ublue-os-ucore-nvidia/rpmbuild/SOURCES/ublue-nvctk-cdi.service
COPY files/usr/lib/systemd/system-preset/70-ublue-nvctk-cdi.preset /tmp/ublue-os-nvidia-addons/rpmbuild/SOURCES/70-ublue-nvctk-cdi.preset
COPY files/usr/lib/systemd/system-preset/70-ublue-nvctk-cdi.preset /tmp/ublue-os-ucore-nvidia/rpmbuild/SOURCES/70-ublue-nvctk-cdi.preset

COPY files/etc/udev/rules.d/60-nvidia-extra-devices-pm.rules /tmp/ublue-os-nvidia-addons/rpmbuild/SOURCES/60-nvidia-extra-devices-pm.rules

RUN --mount=type=cache,dst=/var/cache/dnf \
/tmp/build-prep.sh && \
Expand Down
2 changes: 1 addition & 1 deletion Containerfile.nvidia-open
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ COPY files/usr/lib/systemd/system/ublue-nvctk-cdi.service /tmp/ublue-os-nvidia-a
COPY files/usr/lib/systemd/system/ublue-nvctk-cdi.service /tmp/ublue-os-ucore-nvidia/rpmbuild/SOURCES/ublue-nvctk-cdi.service
COPY files/usr/lib/systemd/system-preset/70-ublue-nvctk-cdi.preset /tmp/ublue-os-nvidia-addons/rpmbuild/SOURCES/70-ublue-nvctk-cdi.preset
COPY files/usr/lib/systemd/system-preset/70-ublue-nvctk-cdi.preset /tmp/ublue-os-ucore-nvidia/rpmbuild/SOURCES/70-ublue-nvctk-cdi.preset

COPY files/etc/udev/rules.d/60-nvidia-extra-devices-pm.rules /tmp/ublue-os-nvidia-addons/rpmbuild/SOURCES/60-nvidia-extra-devices-pm.rules

RUN --mount=type=cache,dst=/var/cache/dnf \
/tmp/build-prep.sh && \
Expand Down
8 changes: 8 additions & 0 deletions files/etc/udev/rules.d/60-nvidia-extra-devices-pm.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1"

# Remove NVIDIA USB Type-C UCSI devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1"

# Remove NVIDIA Audio devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{remove}="1"
1 change: 1 addition & 0 deletions ublue-os-nvidia-addons.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Source3: 70-ublue-nvctk-cdi.preset
Source4: environment
Source5: negativo17-fedora-nvidia.repo
Source6: eyecantcu-supergfxctl.repo
Source7: 60-nvidia-extra-devices-pm.rules

%description
Adds various runtime files for nvidia support.
Expand Down

0 comments on commit a99434a

Please sign in to comment.