t2linux / T2-Debian-and-Ubuntu-Kernel

Ubuntu Kernel for T2 Macs.
128 stars 14 forks source link

Lost iGPU after upgrading to the latest kernel #47

Closed Rom888 closed 10 months ago

Rom888 commented 10 months ago

I had enabled the iGPU using this manual: https://wiki.t2linux.org/guides/hybrid-graphics/#enabling-the-igpu

Today I upgraded the kernel to the latest using the update_t2_kernel command, and after reboot the system switched back to AMD dGPU.

There is still /etc/modprobe.d/apple-gmux.conf with the following contents:

# Enable the iGPU by default if present
options apple-gmux force_igd=y

But I see only AMD GPU (((

$ sudo lshw -C display | grep product:

product: Navi 14 [Radeon RX 5500/5500M / Pro 5500M]

$ lspci | grep VGA

03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 14 [Radeon RX 5500/5500M / Pro 5500M] (rev 40)
04:00.1 Non-VGA unclassified device: Apple Inc. T2 Bridge Controller (rev 01)
04:00.2 Non-VGA unclassified device: Apple Inc. T2 Secure Enclave Processor (rev 01)

my pc: macbook pro, 16 inch, 2019 have the Apple T2 Security Chip (hardware- controller-) model identifier: MacBookPro16.1 Intel Core i9 2.3g

Intel UHD graphics 630 AMD radeon pro 5500M

AdityaGarg8 commented 10 months ago

Did you set up Apple-os-set bootloader? If yes, does Apple-os-set display when you boot Linux?

Rom888 commented 10 months ago

Yes, $ sudo ls /boot/efi/efi/boot

.   bootx64.efi           fbx64.efi
..  bootx64_original.efi  mmx64.efi

from this repo:

git clone https://github.com/aa15032261/apple_set_os-loader
cd apple_set_os-loader
make
sudo mv /boot/efi/efi/boot/bootx64.efi /boot/efi/efi/boot/bootx64_original.efi
sudo cp ./bootx64.efi /boot/efi/efi/boot/bootx64.efi

and it worked before, but I don't see Apple-os-set display when boot Linux this time and didn't see before.

Rom888 commented 10 months ago

Should I try this fork? https://github.com/Redecorating/apple_set_os-loader

AdityaGarg8 commented 10 months ago

Can you share the md5sums of the efi files

Rom888 commented 10 months ago

Now, I tried to reboot holding down the 'option' key, and then selected EFI boot. And after that I see Apple-os-set display and got iGPU back!

Rom888 commented 10 months ago

Should I always boot holding down the 'option' key? I didn't do it before and iGPU worked.

AdityaGarg8 commented 10 months ago
sudo mv /boot/efi/efi/boot/bootx64_original.efi /boot/efi/efi/boot/bootx64_original.efi.back
sudo cp /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/efi/boot/bootx64_original.efi

Run this

Then in startup manager, press and hold control while booting Ubuntu.

Rom888 commented 10 months ago

Okay, I'm afraid of the side effects with this solution, I'd rather will boot while holding the "Option" key.

Anyway, thank you for your help and this wonderful project!

AdityaGarg8 commented 10 months ago

Well that's your wish but the commands were to "fix" a "side effect" observed in your case due to grub.

Rom888 commented 10 months ago

If I apply it, will I be able to boot MacOs? Is it resistant to future kernel and Ubuntu updates?

AdityaGarg8 commented 10 months ago

Yes

Rom888 commented 10 months ago

I did it, but no iGPU again ( What do you mean 'hold control'?

I can only see Apple-os-set display if I hold down the 'option' key while booting.

sudo mv /boot/efi/efi/boot/bootx64_original.efi /boot/efi/efi/boot/bootx64_original.efi.back
sudo cp /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/efi/boot/bootx64_original.efi

Run this

Then in startup manager, press and hold control while booting Ubuntu.

AdityaGarg8 commented 10 months ago

I meant this guide https://wiki.t2linux.org/guides/startup-manager/#setting-linux-startup-disk-as-the-default-startup-disk

Rom888 commented 10 months ago

I did it, and now I see apple-os-set display without holding down the 'option' key! Thank you very much!

I thought the apple-os-set display lives in the patched bootx64.efi and it is loaded first, but we didn't move it. So I don't understand why it works )