-
Notifications
You must be signed in to change notification settings - Fork 108
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
Can't load amdgpu on linux kernel 5.7.14+ #159
Comments
I have never tried the intel graphics. I am running the default EFI MBP133 firmware, I have to test out the intel graphics first by turning off the amdgpu. |
@cristianmiranda have you tried to apply the patch https://marc.info/?l=grub-devel&m=141586614924917&q=p3 for eboot.c file? I believe patching the kernel to make it recognize the intel graphics card for MBP133 is better way to go then hacking the grub boot loader. However, since kernel version 5.7+ the eboot.h and eboot.c has been moved from arch/x86/boot/compressed to drivers/firmware/efi/libstub as efistub.h and x86-stub.c Want to make an bug report at https://bugzilla.kernel.org/ regarding this issue or do you want to try out the kernel patch instead for kernel v5.7+ before bug report? |
@cristianmiranda did you get any progress with amdgpu? I am currently running Linux kernel version 5.8.3 and following command |
Hi @andyholst, sorry, I didn't have time to reply before, and then I just forgot. I couldn't make much progress on this. My main concern is not being able to turn off the AMD GPU since resource consumption is higher than just using the integrated GPU. In order to do that I need I'm currently on Thank you so much for your interest on this! bwt, this is what I get on ❯ lspci -nnk | grep -i vga -A3 | grep 'in use'
Kernel driver in use: i915
Kernel driver in use: amdgpu |
@cristianmiranda right, the reason why vgaswitcheroo is not showing up is because the kernel don't recognize 2 gpus which is contradiction to the result of your "lspci -nnk | grep -i vga -A3 | grep 'in use'" command. I still think trying out the kernel patch should be better then doing the grub boot hack so the gpu detection is integrated instead during boot. They have done major refactoring to the kernel structure, so can be bit tricky to apply the patch, I think it is still worth trying out. |
@andyholst that makes a lot of sense. It's weird because I'm using rEFInd in order to spoof macOS when loading |
@cristianmiranda patching the kernel is matter of testing by applying it in the old structure for 5.5+ (arch/x86/boot/compressed/eboot.c) by executing the command |
@cristianmiranda I have checked out v5.5 tag release and I have applied the patch from https://marc.info/?l=grub-devel&m=141586614924917&q=p3 and I had to resolve some merge conflicts, you can see the commit at my linux-stable-fork patch branch https://github.com/andyholst/linux-stable-fork/tree/efi-Identify-as-OS-X-to-EFI-drivers-before-booting Going to test it out during the week. |
@cristianmiranda the patch for v5.5 works for me, I can access the /sys/kernel/debug/vgaswitcheroo/switch file and it gives me the following
The command The command
The command
So if you study the new efi boot structure for v5.7+ you should be able to apply the patch for it as well or even make a serious patch for upstream if you are up to it. |
@andyholst thank you so much for spending time on this. I'll give it a try. I'm going to close this issue as you already proved that patching the kernel makes this is possible. |
@cristianmiranda actually, I wouldn't close it until it has been fully verified, since you most likely want it to be included in the upstream as long the patch is 'good enough' and to test it on the new efi boot structure for v5.7+, I have no idea if a kind of this patch has been merged to upstream before, but worth spending time to verify if it has been applied before. If it's a bug and therefore has worked before in earlier kernel versions, then you don't close the issue until the bug has been patched. |
Any updates regarding this issue? What's the status with recent kernel versions? Did it get fixed upstream? |
@Dunedan I believe @andyholst played around with a patched version of 5.5. I haven't spent time on this issue. Sorry. |
@Dunedan I tried out the patch for kernel version 5.8, it can't be applied since they have refactored the design, I relate to an old email convrsation...
I couldn't try the 'v5.5' OS X version/vendor efi boot hack kernel patch on the macbook air models that has issues with the SPI conflicts by applying this old patch andyholst/linux-stable-fork@90c1102 @Dunedan @cristianmiranda This issue is mainly related to i915 developers, dunno if it is worth mentioning that the OS X version/vendor efi boot kernel hack is not working for >= v5.7, dunno about the grub boot loader hack though, that is, be able to switch between the amd/intel graphics on MBP 13,3 model. I will not look into this issue. |
I'm on a MacBook Pro 13,3 and currently running
5.0.0-32-generic
wich allows me to load amdgpu and turn it off doing the following:I decided to give a more recent kernel a try, so I tested
5.8
and5.7.14
. When I runsudo modprobe amdgpu
the macbook freezes (I can't do anything but turn it off and on again).I understand that
vgaswitcheroo
is not present anymore on kernels version5.4+
. Is that right?.After installing the kernel I got the following:
I'm available to test stuff if you have any ideas. I also don't mind staying on
5.0.0-32-generic
(and even more if on newer kernels I don't have the chance to load/turn off the dedicated GPU).Thanks!
The text was updated successfully, but these errors were encountered: