AsahiLinux / asahi-installer

Asahi Linux installer
MIT License
807 stars 107 forks source link

Display enumeration crashes if lid is closed #231

Closed NattyNarwhal closed 10 months ago

NattyNarwhal commented 11 months ago

Just running the installer to check if the bug on my system, and after hitting enter to continue:

10-31 19:04 root         INFO     Startup
10-31 19:04 root         INFO     Environment:
10-31 19:04 root         INFO       INSTALLER_BASE=https://cdn.asahilinux.org/installer
10-31 19:04 root         INFO       INSTALLER_DATA=https://github.com/AsahiLinux/asahi-installer/raw/prod/data/installer_data.json
10-31 19:04 root         INFO       REPO_BASE=https://cdn.asahilinux.org
10-31 19:04 root         INFO       IPSW_BASE=None
10-31 19:04 root         INFO       EXPERT=None
10-31 19:04 root         INFO       REPORT=https://stats.asahilinux.org/report
10-31 19:04 root         INFO       REPORT_TAG=alx-prod
10-31 19:04 root         INFO     Version: v0.6.18
10-31 19:04 root         INFO     MSG: Welcome to the Asahi Linux installer!
10-31 19:04 root         INFO     MSG: This installer will guide you through the process of setting up
10-31 19:04 root         INFO     MSG: Asahi Linux on your Mac.
10-31 19:04 root         INFO     MSG: Please make sure you are familiar with our documentation at:
10-31 19:04 root         INFO     MSG:   https://alx.sh/w
10-31 19:04 root         INFO     MSG: Press enter to continue.
10-31 19:04 root         INFO     MSG: Collecting system information...
10-31 19:04 root         INFO     MSG:   Product name: MacBook Pro (14-inch, 2021)
10-31 19:04 root         INFO     MSG:   SoC: Apple M1 Pro
10-31 19:04 root         INFO     MSG:   Device class: j314sap
10-31 19:04 root         INFO     MSG:   Product type: MacBookPro18,3
10-31 19:04 root         INFO     MSG:   Board ID: 0x8
10-31 19:04 root         INFO     MSG:   Chip ID: 0x6000
10-31 19:04 root         INFO     MSG:   System firmware: iBoot-10151.1.1
10-31 19:04 root         INFO     MSG:   Boot UUID: C9A39A50-58B8-4326-AE1B-E6D8E0420966
10-31 19:04 root         INFO     MSG:   Boot VGID: C9A39A50-58B8-4326-AE1B-E6D8E0420966
10-31 19:04 root         INFO     MSG:   Default boot VGID: C9A39A50-58B8-4326-AE1B-E6D8E0420966
10-31 19:04 root         INFO     MSG:   Boot mode: macOS
10-31 19:04 root         INFO     MSG:   OS version: 13.6 (22G120)
10-31 19:04 root         INFO     MSG:   Main firmware version: 14.0 (23A344)
10-31 19:04 root         INFO     MSG:   No Fallback System Firmware / rOS
10-31 19:04 root         INFO     MSG:   SFR version: 23.1.344.0.0,0
10-31 19:04 root         INFO     MSG:   SystemRecovery version: 22.7.74.0.0,0 (13.5 22G74)
10-31 19:04 root         INFO     MSG:   Login user: calvin
10-31 19:04 root         ERROR    Exception caught
Traceback (most recent call last):
  File "/private/tmp/asahi-install/main.py", line 1138, in <module>
    InstallerMain(installer_version).main()
  File "/private/tmp/asahi-install/main.py", line 850, in main
    hz = self.sysinfo.get_refresh_rate()
  File "/private/tmp/asahi-install/system.py", line 185, in get_refresh_rate
    return main_display["_spdisplays_resolution"].split()[-1]
TypeError: 'NoneType' object is not subscriptable
10-31 19:04 root         INFO     MSG: If you need to file a bug report, please attach the log file:
10-31 19:04 root         INFO     MSG:   /private/tmp/asahi-install/installer.log

I'm docked with the lid closed, so the only display enumerated is an external one:

{
  "SPDisplaysDataType" : [
    {
      "_name" : "Apple M1 Pro",
      "spdisplays_mtlgpufamilysupport" : "spdisplays_metal3",
      "spdisplays_ndrvs" : [
        {
          "_name" : "DELL U2410",
          "_spdisplays_display-product-id" : "f016",
          "_spdisplays_display-serial-number" : "4852304c",
          "_spdisplays_display-vendor-id" : "10ac",
          "_spdisplays_display-week" : "2",
          "_spdisplays_display-year" : "2013",
          "_spdisplays_displayID" : "3",
          "_spdisplays_pixels" : "1920 x 1200",
          "_spdisplays_resolution" : "1920 x 1200 @ 60.00Hz",
          "spdisplays_main" : "spdisplays_yes",
          "spdisplays_mirror" : "spdisplays_off",
          "spdisplays_online" : "spdisplays_yes",
          "spdisplays_pixelresolution" : "spdisplays_wuxga",
          "spdisplays_resolution" : "1920 x 1200 @ 60.00Hz",
          "spdisplays_rotation" : "spdisplays_supported"
        }
      ],
      "spdisplays_vendor" : "sppci_vendor_Apple",
      "sppci_bus" : "spdisplays_builtin",
      "sppci_cores" : "14",
      "sppci_device_type" : "spdisplays_gpu",
      "sppci_model" : "Apple M1 Pro"
    }
  ]
}
marcan commented 11 months ago

Fixed in the sense that we don't crash, but will refuse to install in this state. I've heard the problem can happen if you have an external display connected though, so this is probably a good thing. I guess people will have to undock to install for the time being, until Apple fixes this mess.