t2linux / T2-Debian-and-Ubuntu-Kernel

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

Correct kernel parameters pcie_ports=native or compat #59

Closed Rom888 closed 3 months ago

Rom888 commented 8 months ago

I made fresh install of ubuntu-23.04-6.4.8-t2-lunar and then upgraded to the latest v6.5.9-1 kernel.

After the upgrade suspend doesn't work (macOs: Ventura 13.2) and Google Chrome sometimes freezes the entire system.

I also noticed that there is no pcie_ports=compat in the kernel parameters. Could this be the cause of the problems?

$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-6.5.9-t2-lunar root=UUID=028e67b3-4f7b-4783-8315-a3fb634622ba ro pcie_ports=native intel_iommu=on iommu=pt quiet splash vt.handoff=7

machine:

macOs: Ventura 13.2

Ubuntu 23.04
6.5.9-t2-lunar

MacBookPro16.1
Intel Core i9 2.3g

hybrid graphics:
Intel UHD graphics 630
AMD radeon pro 5500M
AdityaGarg8 commented 8 months ago

You need to share journalctl -k. You can a post it to pastebin.

Rom888 commented 8 months ago

journalctl.txt

AdityaGarg8 commented 8 months ago

Can you try turning off hybrid graphics?

Rom888 commented 8 months ago

How can I do it? I use iGPU only now.

AdityaGarg8 commented 8 months ago

Remove apple-os-set

AdityaGarg8 commented 8 months ago

It should be sudo cp /boot/efi/efi/boot/bootx64_original.efi /boot/efi/efi/boot/bootx64.efi

AdityaGarg8 commented 8 months ago

And then restart

Rom888 commented 8 months ago

Ok, should I keep it: /etc/modprobe.d/apple-gmux.conf with: options apple-gmux force_igd=y ?

AdityaGarg8 commented 8 months ago

You can remove that, although it shouldn't interfere much when apple-set-os is removed

Rom888 commented 8 months ago

journalctl-amd.txt

AdityaGarg8 commented 8 months ago

What I meant was that if you are not using hybrid graphics, are you facing the issue you are facing rn?

Rom888 commented 8 months ago

With AMD graphics even shutdown doesn't work.

AdityaGarg8 commented 8 months ago

Are you using an external monitor/thunderbolt device?

Rom888 commented 8 months ago

Not now, but I am going to use it.

AdityaGarg8 commented 8 months ago

I'll see to this issue later.

Rom888 commented 8 months ago

I think I found the reason why Chrome freezes the system. Ubuntu uses iGPU:

$ glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Mesa Intel(R) UHD Graphics 630 (CFL GT2)

But in the 'chrome://gpu' there is the following: GL_RENDERER : ANGLE (AMD, Vulkan 1.3.238 (AMD Radeon Graphics (RADV NAVI14) (0x00007340)), radv-23.0.4)

It looks like Chrome uses amdGPU. I haven't found how to switch Chrome to iGPU. ?

But after switching AMD GPU DPM from auto to low Chrome stopped to freeze the system.

Anyway, resuming after suspend still doesn't work correctly.

AdityaGarg8 commented 8 months ago

If you right click on chrome and choose use discrete graphics card, does it use intel?

Rom888 commented 8 months ago

I don't understand how can I 'click on chrome'?

AdityaGarg8 commented 8 months ago

I said 'right click' on the chrome icon

Rom888 commented 8 months ago

Oh, yes, sorry. But there is no graphics card selection option on the Chrome icon.

AdityaGarg8 commented 6 months ago

There have some significant changes to igpu. Can you test using the latest kernel and follow the new igpu guide @Rom888 ? You need to remove the apple-os-set bootloader

Rom888 commented 6 months ago

Aditya, I read this new igpu guide. Could you please give an example how can I "Add apple_set_os as a kernel parameter". Now I have: cat /proc/cmdline

BOOT_IMAGE=/boot/vmlinuz-6.5.9-t2-lunar root=UUID=028e67b3-4f7b-4783-8315-a3fb634622ba ro pcie_ports=native intel_iommu=on iommu=pt quiet splash vt.handoff=7

Should it be? :

... iommu=pt quiet splash vt.handoff=7 apple_set_os
AdityaGarg8 commented 6 months ago

Aditya, I read this new igpu guide. Could you please give an example how can I "Add apple_set_os as a kernel parameter". Now I have: cat /proc/cmdline

BOOT_IMAGE=/boot/vmlinuz-6.5.9-t2-lunar root=UUID=028e67b3-4f7b-4783-8315-a3fb634622ba ro pcie_ports=native intel_iommu=on iommu=pt quiet splash vt.handoff=7

Should it be? :

... iommu=pt quiet splash vt.handoff=7 apple_set_os

Yes. Follow the Permanently Add a Kernel Boot Parameter section of this guide https://wiki.ubuntu.com/Kernel/KernelBootParameters

Rom888 commented 6 months ago

Should I install apple_set_os as described here?: https://github.com/aa15032261/apple_set_os-loader#usage

I didn't find it in the latest igpu manual.

AdityaGarg8 commented 6 months ago

No it's no longer needed

AdityaGarg8 commented 6 months ago

Make sure you have the latest kernel (6.6.9) installed

Rom888 commented 6 months ago

I have installed ubuntu lunar, is it okay? I don't see this version of ubuntu here: https://github.com/t2linux/T2-Ubuntu/releases

AdityaGarg8 commented 6 months ago

The kernels are still maintained till Jan 25

AdityaGarg8 commented 6 months ago

You need to run update_t2_kernel

AdityaGarg8 commented 6 months ago

https://github.com/t2linux/T2-Ubuntu-Kernel

macmanjpd commented 6 months ago

where is this "new" IGPU guide?

AdityaGarg8 commented 6 months ago

where is this "new" IGPU guide?

https://wiki.t2linux.org/guides/hybrid-graphics/

AdityaGarg8 commented 3 months ago

Issue shall be closed due to lack of activity after 24hrs. If you wanna keep it open, reply within 24hrs.

Rom888 commented 3 months ago

Aditya, thanks for support! My plan was to upgrade my current system to Ubuntu 23.10 and test it there. I am going to do it and let you know the results.

Rom888 commented 3 months ago

I finally did a fresh install of T2-Ubuntu 23.10

'apple_set_os' works fine as a kernel parameter.

Ubuntu uses iGPU.

chrome://gpu shows that it uses iGPU too: GL_RENDERER : ANGLE (Intel, Mesa ...)

I think we can close this issue, thank you!