From 7b1a9d271a6c3e4ee3ad34066e30f27323cc1661 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:02:38 -0400 Subject: [PATCH 1/2] fix: remove conflicting nvidia initramfs files Don't remove the amd initramfs files as well --- build_files/shared/initramfs.sh | 9 --------- .../shared/usr/lib/dracut/dracut.conf.d/95-nvidia.conf | 1 - system_files/shared/usr/lib/modprobe.d/nvidia.conf | 6 ------ system_files/shared/usr/lib/modprobe.d/nvk.conf | 2 -- 4 files changed, 18 deletions(-) delete mode 100644 system_files/shared/usr/lib/dracut/dracut.conf.d/95-nvidia.conf delete mode 100644 system_files/shared/usr/lib/modprobe.d/nvidia.conf delete mode 100644 system_files/shared/usr/lib/modprobe.d/nvk.conf diff --git a/build_files/shared/initramfs.sh b/build_files/shared/initramfs.sh index c9e4a53e3d2..f2897cb9280 100755 --- a/build_files/shared/initramfs.sh +++ b/build_files/shared/initramfs.sh @@ -2,15 +2,6 @@ set -oue pipefail -# Remove nvidia specific files -if [[ "${IMAGE_FLAVOR}" =~ "nvidia" || ${COREOS_TYPE} =~ "nvidia" ]]; then - rm -f /usr/lib/modprobe.d/nvk.conf - rm -f /usr/lib/modprobe.d/amd-legacy.conf -else - rm -f /usr/lib/dracut/dracut.conf.d/95-nvidia.conf - rm -f /usr/lib/modprobe.d/nvidia.conf -fi - if [[ "${AKMODS_FLAVOR}" == "surface" ]]; then KERNEL_SUFFIX="surface" else diff --git a/system_files/shared/usr/lib/dracut/dracut.conf.d/95-nvidia.conf b/system_files/shared/usr/lib/dracut/dracut.conf.d/95-nvidia.conf deleted file mode 100644 index 1d74ae57913..00000000000 --- a/system_files/shared/usr/lib/dracut/dracut.conf.d/95-nvidia.conf +++ /dev/null @@ -1 +0,0 @@ -force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm " diff --git a/system_files/shared/usr/lib/modprobe.d/nvidia.conf b/system_files/shared/usr/lib/modprobe.d/nvidia.conf deleted file mode 100644 index 2335d81a370..00000000000 --- a/system_files/shared/usr/lib/modprobe.d/nvidia.conf +++ /dev/null @@ -1,6 +0,0 @@ -# Blacklist Nouveau -blacklist nouveau -options nouveau modeset=0 - -# Enable Nvidia Modeset -options nvidia-drm modeset=1 diff --git a/system_files/shared/usr/lib/modprobe.d/nvk.conf b/system_files/shared/usr/lib/modprobe.d/nvk.conf deleted file mode 100644 index eea3f81798b..00000000000 --- a/system_files/shared/usr/lib/modprobe.d/nvk.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Enable GSP firmware -options nouveau config=NvGspRm=1 From 816c1c8468ecdb29184f5595dd2e7bcf0fe15acb Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Fri, 28 Jun 2024 15:48:51 -0400 Subject: [PATCH 2/2] fix: nvidia install order include coreos-pool-repo --- build_files/base/cleanup.sh | 4 ++++ build_files/base/install-akmods.sh | 29 ++++++++++++----------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/build_files/base/cleanup.sh b/build_files/base/cleanup.sh index e2238498c45..77a48c6b970 100644 --- a/build_files/base/cleanup.sh +++ b/build_files/base/cleanup.sh @@ -19,3 +19,7 @@ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-cisco-openh264.repo for i in /etc/yum.repos.d/rpmfusion-*; do sed -i 's@enabled=1@enabled=0@g' "$i" done + +if [ -f /etc/yum.repos.d/fedora-coreos-pool.repo ]; then + sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-coreos-pool.repo +fi diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index dbfd3ab1ce4..46fd3c757af 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -2,6 +2,18 @@ set -ouex pipefail +if [[ -n "${COREOS_TYPE:-}" ]]; then + curl -L -o /etc/yum.repos.d/fedora-coreos-pool.repo \ + https://raw.githubusercontent.com/coreos/fedora-coreos-config/testing-devel/fedora-coreos-pool.repo +fi + +if [[ "${COREOS_TYPE}" == "nvidia" ]]; then + curl -Lo /tmp/nvidia-install.sh https://raw.githubusercontent.com/ublue-os/hwe/main/nvidia-install.sh && \ + chmod +x /tmp/nvidia-install.sh && \ + IMAGE_NAME="${BASE_IMAGE_NAME}" RPMFUSION_MIRROR="" /tmp/nvidia-install.sh + rm -f /usr/share/vulkan/icd.d/nouveau_icd.*.json +fi + curl -Lo /etc/yum.repos.d/negativo17-fedora-multimedia.repo https://negativo17.org/repos/fedora-multimedia.repo sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then @@ -19,20 +31,3 @@ if grep -qv "asus" <<< "${AKMODS_FLAVOR}"; then fi sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo -if [[ "${COREOS_TYPE}" == "nvidia" ]]; then - curl -Lo /tmp/nvidia-install.sh https://raw.githubusercontent.com/ublue-os/hwe/main/nvidia-install.sh && \ - chmod +x /tmp/nvidia-install.sh && \ - IMAGE_NAME="${BASE_IMAGE_NAME}" RPMFUSION_MIRROR="" /tmp/nvidia-install.sh -fi - -# ZFS is pulled from Ucore which is not in sync -# if [[ "${AKMODS_FLAVOR}" =~ "coreos" ]]; then -# curl -Lo /etc/yum.repos.d/ublue-os-ucore-fedora.repo \ -# https://copr.fedorainfracloud.org/coprs/ublue-os/ucore/repo/fedora/ublue-os-ucore-fedora.repo -# KERNEL_FOR_DEPMOD="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" -# rpm-ostree install /tmp/coreos/akmods-rpms/*.rpm \ -# /tmp/coreos/akmods-rpms/zfs/*.rpm \ -# pv -# depmod -A "${KERNEL_FOR_DEPMOD}" -# sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/ublue-os-ucore-fedora.repo -# fi