Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvidia-dkms: Add LIBVA_DRIVER_NAME to profile.d #121

Merged
merged 3 commits into from
Jul 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions profiles/pci/graphic_drivers/profiles.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,21 @@ conditional_packages = """
[ -z "$modules" ] && modules="nvidia-dkms"

echo "$modules"

"""
post_install = """
cat <<EOF >/etc/mkinitcpio.conf.d/10-chwd.conf
# This file is automatically generated by chwd. PLEASE DO NOT EDIT IT.
MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
EOF
mkinitcpio -P

# Add libva-nvidia-driver to profile
echo "export LIBVA_DRIVER_NAME=nvidia" > /etc/profile.d/nvidia-vaapi.sh
"""
post_remove = """
rm -f /etc/mkinitcpio.conf.d/10-chwd.conf
rm -f /etc/profile.d/nvidia-vaapi.sh
mkinitcpio -P
"""
device_ids = '*'
Expand Down Expand Up @@ -92,6 +97,13 @@ class_ids = "0300 0380"
vendor_ids = "10de"
packages = 'nvidia-470xx-dkms nvidia-470xx-utils nvidia-470xx-settings opencl-nvidia-470xx vulkan-icd-loader lib32-nvidia-470xx-utils lib32-opencl-nvidia-470xx lib32-vulkan-icd-loader libva-nvidia-driver'
device_name_pattern = '(GK)\w+'
post_install = """
# Add libva-nvidia-driver to profile
echo "export LIBVA_DRIVER_NAME=nvidia" > /etc/profile.d/nvidia-vaapi.sh
"""
post_remove = """
rm -f /etc/profile.d/nvidia-vaapi.sh
"""

[nvidia-dkms-470xx.prime]
desc = 'Closed source NVIDIA drivers for Linux (470xx branch, only for Kepler GPUs)'
Expand Down
Loading