Repository: lutris/lutris

Issue:
Preferences window doesn't open when running on aarch64 (RPI4/400, Manjaro)
### Bug description

Testing on a Pi400 running the latest Manjaro XFCE (aarch64).
I installed lutris using `pacman -S lutris`, which also installed the dependencies. I can start it up normally, but I cannot open the preferences window.

Starting it from the console showed some more details:
If I try to open the Prefs window, it crashes with the following piece of the traceback:
```
"/usr/lib/python3.9/site-packages/lutris/util/linux.py", line 449, in gather_system_info_str 
cpu_dict["Vendor"] = system_info["cpus"][0]["vendor_id"] 
KeyError: 'vendor_id'
```

As the author of Amiberry, I was looking at how I could integrate it to Lutris so it can launch Amiga games (I know FS-UAE is already available). I could set up a "Linux" game hardcoding the emulator path and parameters to a game, and it worked as expected, so it would be interesting to fully integrate the emulator the "proper" way.
But the prefs window problem is a bit of a blocker for now. :)

### How to Reproduce

Steps to reproduce the behavior:
1. Use a Raspberry Pi 4 or Pi400, running the latest Manjaro XCFE
2. Install lutris using `pacman`
3. Run lutris from the console to see the messages
4. Try to open the Preferences window


### Expected behavior

The aarch64 CPU should be detected and the application should function normally (Prefs window should open).

### Log output

```shell
midwan@pi400 ~]$ lutris -d
2022-01-14 11:22:47,571: Unsupported architecture aarch64
2022-01-14 11:22:48,184: Starting Lutris 0.5.9.1
2022-01-14 11:22:48,273: No cores found
2022-01-14 11:22:49,327: Startup complete
INFO     2022-01-14 11:22:49,330 [startup.check_driver:61]:Running Broadcom Mesa driver 21.2.5 on V3D 4.2 (0xffffffff)
INFO     2022-01-14 11:22:49,331 [startup.check_driver:73]:GPU:   (v3d drivers)
INFO     2022-01-14 11:22:49,331 [startup.check_driver:73]:GPU:   (vc4-drm drivers)
WARNING  2022-01-14 11:22:49,336 [startup.check_vulkan:132]:Vulkan is not available or your system isn't Vulkan capable
DEBUG    2022-01-14 11:22:50,828 [lutriswindow.update_store:451]:Showing 1 games
WARNING  2022-01-14 11:22:54,937 [linux.get_arch:198]:Unsupported architecture aarch64
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/lutris/gui/lutriswindow.py", line 661, in on_preferences_activate
    self.application.show_window(PreferencesDialog)
  File "/usr/lib/python3.9/site-packages/lutris/gui/application.py", line 254, in show_window
    window_inst = window_class(parent=self.window, **kwargs)
  File "/usr/lib/python3.9/site-packages/lutris/gui/config/preferences_dialog.py", line 50, in __init__
    self.build_scrolled_window(SysInfoBox()),
  File "/usr/lib/python3.9/site-packages/lutris/gui/config/sysinfo_box.py", line 31, in __init__
    sysinfo_str = gather_system_info_str()
  File "/usr/lib/python3.9/site-packages/lutris/util/linux.py", line 449, in gather_system_info_str
    cpu_dict["Vendor"] = system_info["cpus"][0]["vendor_id"]
KeyError: 'vendor_id'
INFO     2022-01-14 11:22:56,229 [application.do_shutdown:631]:Shutting down Lutris
```


### System Information

```shell
unable to generate, preferences window doesn't open.
```


### Media (optional)

_No response_

### Checklist:

- [X] I'm not asking for support with a game or the wine runner.
- [X] I have followed the above mentioned guides and have all the graphics and wine dependencies installed.
- [X] I have checked for existing issues that describe my problem prior to opening this one.
- [X] I understand that improperly formatted bug reports may be closed without explanation.


Discussion:

Resolving patch:
diff --git a/lutris/util/linux.py b/lutris/util/linux.py
--- a/lutris/util/linux.py
+++ b/lutris/util/linux.py
@@ -446,10 +446,10 @@ def gather_system_info_str():
     system_info_readable["System"] = system_dict
     # Add CPU information
     cpu_dict = {}
-    cpu_dict["Vendor"] = system_info["cpus"][0]["vendor_id"]
-    cpu_dict["Model"] = system_info["cpus"][0]["model name"]
-    cpu_dict["Physical cores"] = system_info["cpus"][0]["cpu cores"]
-    cpu_dict["Logical cores"] = system_info["cpus"][0]["siblings"]
+    cpu_dict["Vendor"] = system_info["cpus"][0].get("vendor_id", "Vendor unavailable")
+    cpu_dict["Model"] = system_info["cpus"][0].get("model name", "Model unavailable")
+    cpu_dict["Physical cores"] = system_info["cpus"][0].get("cpu cores", "Physical cores unavailable")
+    cpu_dict["Logical cores"] = system_info["cpus"][0].get("siblings", "Logical cores unavailable")
     system_info_readable["CPU"] = cpu_dict
     # Add memory information
     ram_dict = {}
@@ -459,9 +459,9 @@ def gather_system_info_str():
     # Add graphics information
     graphics_dict = {}
     if LINUX_SYSTEM.glxinfo:
-        graphics_dict["Vendor"] = system_info["glxinfo"]["opengl_vendor"]
-        graphics_dict["OpenGL Renderer"] = system_info["glxinfo"]["opengl_renderer"]
-        graphics_dict["OpenGL Version"] = system_info["glxinfo"]["opengl_version"]
+        graphics_dict["Vendor"] = system_info["glxinfo"].get("opengl_vendor", "Vendor unavailable")
+        graphics_dict["OpenGL Renderer"] = system_info["glxinfo"].get("opengl_renderer", "OpenGL Renderer unavailable")
+        graphics_dict["OpenGL Version"] = system_info["glxinfo"].get("opengl_version", "OpenGL Version unavailable")
         graphics_dict["OpenGL Core"] = system_info["glxinfo"].get(
             "opengl_core_profile_version", "OpenGL core unavailable"
         )


Test patch: