commit: dacc7d5a54fa46a732fd358a0a771eb06b6aeeb0 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> AuthorDate: Mon Sep 16 15:20:40 2024 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> CommitDate: Mon Sep 16 16:43:39 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dacc7d5a
x11-drivers/nvidia-drivers: include nvidia.conf in dracut always Dracut ignores /etc/modprobe.d if hostonly=no, this is a problem because if plymouth is installed then the drm module will be pulled in which will include the nouveau module. The presence of this module, combined with the lack of modprobe.d config file blacklisting it, results in the nouveau module being loaded in the initramfs stage on systems that have plymouth installed and are not using dracut's hostonly setting. This needs a proper upstream fix, but for now we can workaround the problem with this. See-also: https://github.com/dracut-ng/dracut-ng/issues/674 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/38628 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> x11-drivers/nvidia-drivers/nvidia-drivers-390.157.ebuild | 7 +++++++ x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r1.ebuild | 7 +++++++ x11-drivers/nvidia-drivers/nvidia-drivers-525.147.05-r1.ebuild | 7 +++++++ x11-drivers/nvidia-drivers/nvidia-drivers-535.183.01-r1.ebuild | 7 +++++++ x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02-r1.ebuild | 7 +++++++ x11-drivers/nvidia-drivers/nvidia-drivers-550.40.71-r1.ebuild | 7 +++++++ x11-drivers/nvidia-drivers/nvidia-drivers-560.35.03-r1.ebuild | 7 +++++++ 7 files changed, 49 insertions(+) diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.157.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.157.ebuild index ce34ec976cfa..9de2db703e7e 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-390.157.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.157.ebuild @@ -400,6 +400,13 @@ documentation that is installed alongside this README." # manually if need others or addwrite) insinto /etc/sandbox.d newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl"' + + # Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this + # to ensure that the nouveau blacklist is applied + # https://github.com/dracut-ng/dracut-ng/issues/674 + # https://bugs.gentoo.org/932781 + echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \ + "${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die } pkg_preinst() { diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r1.ebuild index 5223357f1af2..901fcedc63b3 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r1.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r1.ebuild @@ -387,6 +387,13 @@ documentation that is installed alongside this README." # ebuilds should handle manually if need others or addwrite) insinto /etc/sandbox.d newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/char"' + + # Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this + # to ensure that the nouveau blacklist is applied + # https://github.com/dracut-ng/dracut-ng/issues/674 + # https://bugs.gentoo.org/932781 + echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \ + "${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die } pkg_preinst() { diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-525.147.05-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-525.147.05-r1.ebuild index de085dd0ad2b..e799f517bebc 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-525.147.05-r1.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-525.147.05-r1.ebuild @@ -451,6 +451,13 @@ documentation that is installed alongside this README." # ebuilds should handle manually if need others or addwrite) insinto /etc/sandbox.d newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/char"' + + # Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this + # to ensure that the nouveau blacklist is applied + # https://github.com/dracut-ng/dracut-ng/issues/674 + # https://bugs.gentoo.org/932781 + echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \ + "${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die } pkg_preinst() { diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-535.183.01-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-535.183.01-r1.ebuild index 340237b6525e..d547a90fb2f7 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-535.183.01-r1.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-535.183.01-r1.ebuild @@ -451,6 +451,13 @@ documentation that is installed alongside this README." # ebuilds should handle manually if need others or addwrite) insinto /etc/sandbox.d newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/char"' + + # Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this + # to ensure that the nouveau blacklist is applied + # https://github.com/dracut-ng/dracut-ng/issues/674 + # https://bugs.gentoo.org/932781 + echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \ + "${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die } pkg_preinst() { diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02-r1.ebuild index e3665b8588ed..17ddc58a0cfc 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02-r1.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02-r1.ebuild @@ -429,6 +429,13 @@ documentation that is installed alongside this README." # ebuilds should handle manually if need others or addwrite) insinto /etc/sandbox.d newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-caps:/dev/char"' + + # Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this + # to ensure that the nouveau blacklist is applied + # https://github.com/dracut-ng/dracut-ng/issues/674 + # https://bugs.gentoo.org/932781 + echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \ + "${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die } pkg_preinst() { diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.71-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.71-r1.ebuild index be2244bc4a8d..ce8321ba3ab2 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.71-r1.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.71-r1.ebuild @@ -431,6 +431,13 @@ documentation that is installed alongside this README." # ebuilds should handle manually if need others or addwrite) insinto /etc/sandbox.d newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-caps:/dev/char"' + + # Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this + # to ensure that the nouveau blacklist is applied + # https://github.com/dracut-ng/dracut-ng/issues/674 + # https://bugs.gentoo.org/932781 + echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \ + "${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die } pkg_preinst() { diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-560.35.03-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-560.35.03-r1.ebuild index 283681495a68..bfa3b9e55501 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-560.35.03-r1.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-560.35.03-r1.ebuild @@ -434,6 +434,13 @@ documentation that is installed alongside this README." # ebuilds should handle manually if need others or addwrite) insinto /etc/sandbox.d newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-caps:/dev/char"' + + # Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this + # to ensure that the nouveau blacklist is applied + # https://github.com/dracut-ng/dracut-ng/issues/674 + # https://bugs.gentoo.org/932781 + echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \ + "${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die } pkg_preinst() {