From eb327cd4406c0c6a41afbfbe750c2bb333c41351 Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Sat, 20 Dec 2025 23:41:10 -0500 Subject: [PATCH 1/8] fix: update nvidia package names to reflect packaging changes --- archinstall/lib/hardware.py | 14 +++----------- archinstall/lib/profile/profiles_handler.py | 2 +- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index e1278dfad4..d620b92c84 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -44,7 +44,6 @@ class GfxPackage(Enum): LibvaNvidiaDriver = 'libva-nvidia-driver' Mesa = 'mesa' NvidiaDkms = 'nvidia-dkms' - NvidiaOpenDkms = 'nvidia-open-dkms' VulkanIntel = 'vulkan-intel' VulkanRadeon = 'vulkan-radeon' VulkanNouveau = 'vulkan-nouveau' @@ -59,14 +58,13 @@ class GfxDriver(Enum): AllOpenSource = 'All open-source' AmdOpenSource = 'AMD / ATI (open-source)' IntelOpenSource = 'Intel (open-source)' - NvidiaOpenKernel = 'Nvidia (open kernel module for newer GPUs, Turing+)' + NvidiaOpenKernel = 'Nvidia (open kernel module, for newer GPUs, Turing+)' NvidiaOpenSource = 'Nvidia (open-source nouveau driver)' - NvidiaProprietary = 'Nvidia (proprietary)' VMOpenSource = 'VirtualBox (open-source)' def is_nvidia(self) -> bool: match self: - case GfxDriver.NvidiaProprietary | GfxDriver.NvidiaOpenSource | GfxDriver.NvidiaOpenKernel: + case GfxDriver.NvidiaOpenSource | GfxDriver.NvidiaOpenKernel: return True case _: return False @@ -114,7 +112,7 @@ def gfx_packages(self) -> list[GfxPackage]: ] case GfxDriver.NvidiaOpenKernel: packages += [ - GfxPackage.NvidiaOpenDkms, + GfxPackage.NvidiaDkms, GfxPackage.Dkms, GfxPackage.LibvaNvidiaDriver, ] @@ -125,12 +123,6 @@ def gfx_packages(self) -> list[GfxPackage]: GfxPackage.LibvaMesaDriver, GfxPackage.VulkanNouveau, ] - case GfxDriver.NvidiaProprietary: - packages += [ - GfxPackage.NvidiaDkms, - GfxPackage.Dkms, - GfxPackage.LibvaNvidiaDriver, - ] case GfxDriver.VMOpenSource: packages += [ GfxPackage.Mesa, diff --git a/archinstall/lib/profile/profiles_handler.py b/archinstall/lib/profile/profiles_handler.py index cfe85de913..56038755ab 100644 --- a/archinstall/lib/profile/profiles_handler.py +++ b/archinstall/lib/profile/profiles_handler.py @@ -224,7 +224,7 @@ def install_greeter(self, install_session: 'Installer', greeter: GreeterType) -> def install_gfx_driver(self, install_session: 'Installer', driver: GfxDriver) -> None: debug(f'Installing GFX driver: {driver.value}') - if driver in [GfxDriver.NvidiaOpenKernel, GfxDriver.NvidiaProprietary]: + if driver in [GfxDriver.NvidiaOpenKernel]: headers = [f'{kernel}-headers' for kernel in install_session.kernels] # Fixes https://github.com/archlinux/archinstall/issues/585 install_session.add_additional_packages(headers) From 6ceac547ddae5e6c1c3bf0c89b859f152af82ec8 Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Sun, 21 Dec 2025 10:05:14 -0500 Subject: [PATCH 2/8] fix: only install gfx dkms when required --- archinstall/lib/hardware.py | 12 ++++++------ archinstall/lib/profile/profiles_handler.py | 20 ++++++++++++++++---- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index d620b92c84..36549fc1f6 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -43,6 +43,7 @@ class GfxPackage(Enum): LibvaMesaDriver = 'libva-mesa-driver' LibvaNvidiaDriver = 'libva-nvidia-driver' Mesa = 'mesa' + Nvidia = 'nvidia' NvidiaDkms = 'nvidia-dkms' VulkanIntel = 'vulkan-intel' VulkanRadeon = 'vulkan-radeon' @@ -58,13 +59,13 @@ class GfxDriver(Enum): AllOpenSource = 'All open-source' AmdOpenSource = 'AMD / ATI (open-source)' IntelOpenSource = 'Intel (open-source)' - NvidiaOpenKernel = 'Nvidia (open kernel module, for newer GPUs, Turing+)' + Nvidia = 'Nvidia (open kernel module, for newer GPUs, Turing+)' NvidiaOpenSource = 'Nvidia (open-source nouveau driver)' VMOpenSource = 'VirtualBox (open-source)' - def is_nvidia(self) -> bool: + def has_dkms_variant(self) -> bool: match self: - case GfxDriver.NvidiaOpenSource | GfxDriver.NvidiaOpenKernel: + case GfxDriver.Nvidia: return True case _: return False @@ -110,10 +111,9 @@ def gfx_packages(self) -> list[GfxPackage]: GfxPackage.IntelMediaDriver, GfxPackage.VulkanIntel, ] - case GfxDriver.NvidiaOpenKernel: + case GfxDriver.Nvidia: packages += [ - GfxPackage.NvidiaDkms, - GfxPackage.Dkms, + GfxPackage.Nvidia, GfxPackage.LibvaNvidiaDriver, ] case GfxDriver.NvidiaOpenSource: diff --git a/archinstall/lib/profile/profiles_handler.py b/archinstall/lib/profile/profiles_handler.py index 56038755ab..e34ff576d8 100644 --- a/archinstall/lib/profile/profiles_handler.py +++ b/archinstall/lib/profile/profiles_handler.py @@ -13,7 +13,7 @@ from archinstall.lib.translationhandler import tr from ...default_profiles.profile import GreeterType, Profile -from ..hardware import GfxDriver +from ..hardware import GfxDriver, GfxPackage from ..models.profile import ProfileConfiguration from ..networking import fetch_data_from_url, list_interfaces from ..output import debug, error, info @@ -224,12 +224,24 @@ def install_greeter(self, install_session: 'Installer', greeter: GreeterType) -> def install_gfx_driver(self, install_session: 'Installer', driver: GfxDriver) -> None: debug(f'Installing GFX driver: {driver.value}') - if driver in [GfxDriver.NvidiaOpenKernel]: + driver_pkgs = driver.gfx_packages() + # All non-standard kernel packages have a '-' in their name. + # ex: 'linux-zen' and 'linux-lts' + is_dkms_needed = any('-' in s for s in install_session.kernels) + + if driver.has_dkms_variant() and is_dkms_needed: + debug(f'A non-standard kernel was selected, installing DKMS variant of {driver.value}') + headers = [f'{kernel}-headers' for kernel in install_session.kernels] - # Fixes https://github.com/archlinux/archinstall/issues/585 install_session.add_additional_packages(headers) - driver_pkgs = driver.gfx_packages() + driver_pkgs.append(GfxPackage.Dkms) + + match self: + case GfxDriver.Nvidia: + driver_pkgs.remove(GfxPackage.Nvidia) + driver_pkgs.append(GfxPackage.NvidiaDkms) + pkg_names = [p.value for p in driver_pkgs] install_session.add_additional_packages(pkg_names) From d1b469360a33d5826590a18b838cf5cf8a117990 Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Sun, 21 Dec 2025 10:08:51 -0500 Subject: [PATCH 3/8] fix: don't display warning for the sway profile if nouveau is being used --- archinstall/lib/profile/profile_menu.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/profile/profile_menu.py b/archinstall/lib/profile/profile_menu.py index d434fc2fb3..9033401fab 100644 --- a/archinstall/lib/profile/profile_menu.py +++ b/archinstall/lib/profile/profile_menu.py @@ -100,8 +100,10 @@ def _select_gfx_driver(self, preset: GfxDriver | None = None) -> GfxDriver | Non driver = select_driver(preset=preset) if driver and 'Sway' in profile.current_selection_names(): - if driver.is_nvidia(): - header = tr('The proprietary Nvidia driver is not supported by Sway.') + '\n' + # Sway only cares about the official NVIDIA driver in this situation + # see: https://github.com/swaywm/sway/blob/238f0d4a8b399f0df6791c47eb54c8636722d5a9/sway/server.c#L165 + if driver == GfxDriver.Nvidia: + header = tr('The official 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' group = MenuItemGroup.yes_no() From 416235a87cb15ba90f6e6f858936f048ed03a650 Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Sun, 21 Dec 2025 10:15:51 -0500 Subject: [PATCH 4/8] fix: update wording about nvidia drivers as they are not technically proprietary --- archinstall/lib/hardware.py | 2 +- archinstall/lib/interactions/system_conf.py | 2 +- archinstall/locales/base.pot | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index 36549fc1f6..c708aa6d94 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -59,7 +59,7 @@ class GfxDriver(Enum): AllOpenSource = 'All open-source' AmdOpenSource = 'AMD / ATI (open-source)' IntelOpenSource = 'Intel (open-source)' - Nvidia = 'Nvidia (open kernel module, for newer GPUs, Turing+)' + Nvidia = 'Nvidia (official open kernel module, for newer GPUs, Turing+)' NvidiaOpenSource = 'Nvidia (open-source nouveau driver)' VMOpenSource = 'VirtualBox (open-source)' diff --git a/archinstall/lib/interactions/system_conf.py b/archinstall/lib/interactions/system_conf.py index 0c0e54aaee..11cacede2e 100644 --- a/archinstall/lib/interactions/system_conf.py +++ b/archinstall/lib/interactions/system_conf.py @@ -68,7 +68,7 @@ def select_driver(options: list[GfxDriver] = [], preset: GfxDriver | None = None if SysInfo.has_intel_graphics(): header += tr('For the best compatibility with your Intel hardware, you may want to use either the all open-source or Intel options.\n') if SysInfo.has_nvidia_graphics(): - header += tr('For the best compatibility with your Nvidia hardware, you may want to use the Nvidia proprietary driver.\n') + header += tr('For the best compatibility with your NVIDIA hardware, you may want to use the official NVIDIA driver.\n') result = SelectMenu[GfxDriver]( group, diff --git a/archinstall/locales/base.pot b/archinstall/locales/base.pot index 67da11b2ab..89c6a61080 100644 --- a/archinstall/locales/base.pot +++ b/archinstall/locales/base.pot @@ -193,8 +193,8 @@ msgid "" msgstr "" msgid "" -"For the best compatibility with your Nvidia hardware, you may want to use " -"the Nvidia proprietary driver.\n" +"For the best compatibility with your NVIDIA hardware, you may want to use " +"the official NVIDIA driver.\n" msgstr "" msgid "" @@ -1051,7 +1051,7 @@ msgid "Environment type: {}" msgstr "" msgid "" -"The proprietary Nvidia driver is not supported by Sway. It is likely that " +"The official NVIDIA driver is not supported by Sway. It is likely that " "you will run into issues, are you okay with that?" msgstr "" @@ -1488,7 +1488,7 @@ msgstr "" msgid "Info" msgstr "" -msgid "The proprietary Nvidia driver is not supported by Sway." +msgid "The official NVIDIA driver is not supported by Sway." msgstr "" msgid "It is likely that you will run into issues, are you okay with that?" From f8778666dda071ae31b82e9486bf1b870560f9a0 Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Sun, 21 Dec 2025 10:19:08 -0500 Subject: [PATCH 5/8] fix: match against the selected driver, not self, woops --- archinstall/lib/profile/profiles_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archinstall/lib/profile/profiles_handler.py b/archinstall/lib/profile/profiles_handler.py index e34ff576d8..d683b14531 100644 --- a/archinstall/lib/profile/profiles_handler.py +++ b/archinstall/lib/profile/profiles_handler.py @@ -237,7 +237,7 @@ def install_gfx_driver(self, install_session: 'Installer', driver: GfxDriver) -> driver_pkgs.append(GfxPackage.Dkms) - match self: + match driver: case GfxDriver.Nvidia: driver_pkgs.remove(GfxPackage.Nvidia) driver_pkgs.append(GfxPackage.NvidiaDkms) From 9465061a68becf17bf385aa01f0a589e350ab240 Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Sun, 21 Dec 2025 10:33:13 -0500 Subject: [PATCH 6/8] fix: nvidia pkg names --- archinstall/lib/hardware.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index c708aa6d94..7aaf5190b2 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -43,8 +43,8 @@ class GfxPackage(Enum): LibvaMesaDriver = 'libva-mesa-driver' LibvaNvidiaDriver = 'libva-nvidia-driver' Mesa = 'mesa' - Nvidia = 'nvidia' - NvidiaDkms = 'nvidia-dkms' + Nvidia = 'nvidia-open' + NvidiaDkms = 'nvidia-open-dkms' VulkanIntel = 'vulkan-intel' VulkanRadeon = 'vulkan-radeon' VulkanNouveau = 'vulkan-nouveau' From 3dbf88081799d9c43ca8be0dc0c935f117a4f28a Mon Sep 17 00:00:00 2001 From: h8d13 Date: Sun, 21 Dec 2025 17:05:53 +0100 Subject: [PATCH 7/8] Re-order menu for kernel selection to be before profiles --- archinstall/lib/global_menu.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/archinstall/lib/global_menu.py b/archinstall/lib/global_menu.py index 8c13daf402..b3dcb31f25 100644 --- a/archinstall/lib/global_menu.py +++ b/archinstall/lib/global_menu.py @@ -92,6 +92,14 @@ def _get_menu_options(self) -> list[MenuItem]: preview_action=self._prev_bootloader_config, key='bootloader_config', ), + MenuItem( + text=tr('Kernels'), + value=['linux'], + action=select_kernel, + preview_action=self._prev_kernel, + mandatory=True, + key='kernels', + ), MenuItem( text=tr('Hostname'), value='archlinux', @@ -118,14 +126,6 @@ def _get_menu_options(self) -> list[MenuItem]: preview_action=self._prev_applications, key='app_config', ), - MenuItem( - text=tr('Kernels'), - value=['linux'], - action=select_kernel, - preview_action=self._prev_kernel, - mandatory=True, - key='kernels', - ), MenuItem( text=tr('Network configuration'), action=ask_to_configure_network, From a17b8ca4be6cc7d183cdf552ab0fa6215b7a5106 Mon Sep 17 00:00:00 2001 From: h8d13 Date: Thu, 25 Dec 2025 23:24:59 +0100 Subject: [PATCH 8/8] Fixes parsing of configs for old format vs new. - Changed from .value to .name Perform the same directly for greeter. Deprecated drivers: Maps old removed values to new equivalents --- archinstall/lib/models/profile.py | 38 +++++++++++++++++++++++++++---- tests/data/test_config.json | 4 ++-- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/archinstall/lib/models/profile.py b/archinstall/lib/models/profile.py index 80cbde7a19..1f8c81319c 100644 --- a/archinstall/lib/models/profile.py +++ b/archinstall/lib/models/profile.py @@ -28,10 +28,40 @@ def json(self) -> _ProfileConfigurationSerialization: return { 'profile': profile_handler.to_json(self.profile), - 'gfx_driver': self.gfx_driver.value if self.gfx_driver else None, - 'greeter': self.greeter.value if self.greeter else None, + 'gfx_driver': self.gfx_driver.name if self.gfx_driver else None, + 'greeter': self.greeter.name if self.greeter else None, } + @staticmethod + def _parse_gfx_driver(value: str) -> GfxDriver: + """Parse graphics driver with backwards compatibility for old configs.""" + # Mapping for deprecated driver values to new enum members + deprecated_map = { + 'Nvidia (proprietary)': GfxDriver.Nvidia, + 'Nvidia (open kernel module for newer GPUs, Turing+)': GfxDriver.Nvidia, + } + + # Try deprecated value mapping first + if value in deprecated_map: + return deprecated_map[value] + + # Try parsing as enum name (new format) + try: + return GfxDriver[value] + except KeyError: + # Fall back to enum value (old format) + return GfxDriver(value) + + @staticmethod + def _parse_greeter(value: str) -> GreeterType: + """Parse greeter with backwards compatibility for old configs.""" + # Try parsing as enum name (new format) + try: + return GreeterType[value] + except KeyError: + # Fall back to enum value (old format) + return GreeterType(value) + @classmethod def parse_arg(cls, arg: _ProfileConfigurationSerialization) -> 'ProfileConfiguration': from ..profile.profiles_handler import profile_handler @@ -42,6 +72,6 @@ def parse_arg(cls, arg: _ProfileConfigurationSerialization) -> 'ProfileConfigura return ProfileConfiguration( profile, - GfxDriver(gfx_driver) if gfx_driver else None, - GreeterType(greeter) if greeter else None, + cls._parse_gfx_driver(gfx_driver) if gfx_driver else None, + cls._parse_greeter(greeter) if greeter else None, ) diff --git a/tests/data/test_config.json b/tests/data/test_config.json index 618bd8e9c7..8cb09421f5 100644 --- a/tests/data/test_config.json +++ b/tests/data/test_config.json @@ -182,8 +182,8 @@ ], "parallel_downloads": 66, "profile_config": { - "gfx_driver": "All open-source", - "greeter": "lightdm-gtk-greeter", + "gfx_driver": "AllOpenSource", + "greeter": "Lightdm", "profile": { "custom_settings": { "Hyprland": {