diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2024-02-06 20:32:00 -0500 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2024-02-06 21:21:41 -0500 |
commit | 1d31c1c2f2808bce35615c3b445c70deaa039032 (patch) | |
tree | 8f3247fc16af600f0cbaf2730079c351a84f8630 | |
parent | net-misc/dhcpcd: Stabilize 10.0.6-r1 hppa, #923514 (diff) | |
download | gentoo-1d31c1c2f2808bce35615c3b445c70deaa039032.tar.gz gentoo-1d31c1c2f2808bce35615c3b445c70deaa039032.tar.bz2 gentoo-1d31c1c2f2808bce35615c3b445c70deaa039032.zip |
x11-drivers/nvidia-drivers: move nvidia-powerd behind IUSE=powerd
Mostly due to the openrc service's "need dbus" which is an annoyance
when dbus is missing (preventing from being a runtime-only optfeature),
but even with systemd this now also allows to properly check for
multilib on dbus (used by 32bit glcore/eglcore libraries to communicate
with powerd).
*Technically* needs a revbump given --changed-use does not know it
needs to rebuild here, but given this only cause problems for rare
users without dbus (e.g. headless cuda servers with USE=-tools) and
will propagate with kernel updates+rebuilds let's not bother every
users over this.
Hopefully users of powerd (incl. for systemd which may have more
existing ones) will notice the new USE and enable it.
Also re-arrange arm64 handling, it makes more sense to mask the USE
on arm64 than keep it as a no-op by checking if use !amd64.
Exception to this is 0/550 branch which started to include a arm64
nvidia-powerd build (albeit do not think hardware that need this even
exists yet). Hope did not break installation there given did not test
on arm64, please report if so.
Bug: https://bugs.gentoo.org/923117
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
8 files changed, 46 insertions, 21 deletions
diff --git a/profiles/arch/arm64/package.use.mask b/profiles/arch/arm64/package.use.mask index 30d7bfd4eb6c..0cb8582d6f5b 100644 --- a/profiles/arch/arm64/package.use.mask +++ b/profiles/arch/arm64/package.use.mask @@ -1,6 +1,10 @@ # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Ionen Wolkens <ionen@gentoo.org> (2024-02-07) +# nvidia-powerd is only available for arm64 in 550+ +<x11-drivers/nvidia-drivers-550 powerd + # Alexander Tsoy <alexander@tsoy.me> (2024-01-31) # Supports 64-bit NEON media-libs/zita-resampler -cpu_flags_arm_neon diff --git a/x11-drivers/nvidia-drivers/metadata.xml b/x11-drivers/nvidia-drivers/metadata.xml index a8ee1dd7baee..8a3bfb5d3a1b 100644 --- a/x11-drivers/nvidia-drivers/metadata.xml +++ b/x11-drivers/nvidia-drivers/metadata.xml @@ -12,6 +12,7 @@ <use> <flag name="kernel-open">Use the open source variant of drivers (Turing/Ampere+ GPUs only, aka GTX 1650+, experimental)</flag> <flag name="persistenced">Install the persistence daemon for keeping devices state when unused (e.g. for headless)</flag> + <flag name="powerd">Install the NVIDIA dynamic boost support daemon (only useful with specific laptops, ignore if unsure)</flag> <flag name="static-libs">Install the XNVCtrl static library for accessing sensors and other features</flag> <flag name="tools">Install additional tools such as nvidia-settings</flag> </use> diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-525.147.05.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-525.147.05.ebuild index 3b43c86bcab8..8b874970372b 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-525.147.05.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-525.147.05.ebuild @@ -25,7 +25,7 @@ S=${WORKDIR} LICENSE="NVIDIA-r2 BSD BSD-2 GPL-2 MIT ZLIB curl openssl" SLOT="0/${PV%%.*}" KEYWORDS="-* amd64 ~arm64" -IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced +static-libs +tools wayland" +IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced powerd +static-libs +tools wayland" REQUIRED_USE="kernel-open? ( modules )" COMMON_DEPEND=" @@ -57,6 +57,7 @@ RDEPEND=" x11-libs/libX11[abi_x86_32(-)?] x11-libs/libXext[abi_x86_32(-)?] ) + powerd? ( sys-apps/dbus[abi_x86_32(-)?] ) wayland? ( gui-libs/egl-gbm >=gui-libs/egl-wayland-1.1.10 @@ -153,7 +154,8 @@ src_prepare() { sed 's/__USER__/nvpd/' \ nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ > "${T}"/nvidia-persistenced.service || die - use !amd64 || sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die + use !powerd || # file is missing on arm64 (masked) + sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die # use alternative vulkan icd option if USE=-X (bug #909181) use X || sed -i 's/"libGLX/"libEGL/' nvidia_{layers,icd}.json || die @@ -267,6 +269,7 @@ src_install() { local skip_modules=( $(usev !X "nvfbc vdpau xdriver") $(usev !modules gsp) + $(usev !powerd powerd) installer nvpd # handled separately / built from source ) local skip_types=( @@ -410,7 +413,7 @@ documentation that is installed alongside this README." dobin nvidia-bug-report.sh # MODULE:powerd extras - if use amd64; then + if use powerd; then newinitd "${FILESDIR}"/nvidia-powerd.initd nvidia-powerd #923117 systemd_dounit systemd/system/nvidia-powerd.service diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-535.146.02.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-535.146.02.ebuild index 38ad82d3c314..bde3618ee96a 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-535.146.02.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-535.146.02.ebuild @@ -25,7 +25,7 @@ S=${WORKDIR} LICENSE="NVIDIA-r2 Apache-2.0 BSD BSD-2 GPL-2 MIT ZLIB curl openssl" SLOT="0/${PV%%.*}" KEYWORDS="-* amd64 ~arm64" -IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced +static-libs +tools wayland" +IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced powerd +static-libs +tools wayland" REQUIRED_USE="kernel-open? ( modules )" COMMON_DEPEND=" @@ -58,6 +58,7 @@ RDEPEND=" x11-libs/libX11[abi_x86_32(-)?] x11-libs/libXext[abi_x86_32(-)?] ) + powerd? ( sys-apps/dbus[abi_x86_32(-)?] ) wayland? ( gui-libs/egl-gbm >=gui-libs/egl-wayland-1.1.10 @@ -156,7 +157,8 @@ src_prepare() { sed 's/__USER__/nvpd/' \ nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ > "${T}"/nvidia-persistenced.service || die - use !amd64 || sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die + use !powerd || # file is missing on arm64 (masked) + sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die # use alternative vulkan icd option if USE=-X (bug #909181) use X || sed -i 's/"libGLX/"libEGL/' nvidia_{layers,icd}.json || die @@ -272,6 +274,7 @@ src_install() { local skip_modules=( $(usev !X "nvfbc vdpau xdriver") $(usev !modules gsp) + $(usev !powerd powerd) installer nvpd # handled separately / built from source ) local skip_types=( @@ -417,7 +420,7 @@ documentation that is installed alongside this README." dobin nvidia-bug-report.sh # MODULE:powerd extras - if use amd64; then + if use powerd; then newinitd "${FILESDIR}"/nvidia-powerd.initd nvidia-powerd #923117 systemd_dounit systemd/system/nvidia-powerd.service diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-535.154.05.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-535.154.05.ebuild index 38ad82d3c314..bde3618ee96a 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-535.154.05.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-535.154.05.ebuild @@ -25,7 +25,7 @@ S=${WORKDIR} LICENSE="NVIDIA-r2 Apache-2.0 BSD BSD-2 GPL-2 MIT ZLIB curl openssl" SLOT="0/${PV%%.*}" KEYWORDS="-* amd64 ~arm64" -IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced +static-libs +tools wayland" +IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced powerd +static-libs +tools wayland" REQUIRED_USE="kernel-open? ( modules )" COMMON_DEPEND=" @@ -58,6 +58,7 @@ RDEPEND=" x11-libs/libX11[abi_x86_32(-)?] x11-libs/libXext[abi_x86_32(-)?] ) + powerd? ( sys-apps/dbus[abi_x86_32(-)?] ) wayland? ( gui-libs/egl-gbm >=gui-libs/egl-wayland-1.1.10 @@ -156,7 +157,8 @@ src_prepare() { sed 's/__USER__/nvpd/' \ nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ > "${T}"/nvidia-persistenced.service || die - use !amd64 || sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die + use !powerd || # file is missing on arm64 (masked) + sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die # use alternative vulkan icd option if USE=-X (bug #909181) use X || sed -i 's/"libGLX/"libEGL/' nvidia_{layers,icd}.json || die @@ -272,6 +274,7 @@ src_install() { local skip_modules=( $(usev !X "nvfbc vdpau xdriver") $(usev !modules gsp) + $(usev !powerd powerd) installer nvpd # handled separately / built from source ) local skip_types=( @@ -417,7 +420,7 @@ documentation that is installed alongside this README." dobin nvidia-bug-report.sh # MODULE:powerd extras - if use amd64; then + if use powerd; then newinitd "${FILESDIR}"/nvidia-powerd.initd nvidia-powerd #923117 systemd_dounit systemd/system/nvidia-powerd.service diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-535.43.25.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-535.43.25.ebuild index e2d7f3fdf148..4615a52cdb63 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-535.43.25.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-535.43.25.ebuild @@ -26,7 +26,7 @@ S=${WORKDIR} LICENSE="NVIDIA-r2 Apache-2.0 BSD BSD-2 GPL-2 MIT ZLIB curl openssl" SLOT="0/vulkan" KEYWORDS="-* ~amd64" -IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced +static-libs +tools wayland" +IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced powerd +static-libs +tools wayland" REQUIRED_USE="kernel-open? ( modules )" COMMON_DEPEND=" @@ -61,6 +61,7 @@ RDEPEND=" x11-libs/libX11[abi_x86_32(-)?] x11-libs/libXext[abi_x86_32(-)?] ) + powerd? ( sys-apps/dbus[abi_x86_32(-)?] ) wayland? ( gui-libs/egl-gbm >=gui-libs/egl-wayland-1.1.10 @@ -154,7 +155,8 @@ src_prepare() { sed 's/__USER__/nvpd/' \ nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ > "${T}"/nvidia-persistenced.service || die - use !amd64 || sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die + use !powerd || # file is missing on arm64 (masked) + sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die # use alternative vulkan icd option if USE=-X (bug #909181) use X || sed -i 's/"libGLX/"libEGL/' nvidia_{layers,icd}.json || die @@ -270,6 +272,7 @@ src_install() { local skip_modules=( $(usev !X "nvfbc vdpau xdriver") $(usev !modules gsp) + $(usev !powerd powerd) installer nvpd # handled separately / built from source ) local skip_types=( @@ -415,7 +418,7 @@ documentation that is installed alongside this README." dobin nvidia-bug-report.sh # MODULE:powerd extras - if use amd64; then + if use powerd; then newinitd "${FILESDIR}"/nvidia-powerd.initd nvidia-powerd #923117 systemd_dounit systemd/system/nvidia-powerd.service diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-545.29.06-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-545.29.06-r1.ebuild index 59fb67e327b0..441694459f04 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-545.29.06-r1.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-545.29.06-r1.ebuild @@ -25,7 +25,7 @@ S=${WORKDIR} LICENSE="NVIDIA-r2 Apache-2.0 BSD BSD-2 GPL-2 MIT ZLIB curl openssl" SLOT="0/${PV%%.*}" KEYWORDS="-* ~amd64 ~arm64" -IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced +static-libs +tools wayland" +IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced powerd +static-libs +tools wayland" REQUIRED_USE="kernel-open? ( modules )" COMMON_DEPEND=" @@ -58,6 +58,7 @@ RDEPEND=" x11-libs/libX11[abi_x86_32(-)?] x11-libs/libXext[abi_x86_32(-)?] ) + powerd? ( sys-apps/dbus[abi_x86_32(-)?] ) wayland? ( gui-libs/egl-gbm >=gui-libs/egl-wayland-1.1.10 @@ -147,7 +148,8 @@ src_prepare() { sed 's/__USER__/nvpd/' \ nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ > "${T}"/nvidia-persistenced.service || die - use !amd64 || sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die + use !powerd || # file is missing on arm64 (masked) + sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die4 # use alternative vulkan icd option if USE=-X (bug #909181) use X || sed -i 's/"libGLX/"libEGL/' nvidia_{layers,icd}.json || die @@ -254,6 +256,7 @@ src_install() { local skip_modules=( $(usev !X "nvfbc vdpau xdriver") $(usev !modules gsp) + $(usev !powerd powerd) installer nvpd # handled separately / built from source ) local skip_types=( @@ -399,7 +402,7 @@ documentation that is installed alongside this README." dobin nvidia-bug-report.sh # MODULE:powerd extras - if use amd64; then + if use powerd; then newinitd "${FILESDIR}"/nvidia-powerd.initd nvidia-powerd #923117 systemd_dounit systemd/system/nvidia-powerd.service diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.07.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.07.ebuild index e52744d51ff0..b3877e204635 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.07.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.07.ebuild @@ -26,7 +26,7 @@ LICENSE="NVIDIA-r2 Apache-2.0 BSD BSD-2 GPL-2 MIT ZLIB curl openssl" SLOT="0/${PV%%.*}" # not keywording betas #KEYWORDS="-* ~amd64 ~arm64" -IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced +static-libs +tools wayland" +IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced powerd +static-libs +tools wayland" REQUIRED_USE="kernel-open? ( modules )" COMMON_DEPEND=" @@ -59,6 +59,7 @@ RDEPEND=" x11-libs/libX11[abi_x86_32(-)?] x11-libs/libXext[abi_x86_32(-)?] ) + powerd? ( sys-apps/dbus[abi_x86_32(-)?] ) wayland? ( gui-libs/egl-gbm >=gui-libs/egl-wayland-1.1.10 @@ -140,7 +141,7 @@ src_prepare() { sed 's/__USER__/nvpd/' \ nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ > "${T}"/nvidia-persistenced.service || die - use !amd64 || sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die + sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die # use alternative vulkan icd option if USE=-X (bug #909181) use X || sed -i 's/"libGLX/"libEGL/' nvidia_{layers,icd}.json || die @@ -247,6 +248,7 @@ src_install() { local skip_modules=( $(usev !X "nvfbc vdpau xdriver") $(usev !modules gsp) + $(usev !powerd powerd) installer nvpd # handled separately / built from source ) local skip_types=( @@ -392,10 +394,13 @@ documentation that is installed alongside this README." dobin nvidia-bug-report.sh # MODULE:powerd extras - insinto /usr/share/dbus-1/system.d - doins nvidia-dbus.conf - newinitd "${FILESDIR}"/nvidia-powerd.initd nvidia-powerd #923117 - systemd_dounit systemd/system/nvidia-powerd.service + if use powerd; then + newinitd "${FILESDIR}"/nvidia-powerd.initd nvidia-powerd #923117 + systemd_dounit systemd/system/nvidia-powerd.service + + insinto /usr/share/dbus-1/system.d + doins nvidia-dbus.conf + fi # symlink non-versioned so nvidia-settings can use it even if misdetected dosym nvidia-application-profiles-${PV}-key-documentation \ |