Repository: archlinux/archinstall

Issue:
AMD graphics driver selection unclear
For AMD, the options are by no means obvious in what they actually do.

The recommended choice should in my opinion be mesa (packages mesa and radeon-vulkan).
If you want to go by vendor in the first table, then mesa should be moved into the secondary table, i.e. when selecting AMD you get the choice between AMDVLK and mesa. The current situation is just confusing.


Discussion:
Giving it a second thought, I would actually remove this selection entirely and just install mesa and let users fiddle with drivers after installation. I see no point in preconfiguring this specifically in that small install script.

If you want to do so anyways, I think it should be really only vendors in the first selection which for x86 is only Nvidia/Intel/AMD.
I might be out on a limb here, but the `mesa` package has strictly speaking nothing to do with AMD. Or at least I thought [it's just a reference implementation of the OpenGL API](https://docs.mesa3d.org/index.html) with support for [different drivers](https://docs.mesa3d.org/systems.html). So technically, you can install mesa and ignore the full potential of your graphics card by not installing vendor specific drivers. Which, I agree is not what most people will do.

The menu is simply a way for users who aren't experienced, to still get a starting driver to render a desktop some what reliably. It's still mentioned that you should read up on which driver you need and do your research.

I don't mind working on this and improving it, but I would welcome suggestions on how to improve it not remove it since it's quite vital to get desktop profiles to work, which, are optional in the installer.. But since they are there, the drivers need to be there too optionally :)
Okay, let me elaborate on this: The mesa project does contain a variety of drivers, including the official OpenGL drivers for Intel and AMD as well as the official Vulkan driver for Intel and the Valve-sponsored community Vulkan driver for AMD (which is the default on most distributions). For Nvidia, there is a rudimentary open-source OpenGL driver which gets you to the desktop. For more, you need to install the proprietary driver.  There are a bunch of other drivers, mainly for ARM, but also the software rendering ones. So, installing just mesa will get you to the desktop either way.

The mentioned vulkan drivers are packaged separately on Arch, but I think it would also be fine to let users install them manually afterwards.

To have clean options I would either go for 1) just install mesa as soon as any DE was selected (this is how most other distributions handle that) or 2) provide the necessary information so that it's really obvious what's going to be installed. If you prefer option 2, I can look up how all the bits are packaged and make a suggestion. 
> Okay, let me elaborate on this: The mesa project does contain a variety of drivers, including the official OpenGL drivers for Intel and AMD as well as the official Vulkan driver for Intel and the Valve-sponsored community Vulkan driver for AMD (which is the default on most distributions). For Nvidia, there is a rudimentary open-source OpenGL driver which gets you to the desktop. For more, you need to install the proprietary driver. There are a bunch of other drivers, mainly for ARM, but also the software rendering ones. So, installing just mesa will get you to the desktop either way.
> 
> The mentioned vulkan drivers are packaged separately on Arch, but I think it would also be fine to let users install them manually afterwards.
> 
> To have clean options I would either go for 1) just install mesa as soon as any DE was selected (this is how most other distributions handle that) or 2) provide the necessary information so that it's really obvious what's going to be installed. If you prefer option 2, I can look up how all the bits are packaged and make a suggestion.

Thanks for elaborating! I'm by no means an expert in all areas so some times I will need clarification, so it's much appreciated that you took the time! :)

I would really love the second option, I'm not quite sure how to get the information in the tiny screen space we have in a meaningful way, but I for sure welcome suggestions and ideas! The first option would obviously work, it's a *bit* crippled which is why I'm leaning towards option 2.

To help out a bit, here's the selection process:
* https://github.com/archlinux/archinstall/blob/torxed-rework-partitioning/archinstall/lib/user_interaction.py#L642-L676

And this is the available drivers list (and some other hardware detection):
* https://github.com/archlinux/archinstall/blob/torxed-rework-partitioning/archinstall/lib/hardware.py#L8-L56
Hey Torxed,
after having some discussions about the options, I made a small list of what I think would be a good go-to for the time being:
```
	'All open-source (default)' : ['mesa', 'xf86-video-amdgpu, 'xf86-video-ati', 'xf86-video-nouveau', 'xf86-video-vmware', 'libva-
mesa-driver', 'libva-intel-driver', 'intel-media-driver', 'vulkan-radeon', vulkan-intel']
	'AMD / ATI (open-source)' : ['mesa', 'xf86-video-amdgpu', 'xf86-video-ati', 'libva-mesa-driver', 'vulkan-radeon'],
	'Intel (open-source)' : ['mesa', 'libva-intel-driver', 'intel-media-driver', 'vulkan-intel'],
	'Nvidia' : {
		'open-source' : ['mesa', 'xf86-video-nouveau', 'libva-mesa-driver'],
		'proprietary' : ['nvidia']
	},
	'VMware / VirtualBox (open-source)' : ['mesa', 'xf86-video-vmware']
```

It now also includes video acceleration and vulkan drivers (if available). AMD/ATI are merged because the ATI package is tiny enough to justify. The fbdev and vesa drivers are removed as they serve no purpose except for some rare edge cases in which the user should be able to install them manually. The mesa option is also removed as it's a dependency of all but nvidia anyway.
I suggest adding a default pre-selection of "All open-source". That way you basically get best of both worlds ;)

I'd open a MR, but I'm a bit lazy and completely fine if you go ahead.
> Hey Torxed,
> after having some discussions about the options, I made a small list of what I think would be a good go-to for the time being:
> 
> ```
> 	'All open-source (default)' : ['mesa', 'xf86-video-amdgpu, 'xf86-video-ati', 'xf86-video-nouveau', 'xf86-video-vmware', 'libva-
> mesa-driver', 'libva-intel-driver', 'intel-media-driver', 'vulkan-radeon', vulkan-intel']
> 	'AMD / ATI (open-source)' : ['mesa', 'xf86-video-amdgpu', 'xf86-video-ati', 'libva-mesa-driver', 'vulkan-radeon'],
> 	'Intel (open-source)' : ['mesa', 'libva-intel-driver', 'intel-media-driver', 'vulkan-intel'],
> 	'Nvidia' : {
> 		'open-source' : ['mesa', 'xf86-video-nouveau', 'libva-mesa-driver'],
> 		'proprietary' : ['nvidia']
> 	},
> 	'VMware / VirtualBox (open-source)' : ['mesa', 'xf86-video-vmware']
> ```
> 
> It now also includes video acceleration and vulkan drivers (if available). AMD/ATI are merged because the ATI package is tiny enough to justify. The fbdev and vesa drivers are removed as they serve no purpose except for some rare edge cases in which the user should be able to install them manually. The mesa option is also removed as it's a dependency of all but nvidia anyway.
> I suggest adding a default pre-selection of "All open-source". That way you basically get best of both worlds ;)
> 
> I'd open a MR, but I'm a bit lazy and completely fine if you go ahead.

I like this option but suggest we change the naming a little bit. generic_select allows you to enter a selection in two ways - with the number corresponding to the selection or by typing (case-sensitive and incl. special chars) the option name (for instance 'Nvidia' works just as well as '2'). "VMware / VirtualBox (open-source)" is not easy for the user to type.

One thing I thought of to remedy this would be to have the name/'key' for each choice be short and add a description for what the 'group' of graphics packages actually contains. Thoughts @daniel-schuermann ?
Actually, that list is such a huge improvement that I don't think it matters much if it's typable as there are only a handful of options and using a number isn't hard or anything. I'm going to open an MR for that and we can try it in master.

Resolving patch:
diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py
--- a/archinstall/lib/hardware.py
+++ b/archinstall/lib/hardware.py
@@ -3,24 +3,53 @@
 from .networking import list_interfaces, enrichIfaceTypes
 from typing import Optional
 
-__packages__ = ['xf86-video-amdgpu', 'xf86-video-ati', 'xf86-video-intel', 'xf86-video-nouveau', 'xf86-video-fbdev', 'xf86-video-vesa', 'xf86-video-vmware', 'nvidia', 'mesa']
+__packages__ = [
+		"mesa",
+		"xf86-video-amdgpu",
+		"xf86-video-ati",
+		"xf86-video-nouveau",
+		"xf86-video-vmware",
+		"libva-mesa-driver",
+		"libva-intel-driver",
+		"intel-media-driver",
+		"vulkan-radeon",
+		"vulkan-intel",
+		"nvidia",
+]
 
 AVAILABLE_GFX_DRIVERS = {
 	# Sub-dicts are layer-2 options to be selected
 	# and lists are a list of packages to be installed
-	'AMD / ATI' : {
-		'amd' : ['xf86-video-amdgpu'],
-		'ati' : ['xf86-video-ati']
+	"All open-source (default)": [
+		"mesa",
+		"xf86-video-amdgpu",
+		"xf86-video-ati",
+		"xf86-video-nouveau",
+		"xf86-video-vmware",
+		"libva-mesa-driver",
+		"libva-intel-driver",
+		"intel-media-driver",
+		"vulkan-radeon",
+		"vulkan-intel",
+	],
+	"AMD / ATI (open-source)": [
+		"mesa",
+		"xf86-video-amdgpu",
+		"xf86-video-ati",
+		"libva-mesa-driver",
+		"vulkan-radeon",
+	],
+	"Intel (open-source)": [
+		"mesa",
+		"libva-intel-driver",
+		"intel-media-driver",
+		"vulkan-intel",
+	],
+	"Nvidia": {
+		"open-source": ["mesa", "xf86-video-nouveau", "libva-mesa-driver"],
+		"proprietary": ["nvidia"],
 	},
-	'intel' : ['xf86-video-intel'],
-	'nvidia' : {
-		'open-source' : ['xf86-video-nouveau'],
-		'proprietary' : ['nvidia']
-	},
-	'mesa' : ['mesa'],
-	'fbdev' : ['xf86-video-fbdev'],
-	'vesa' : ['xf86-video-vesa'],
-	'vmware / virtualbox' : ['xf86-video-vmware']
+	"VMware / VirtualBox (open-source)": ["mesa", "xf86-video-vmware"],
 }
 
 def hasWifi()->bool:


Test patch: