jimlee2048 / Hackintosh-Lenovo-Legion-R7000P2020H

适用于联想拯救者 R7000P(2020款)的预配置 OpenCore EFI。 Might compatible with Legion 5-15ARH05H.
9 stars 0 forks source link

system freezing and eventually crashing on some apps like firefox #1

Open yaxirhuxxain opened 7 months ago

yaxirhuxxain commented 7 months ago

Hi, first of all i would like to thank you for this wonderful guide. Everything is working perfectly. But suddenly the system started freezing and then eventually crashing. Any suggestions on how to debug or fix it? I am not sure what caused it but my recent modifications are installing some common softwares such aa firefox etc. and also modifying bios for gpu memory.

jimlee2048 commented 7 months ago

Hi, first of all i would like to thank you for this wonderful guide. Everything is working perfectly. But suddenly the system started freezing and then eventually crashing. Any suggestions on how to debug or fix it? I am not sure what caused it but my recent modifications are installing some common softwares such aa firefox etc. and also modifying bios for gpu memory.

It seem to be a known problem of dGPU driver NootedRed.kext, if crash occured when using some app such as Firefox. Currently this problem is awaiting fix. You can try to launch app with args using command line, for example:

open -a "Microsoft Edge.app" --args --disable-gpu-compositing

There's also a workaround patch BFixup.kext for it, but not recommended by the original maintainer, nor help with Firefox crash.

More related details: https://github.com/ChefKissInc/NootedRed/issues/158

jimlee2048 commented 7 months ago

Furthermore, here are some guides about debugging:

Hope these helps :)

yaxirhuxxain commented 7 months ago

Thanks for your prompt response. I have a few apps such as alttab which starts automatically. Any idea how can i start them using the args you mentioned earlier?

jimlee2048 commented 7 months ago

Thanks for your prompt response. I have a few apps such as alttab which starts automatically. Any idea how can i start them using the args you mentioned earlier?

You can wrap the shell command into a new .app application using Automator, move it to /Applications,then add item manually head to System Settings > General > Login Items.

Note that it's not necessary to launch all apps with this arg, just deal with those that have problems.

yaxirhuxxain commented 7 months ago

The below command doesnot solve the issue

open -a "/Applications/Firefox.app" --args --disable-gpu-compositing;

Solution for Firefox: What i have done is that i used an older version of Firefox. The version worked for me is Firefox 79.0 which can be downloaded from: https://archive.mozilla.org/pub/firefox/releases/

Solution for other apps:

For other apps that need to run on startup using the above arguments i make a login hook. One can create a shell script with the apps you want to start at the boot for example google chorme;

open -a "/Applications/Google Chrome.app" --args --disable-gpu-compositing;

Make sure to make this script executable by running below command;

chmod +x script.sh

Next we add this script to login hook by running below command

sudo defaults write com.apple.loginwindow LoginHook /path/to/script.sh

To remove the Hook simiply run below command

sudo defaults delete com.apple.loginwindow LoginHook

Hope it will help some one facing similar issue.

jimlee2048 commented 7 months ago

The below command doesnot solve the issue

open -a "/Applications/Firefox.app" --args --disable-gpu-compositing;

Solution for Firefox: What i have done is that i used an older version of Firefox. The version worked for me is Firefox 79.0 which can be downloaded from: https://archive.mozilla.org/pub/firefox/releases/

Solution for other apps:

For other apps that need to run on startup using the above arguments i make a login hook. One can create a shell script with the apps you want to start at the boot for example google chorme;

open -a "/Applications/Google Chrome.app" --args --disable-gpu-compositing;

Make sure to make this script executable by running below command;

chmod +x script.sh

Next we add this script to login hook by running below command

sudo defaults write com.apple.loginwindow LoginHook /path/to/script.sh

To remove the Hook simiply run below command

sudo defaults delete com.apple.loginwindow LoginHook

Hope it will help some one facing similar issue.

Thanks for your sharing! :)

Yeah, It seem that glitches on recent release of Firefox is tricky, while most of the other app no longer crashing with that args in my case, especially those electron based.

Anyway, this issue would keep open until upstream dGPU driver NootedRed.kext fix this problem. I will notice you throught this issue at that time.

yaxirhuxxain commented 7 months ago

The below command doesnot solve the issue open -a "/Applications/Firefox.app" --args --disable-gpu-compositing; Solution for Firefox: What i have done is that i used an older version of Firefox. The version worked for me is Firefox 79.0 which can be downloaded from: https://archive.mozilla.org/pub/firefox/releases/ Solution for other apps: For other apps that need to run on startup using the above arguments i make a login hook. One can create a shell script with the apps you want to start at the boot for example google chorme; open -a "/Applications/Google Chrome.app" --args --disable-gpu-compositing; Make sure to make this script executable by running below command; chmod +x script.sh Next we add this script to login hook by running below command sudo defaults write com.apple.loginwindow LoginHook /path/to/script.sh To remove the Hook simiply run below command sudo defaults delete com.apple.loginwindow LoginHook Hope it will help some one facing similar issue.

Thanks for your sharing! :)

Yeah, It seem that glitches on recent release of Firefox is tricky, while most of the other app no longer crashing with that args in my case, especially those electron based.

Anyway, this issue would keep open until upstream dGPU driver NootedRed.kext fix this problem. I will notice you throught this issue at that time.

Thanks, really appriciate it.

jimlee2048 commented 5 months ago

Hi @yaxirhuxxain, according to https://github.com/ChefKissInc/NootedRed/issues/158#issuecomment-2017730772, the problem has been improved and firefox can works now using the latest build of NootedRed.kext. You can get this from here, just replace the old one inside EFI/OC/Kexts. Hope this upstream update can help you, and I will keep tracking on the further update.

yaxirhuxxain commented 5 months ago

Thanks for the update. Tested the updated NootedRed and so far, it's working perfectly. Will update if found any issues. Furthermore, is there any news on external display compatibility? Need pointers if available.

jimlee2048 commented 5 months ago

Thanks for the update. Tested the updated NootedRed and so far, it's working perfectly. Will update if found any issues. Furthermore, is there any news on external display compatibility? Need pointers if available.

As far as I know it was impossible because of hardware limit. Both graphics output ports from HDMI and Type-C USB are directly connected to Nvidia dGPU for feature DDG (Dual-Direct GFX). For Lenovo Legion series, no working Nvidia dGPU on macOS (which is imposible currently), no working external display output.