diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index 09b3eb5f..2cfdb706 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -68,6 +68,19 @@ class GfxDriver(Enum): 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 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 cb560c27..115c9fc0 100644 --- a/archinstall/lib/profile/profile_menu.py +++ b/archinstall/lib/profile/profile_menu.py @@ -95,7 +95,7 @@ class ProfileMenu(AbstractSubMenu[ProfileConfiguration]): 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,8 +105,7 @@ class ProfileMenu(AbstractSubMenu[ProfileConfiguration]): preset=False, ).show() - if result.get_value(): - return preset + return driver if result.get_value() else preset return driver