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 01/14] 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 02/14] 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 03/14] 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 04/14] 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 05/14] 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 06/14] 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 e5d416f66cc0b577036a2acadc2ad815cab2025b Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Fri, 26 Dec 2025 14:35:36 -0500 Subject: [PATCH 07/14] fix: make the gfx_driver config use keys instead of values --- archinstall/lib/hardware.py | 29 +++++++++++++-------- archinstall/lib/interactions/system_conf.py | 4 +-- archinstall/lib/models/profile.py | 25 ++++++++++++++++-- 3 files changed, 43 insertions(+), 15 deletions(-) diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index 7aaf5190b2..eada4de1fd 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -56,12 +56,19 @@ class GfxPackage(Enum): class GfxDriver(Enum): - AllOpenSource = 'All open-source' - AmdOpenSource = 'AMD / ATI (open-source)' - IntelOpenSource = 'Intel (open-source)' - Nvidia = 'Nvidia (official open kernel module, for newer GPUs, Turing+)' - NvidiaOpenSource = 'Nvidia (open-source nouveau driver)' - VMOpenSource = 'VirtualBox (open-source)' + MesaAll = ('mesa_all', 'All open-source') + MesaAmd = ('mesa_amd', 'AMD / ATI (open-source)') + MesaIntel = ('mesa_intel', 'Intel (open-source)') + Nvidia = ('nvidia', 'Nvidia (official open kernel module, for newer GPUs, Turing+)') + MesaNvidia = ('mesa_nvidia', 'Nvidia (open-source nouveau driver)') + MesaVirtualized = ('mesa_vm', 'VirtualBox (open-source)') + + @classmethod + def from_key(cls, key: str): + for member in cls: + if member.value[0] == key: + return member + return None def has_dkms_variant(self) -> bool: match self: @@ -83,7 +90,7 @@ def gfx_packages(self) -> list[GfxPackage]: packages = [GfxPackage.XorgServer, GfxPackage.XorgXinit] match self: - case GfxDriver.AllOpenSource: + case GfxDriver.MesaAll: packages += [ GfxPackage.Mesa, GfxPackage.Xf86VideoAmdgpu, @@ -96,7 +103,7 @@ def gfx_packages(self) -> list[GfxPackage]: GfxPackage.VulkanIntel, GfxPackage.VulkanNouveau, ] - case GfxDriver.AmdOpenSource: + case GfxDriver.MesaAmd: packages += [ GfxPackage.Mesa, GfxPackage.Xf86VideoAmdgpu, @@ -104,7 +111,7 @@ def gfx_packages(self) -> list[GfxPackage]: GfxPackage.LibvaMesaDriver, GfxPackage.VulkanRadeon, ] - case GfxDriver.IntelOpenSource: + case GfxDriver.MesaIntel: packages += [ GfxPackage.Mesa, GfxPackage.LibvaIntelDriver, @@ -116,14 +123,14 @@ def gfx_packages(self) -> list[GfxPackage]: GfxPackage.Nvidia, GfxPackage.LibvaNvidiaDriver, ] - case GfxDriver.NvidiaOpenSource: + case GfxDriver.MesaNvidia: packages += [ GfxPackage.Mesa, GfxPackage.Xf86VideoNouveau, GfxPackage.LibvaMesaDriver, GfxPackage.VulkanNouveau, ] - case GfxDriver.VMOpenSource: + case GfxDriver.MesaVirtualized: packages += [ GfxPackage.Mesa, ] diff --git a/archinstall/lib/interactions/system_conf.py b/archinstall/lib/interactions/system_conf.py index 11cacede2e..9d16edbf63 100644 --- a/archinstall/lib/interactions/system_conf.py +++ b/archinstall/lib/interactions/system_conf.py @@ -55,9 +55,9 @@ def select_driver(options: list[GfxDriver] = [], preset: GfxDriver | None = None if not options: options = [driver for driver in GfxDriver] - items = [MenuItem(o.value, value=o, preview_action=lambda x: x.value.packages_text()) for o in options] + items = [MenuItem(o.value[1], value=o, preview_action=lambda x: x.value.packages_text()) for o in options] group = MenuItemGroup(items, sort_items=True) - group.set_default_by_value(GfxDriver.AllOpenSource) + group.set_default_by_value(GfxDriver.MesaAll) if preset is not None: group.set_focus_by_value(preset) diff --git a/archinstall/lib/models/profile.py b/archinstall/lib/models/profile.py index 80cbde7a19..07fe00ed3d 100644 --- a/archinstall/lib/models/profile.py +++ b/archinstall/lib/models/profile.py @@ -1,6 +1,7 @@ from __future__ import annotations from dataclasses import dataclass +from multiprocessing import Value from typing import TYPE_CHECKING, TypedDict from archinstall.default_profiles.profile import GreeterType, Profile @@ -17,6 +18,26 @@ class _ProfileConfigurationSerialization(TypedDict): greeter: str | None +def _parse_gfx_driver(value: str): + # A really ugly hack to deal with older configs that use values + # instead of keys for their config. + match value: + case 'All open-source': + return GfxDriver.MesaAll + case 'AMD / ATI (open-source)': + return GfxDriver.MesaAmd + case 'Intel (open-source)': + return GfxDriver.MesaIntel + case 'Nvidia (open kernel module for newer GPUs, Turing+)': + return GfxDriver.Nvidia + case 'Nvidia (open-source nouveau driver)' | 'Nvidia (proprietary)': + return GfxDriver.MesaNvidia + case 'VirtualBox (open-source)': + return GfxDriver.MesaVirtualized + + return GfxDriver.from_key(value) + + @dataclass class ProfileConfiguration: profile: Profile | None = None @@ -28,7 +49,7 @@ def json(self) -> _ProfileConfigurationSerialization: return { 'profile': profile_handler.to_json(self.profile), - 'gfx_driver': self.gfx_driver.value if self.gfx_driver else None, + 'gfx_driver': self.gfx_driver.value[0] if self.gfx_driver else None, 'greeter': self.greeter.value if self.greeter else None, } @@ -42,6 +63,6 @@ def parse_arg(cls, arg: _ProfileConfigurationSerialization) -> 'ProfileConfigura return ProfileConfiguration( profile, - GfxDriver(gfx_driver) if gfx_driver else None, + _parse_gfx_driver(gfx_driver) if gfx_driver else None, GreeterType(greeter) if greeter else None, ) From 52b543cfc27584e5a5c3f56db351c8787f2d9c9b Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Fri, 26 Dec 2025 14:43:23 -0500 Subject: [PATCH 08/14] fix: editor failed to refactor some names --- archinstall/lib/profile/profile_menu.py | 2 +- tests/test_args.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/archinstall/lib/profile/profile_menu.py b/archinstall/lib/profile/profile_menu.py index 9033401fab..5ddf9d86ea 100644 --- a/archinstall/lib/profile/profile_menu.py +++ b/archinstall/lib/profile/profile_menu.py @@ -77,7 +77,7 @@ def _select_profile(self, preset: Profile | None) -> Profile | None: self._item_group.find_by_key('gfx_driver').value = None else: self._item_group.find_by_key('gfx_driver').enabled = True - self._item_group.find_by_key('gfx_driver').value = GfxDriver.AllOpenSource + self._item_group.find_by_key('gfx_driver').value = GfxDriver.MesaAll.value[0] if not profile.is_greeter_supported(): self._item_group.find_by_key('greeter').enabled = False diff --git a/tests/test_args.py b/tests/test_args.py index 87ab1a3f47..0c84b6d1a7 100644 --- a/tests/test_args.py +++ b/tests/test_args.py @@ -178,7 +178,7 @@ def test_config_file_parsing( 'main': 'Desktop', } ), - gfx_driver=GfxDriver.AllOpenSource, + gfx_driver=GfxDriver.MesaAll, greeter=GreeterType.Lightdm, ), mirror_config=MirrorConfiguration( From e209fc4b4e453b53b6fa9340fbbf3584aa080acb Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Fri, 26 Dec 2025 14:44:59 -0500 Subject: [PATCH 09/14] fix: more GfxDriver refactoring fixes --- archinstall/lib/profile/profile_menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archinstall/lib/profile/profile_menu.py b/archinstall/lib/profile/profile_menu.py index 5ddf9d86ea..395fde45ab 100644 --- a/archinstall/lib/profile/profile_menu.py +++ b/archinstall/lib/profile/profile_menu.py @@ -126,7 +126,7 @@ def _select_gfx_driver(self, preset: GfxDriver | None = None) -> GfxDriver | Non def _prev_gfx(self, item: MenuItem) -> str | None: if item.value: - driver = item.get_value().value + driver = item.get_value().value[0] packages = item.get_value().packages_text() return f'Driver: {driver}\n{packages}' return None From 9c16c44e87b1cf5158a3124eb67930681d5b09ee Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Fri, 26 Dec 2025 14:46:50 -0500 Subject: [PATCH 10/14] fix: maybe it works this time! --- archinstall/lib/profile/profile_menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archinstall/lib/profile/profile_menu.py b/archinstall/lib/profile/profile_menu.py index 395fde45ab..e64f16b359 100644 --- a/archinstall/lib/profile/profile_menu.py +++ b/archinstall/lib/profile/profile_menu.py @@ -126,7 +126,7 @@ def _select_gfx_driver(self, preset: GfxDriver | None = None) -> GfxDriver | Non def _prev_gfx(self, item: MenuItem) -> str | None: if item.value: - driver = item.get_value().value[0] + driver = item.get_value()[0] packages = item.get_value().packages_text() return f'Driver: {driver}\n{packages}' return None From a1aa7e4f3c04135af5eaa252b8261490ef472b37 Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Fri, 26 Dec 2025 15:01:27 -0500 Subject: [PATCH 11/14] fix: it's working! --- archinstall/lib/global_menu.py | 2 +- archinstall/lib/profile/profile_menu.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/archinstall/lib/global_menu.py b/archinstall/lib/global_menu.py index 8c13daf402..cbf4651715 100644 --- a/archinstall/lib/global_menu.py +++ b/archinstall/lib/global_menu.py @@ -472,7 +472,7 @@ def _prev_profile(self, item: MenuItem) -> str | None: output += profile_config.profile.name + '\n' if profile_config.gfx_driver: - output += tr('Graphics driver') + ': ' + profile_config.gfx_driver.value + '\n' + output += tr('Graphics driver') + ': ' + profile_config.gfx_driver.value[1] + '\n' if profile_config.greeter: output += tr('Greeter') + ': ' + profile_config.greeter.value + '\n' diff --git a/archinstall/lib/profile/profile_menu.py b/archinstall/lib/profile/profile_menu.py index e64f16b359..8b39ee0d3b 100644 --- a/archinstall/lib/profile/profile_menu.py +++ b/archinstall/lib/profile/profile_menu.py @@ -2,7 +2,9 @@ from typing import override +from archinstall import warn from archinstall.default_profiles.profile import GreeterType, Profile +from archinstall.lib.output import info from archinstall.lib.translationhandler import tr from archinstall.tui.curses_menu import SelectMenu from archinstall.tui.menu_item import MenuItem, MenuItemGroup @@ -77,7 +79,7 @@ def _select_profile(self, preset: Profile | None) -> Profile | None: self._item_group.find_by_key('gfx_driver').value = None else: self._item_group.find_by_key('gfx_driver').enabled = True - self._item_group.find_by_key('gfx_driver').value = GfxDriver.MesaAll.value[0] + self._item_group.find_by_key('gfx_driver').value = GfxDriver.MesaAll if not profile.is_greeter_supported(): self._item_group.find_by_key('greeter').enabled = False @@ -126,7 +128,7 @@ def _select_gfx_driver(self, preset: GfxDriver | None = None) -> GfxDriver | Non def _prev_gfx(self, item: MenuItem) -> str | None: if item.value: - driver = item.get_value()[0] + driver = item.get_value().value[1] packages = item.get_value().packages_text() return f'Driver: {driver}\n{packages}' return None From 847ed95ca3f3e6380e62334212faa38824edc6df Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Fri, 26 Dec 2025 15:06:48 -0500 Subject: [PATCH 12/14] fix: update debug messages in install_gfx_driver --- 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 d683b14531..3ae3959d22 100644 --- a/archinstall/lib/profile/profiles_handler.py +++ b/archinstall/lib/profile/profiles_handler.py @@ -222,7 +222,7 @@ def install_greeter(self, install_session: 'Installer', greeter: GreeterType) -> file.write(filedata) def install_gfx_driver(self, install_session: 'Installer', driver: GfxDriver) -> None: - debug(f'Installing GFX driver: {driver.value}') + debug(f'Installing GFX driver: {driver.value[1]}') driver_pkgs = driver.gfx_packages() # All non-standard kernel packages have a '-' in their name. From c6f484526f9e9e9f088ca292debf8205fb7e0485 Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Fri, 26 Dec 2025 15:10:55 -0500 Subject: [PATCH 13/14] fix: update config samples and test data --- archinstall/lib/profile/profiles_handler.py | 2 +- examples/config-sample.json | 2 +- examples/custom-command-sample.json | 2 +- tests/data/test_config.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/archinstall/lib/profile/profiles_handler.py b/archinstall/lib/profile/profiles_handler.py index 3ae3959d22..5ac879e27c 100644 --- a/archinstall/lib/profile/profiles_handler.py +++ b/archinstall/lib/profile/profiles_handler.py @@ -230,7 +230,7 @@ def install_gfx_driver(self, install_session: 'Installer', driver: GfxDriver) -> 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}') + debug(f'A non-standard kernel was selected, installing DKMS variant of {driver.value[1]}') headers = [f'{kernel}-headers' for kernel in install_session.kernels] install_session.add_additional_packages(headers) diff --git a/examples/config-sample.json b/examples/config-sample.json index 30ba5b52d3..bbd25b66bb 100644 --- a/examples/config-sample.json +++ b/examples/config-sample.json @@ -135,7 +135,7 @@ "packages": [], "parallel downloads": 0, "profile_config": { - "gfx_driver": "All open-source (default)", + "gfx_driver": "mesa_all", "greeter": "sddm", "profile": { "details": [ diff --git a/examples/custom-command-sample.json b/examples/custom-command-sample.json index 8a82d0127a..315f90ee2b 100644 --- a/examples/custom-command-sample.json +++ b/examples/custom-command-sample.json @@ -18,7 +18,7 @@ "packages": ["docker", "git", "wget", "zsh"], "services": ["docker"], "profile": "gnome", - "gfx_driver": "All open-source (default)", + "gfx_driver": "mesa_all", "swap": true, "sys-encoding": "utf-8", "sys-language": "en_US", diff --git a/tests/data/test_config.json b/tests/data/test_config.json index a01c831b7f..21401a5467 100644 --- a/tests/data/test_config.json +++ b/tests/data/test_config.json @@ -179,7 +179,7 @@ ], "parallel_downloads": 66, "profile_config": { - "gfx_driver": "All open-source", + "gfx_driver": "mesa_all", "greeter": "lightdm-gtk-greeter", "profile": { "custom_settings": { From 2b61e19dc9d68784c048399d50e2de005b19dbf4 Mon Sep 17 00:00:00 2001 From: "Mariya T." <235426764+sigreturn@users.noreply.github.com> Date: Fri, 26 Dec 2025 15:14:59 -0500 Subject: [PATCH 14/14] fix: make all linters happy --- archinstall/lib/hardware.py | 3 ++- archinstall/lib/models/profile.py | 3 +-- archinstall/lib/profile/profile_menu.py | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index eada4de1fd..abf4c67a94 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -2,6 +2,7 @@ from enum import Enum from functools import cached_property from pathlib import Path +from typing import Any from .exceptions import SysCallError from .general import SysCommand @@ -64,7 +65,7 @@ class GfxDriver(Enum): MesaVirtualized = ('mesa_vm', 'VirtualBox (open-source)') @classmethod - def from_key(cls, key: str): + def from_key(cls, key: str) -> Any: for member in cls: if member.value[0] == key: return member diff --git a/archinstall/lib/models/profile.py b/archinstall/lib/models/profile.py index 07fe00ed3d..5aff6a3a6e 100644 --- a/archinstall/lib/models/profile.py +++ b/archinstall/lib/models/profile.py @@ -1,7 +1,6 @@ from __future__ import annotations from dataclasses import dataclass -from multiprocessing import Value from typing import TYPE_CHECKING, TypedDict from archinstall.default_profiles.profile import GreeterType, Profile @@ -18,7 +17,7 @@ class _ProfileConfigurationSerialization(TypedDict): greeter: str | None -def _parse_gfx_driver(value: str): +def _parse_gfx_driver(value: str) -> GfxDriver: # A really ugly hack to deal with older configs that use values # instead of keys for their config. match value: diff --git a/archinstall/lib/profile/profile_menu.py b/archinstall/lib/profile/profile_menu.py index 8b39ee0d3b..36976e5b43 100644 --- a/archinstall/lib/profile/profile_menu.py +++ b/archinstall/lib/profile/profile_menu.py @@ -2,9 +2,7 @@ from typing import override -from archinstall import warn from archinstall.default_profiles.profile import GreeterType, Profile -from archinstall.lib.output import info from archinstall.lib.translationhandler import tr from archinstall.tui.curses_menu import SelectMenu from archinstall.tui.menu_item import MenuItem, MenuItemGroup