From 40cbc30997ae5895ebab776ba14b0d63c11ae9fb Mon Sep 17 00:00:00 2001 From: Softer Date: Mon, 27 Apr 2026 16:52:01 +0300 Subject: [PATCH 1/2] Fix sway+nvidia confirmation dialog (#4481) Two bugs in the Sway+Nvidia driver confirmation: 1. The boolean was inverted - confirming "yes, I'm okay with issues" reverted the driver to the previous choice instead of keeping it. 2. The warning triggered for any Nvidia driver, including the open-source nouveau driver which is officially supported by Sway. Add GfxDriver.is_nvidia_proprietary() and is_nvidia_nouveau() methods so the warning fires only for nvidia-open-dkms (proprietary userspace). --- archinstall/lib/hardware.py | 24 ++++++++++++++++++++++++ archinstall/lib/profile/profile_menu.py | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index 09b3eb5f13..6741295efc 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -68,6 +68,30 @@ def is_nvidia(self) -> bool: case _: return False + def is_nvidia_proprietary(self) -> bool: + """ + True for Nvidia drivers that ship proprietary userspace components. + Currently only NvidiaOpenKernel (nvidia-open-dkms): open kernel module + paired with proprietary userspace. NvidiaOpenSource (nouveau) is fully + open and works with Sway, so it is excluded. + """ + match self: + case GfxDriver.NvidiaOpenKernel: + return True + case _: + return False + + def is_nvidia_nouveau(self) -> bool: + """ + True for the open-source nouveau driver (Mesa) for Nvidia GPUs. + Currently only NvidiaOpenSource. Officially supported by Sway. + """ + match self: + case GfxDriver.NvidiaOpenSource: + return True + case _: + return False + def packages_text(self) -> str: pkg_names = [p.value for p in self.gfx_packages()] text = tr('Installed packages') + ':\n' diff --git a/archinstall/lib/profile/profile_menu.py b/archinstall/lib/profile/profile_menu.py index cb560c27f0..0e0d58fa8a 100644 --- a/archinstall/lib/profile/profile_menu.py +++ b/archinstall/lib/profile/profile_menu.py @@ -95,7 +95,7 @@ async def _select_gfx_driver(self, preset: GfxDriver | None = None) -> GfxDriver driver = await select_driver(preset=preset) if driver and 'Sway' in profile.current_selection_names(): - if driver.is_nvidia(): + if driver.is_nvidia_proprietary(): header = tr('The proprietary Nvidia driver is not supported by Sway.') + '\n' header += tr('It is likely that you will run into issues, are you okay with that?') + '\n' @@ -105,7 +105,7 @@ async def _select_gfx_driver(self, preset: GfxDriver | None = None) -> GfxDriver preset=False, ).show() - if result.get_value(): + if not result.get_value(): return preset return driver From fc721cc94b2d2b68dc9b26ef6522a6dea8746cbb Mon Sep 17 00:00:00 2001 From: Softer Date: Tue, 28 Apr 2026 13:14:42 +0300 Subject: [PATCH 2/2] Address review feedback (#4485) - Drop is_nvidia_nouveau() helper. It is not called anywhere yet; can be re-added when a consumer lands. - Collapse the Sway+Nvidia confirmation result handling into a single expression now that allow_skip=False guarantees a boolean answer. --- archinstall/lib/hardware.py | 11 ----------- archinstall/lib/profile/profile_menu.py | 3 +-- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index 6741295efc..2cfdb7064a 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -81,17 +81,6 @@ def is_nvidia_proprietary(self) -> bool: case _: return False - def is_nvidia_nouveau(self) -> bool: - """ - True for the open-source nouveau driver (Mesa) for Nvidia GPUs. - Currently only NvidiaOpenSource. Officially supported by Sway. - """ - match self: - case GfxDriver.NvidiaOpenSource: - return True - case _: - return False - def packages_text(self) -> str: pkg_names = [p.value for p in self.gfx_packages()] text = tr('Installed packages') + ':\n' diff --git a/archinstall/lib/profile/profile_menu.py b/archinstall/lib/profile/profile_menu.py index 0e0d58fa8a..115c9fc0fd 100644 --- a/archinstall/lib/profile/profile_menu.py +++ b/archinstall/lib/profile/profile_menu.py @@ -105,8 +105,7 @@ async def _select_gfx_driver(self, preset: GfxDriver | None = None) -> GfxDriver preset=False, ).show() - if not result.get_value(): - return preset + return driver if result.get_value() else preset return driver