Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 24.04 and 24.10 stuck on boot most of the times on iMac 2020 with latest Sequoia (15.2) #143

Open
bigfoot7375 opened this issue Dec 31, 2024 · 11 comments

Comments

@bigfoot7375
Copy link

HW: iMac 2020 27" (Intel i5) / AMD Radeon Pro 5300 / 128GB RAM
SW: Tried both BigSur 11.7.10 and Sequoia 15.2
Issue: Both installer and Installed OS expereince same system hang
Details: iMac boots successfully once in few boot attempts.
after being stubborn, successfuly loaded installer and installed Ubuntu.
Installed OS behave as installer - one successful boot after few boot attempts (need long press on power button to reset).
Not sure if helpful, but attaching terminal screenshot appearing while boot fail.
IMG_0103

@AdityaGarg8
Copy link
Member

AdityaGarg8 commented Dec 31, 2024

@bigfoot7375
Copy link
Author

https://wiki.archlinux.org/title/Laptop/Apple#iMac_2020

Didn't work, but few things that happened afterwards:
When it did boot, resolution was still 5k although I tried video=1920x1080 or video=2560x1440.
After returning to macOS, iMac automatically powred off after about a minute and when powering back on, got the "System was shutdown unexpectedly" message.
And the following message appeared on terminal (different than before) when was stuck:
IMG_0136

@AdityaGarg8
Copy link
Member

In settings, what resolution options are visible to you?

@AdityaGarg8
Copy link
Member

Also, did you add it correctly? What's cat /proc/cmdline

@bigfoot7375
Copy link
Author

bigfoot7375 commented Dec 31, 2024

I've got the standard complete list (From 1024x768 up to 5120x2880 including the 1920x1080 and 2560x1440 options).
cmdline is irrelevant yet as I add it to the kernel parameters at boot time on install boot from usb device.
But for some reason it being ignored and when it boots, I have it initialized at 5k.

@AdityaGarg8
Copy link
Member

I've got the standard complete list (From 1024x768 up to 5120x2880 including the 1920x1080 and 2560x1440 options). cmdline is irrelevant

How is cmdline irrelevant even if you add at boot time?

yet as I add it to the kernel parameters at boot time on install boot from usb device. But for some reason it being ignored and when it boots, I have it initialized at 5k.

@bigfoot7375
Copy link
Author

Don't have Linux installed so there's no cmdline yet.
I'm adding the "video=..." while booting from usb device to live system.
System not booting so I don't have the /proc/cmdline available.

@AdityaGarg8
Copy link
Member

Try using safe graphics option

@AdityaGarg8
Copy link
Member

For installation, some people use this workaround, copied the message from the discord!

Hey, for the amdgpu driver issue for IMacs with t2 kernel and 5K display I did not find a solution. I will try to dig into the driver code when I have more time to understand what is actually happening. For now I use this solution:

amdgpu-monitor.service

[Unit]
Description=AMDGPU Driver Monitor
After=multi-user.target

[Service]
Type=simple
ExecStart=/usr/bin/amdgpu_monitor
Restart=always
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=amdgpu-monitor

[Install]
WantedBy=multi-user.target

amdgpu_monitor

#!/bin/bash

# Error pattern to search for
ERROR_PATTERN=".*\[drm:amdgpu_device_init \[amdgpu\]\] \*ERROR\* hw_init of IP block <smu> failed -62.*"

# Monitoring interval in seconds
INTERVAL=5

while true; do
    if journalctl -k -b | grep -qE "$ERROR_PATTERN"; then
        echo "Detected amdgpu driver error (hw_init of IP block <smu> failed)! Rebooting..."
        sudo reboot
    fi
    sleep $INTERVAL
done

It's a simple reboot when it fails to load the driver properly. Maybe it's not super useful for classic users, but when like me you need to manage 200+ t2 IMacs it's a very good temporary patch.

So if anyone else have this issue, that's what I'm using for now.

@bigfoot7375
Copy link
Author

Using nomodset is helpfull for about 80% of the time (it's booting 4 times out of 5).
But this is only for installation and it disable the HW acceleration, right (It uses software rendering)?
Other than that, I'm not sure that the provided script will be helpful as It's getting stuck at a pretty early stage of the boot process (not sure if services are running at this time).

@AdityaGarg8
Copy link
Member

I've provided you all possible workarounds. There is currently no fix available for this. You probably can read the link below to know more about what you are actually facing:

https://khronokernel.com/macos/2021/12/08/5K-UEFI.html

Probably file a bug report with AMD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants