# macbook pro 8,2 + kernel 4.1.12 = efifb + radeon nightmare

## movq

Hi, i am currently running gentoo + 4.1.12 kernel on a macbook pro 8,2. 

The problem is that at the moment the only way to have it running and having a video output is passing to the kernel the "nomodeset" parameter disabling KMS. 

I am booting the kernel with a reFIND + efistub setup. 

If i leave KMS enabled the boot stops at a certain point (when switching to radeondrmfb). The system is up and i can ssh to it, but the video output is gone (completely black screen). 

Anyone had some experience with this? i looked through tenth of forums/documentation but cannot find the way to solve this issue.

----------

## khayyam

movq ...

can you pastebin your .config:

```
# [ -f /usr/bin/wgetpaste ] || emerge --ask wgetpaste

# zcat /proc/config.gz | wgetpaste
```

best ... khay

----------

## movq

sure, here you are 

https://bpaste.net/show/f888181cbb2d

just to summarize, as i accomplished several other steps:

this macbook has two video cards (radeon hd67xxM + intel i915). I am not interested in having both working, i915 is enough (would like to get Xorg working).

- booting with no kms related parameters: i can see the system booting, but video stops working as soon as the efifb -> radeondrmfb switch is triggered

- booting with nomodeset: i can get a console. But there is no way to get Xorg working 

- booting with video=i915 i915.modeset=1 and modprobe.blacklist=radeon: i can get a console, but starting Xorg just gives a solid black screen. in this last case the Xorg log is the following: https://bpaste.net/show/f92e770ad69c

----------

## khayyam

 *movq wrote:*   

> this macbook has two video cards (radeon hd67xxM + intel i915). I am not interested in having both working, i915 is enough (would like to get Xorg working).
> 
> - booting with no kms related parameters: i can see the system booting, but video stops working as soon as the efifb -> radeondrmfb switch is triggered
> 
> - booting with nomodeset: i can get a console. But there is no way to get Xorg working 
> ...

 

movq ... you have quite a number of things enabled that are more than likely to cause issues with KMS (and no doubt vga_switcheroo ... if that is the direction you're heading). Unfortunately, I don't have such a setup so I can only speculate about which are causing the issue. That said I suspect the following should be disabled/changed:

CONFIG_AGP_AMD64=n

CONFIG_AGP_SIS=n

CONFIG_AGP_VIA=n

Unsure about CONFIG_INTEL_GTT=y

CONFIG_VGA_ARB_MAX_GPUS=2

CONFIG_DRM_RADEON=y # if you plan to attempt to get vga_switcheroo working.

CONFIG_DRM_I810=n

CONFIG_FB_VESA=n # this is probably the cause of the screen blanking, and should be disabled.

Those aside there are specific things to keep in mind if you plan to use vga_switcheroo (not sure what effect of having CONFIG_VGA_SWITCHEROO=y if you don't), the first of which is that by all accounts hybrid graphics do not work very well on the macbook8.2. That particular post offers some instructions for disabling one or other card (and as you stated that having i915 working is fine then such should be enough to get past the current issue). 

So, in short, having another framebuffer enabled will cause issues with KMS, and so you should disable VESA. You should check that 'cat /proc/fb' shows 'inteldrmfb' and that you have VIDEO_CARDS=intel in make.conf so that x11-drivers/xf86-video-intel is installed.

HTH & best ... khay

----------

## movq

thanks for your hints. I recompiled the kernel trying different combinations of modules, but had no luck up to now. 

I read somewhere that the problem could be related to the EFI stub booting (and i read something related to the absence of video bios not allowing to bootstrap the video card correctly, at least for radeon...but this is what i read, i have no experience in this field).

Will try a bit more and see if i can get console + Xorg working.

----------

## khayyam

 *movq wrote:*   

> thanks for your hints. I recompiled the kernel trying different combinations of modules, but had no luck up to now. I read somewhere that the problem could be related to the EFI stub booting (and i read something related to the absence of video bios not allowing to bootstrap the video card correctly, at least for radeon...but this is what i read, i have no experience in this field).

 

movq ... you're welcome. Yes, from the above link that does seem to be the case ... however, reading elsewhere it is suggested that adding 'video=SVIDEO-1:d' as a kernel parameter may also prevent the screen blanking ... perhaps worth a try.

best ... khay

----------

## movq

hi! 

well, it seems it was a kernel-related issue.

I have both the console and Xorg running fine with the radeon card (haven't tried the intel card yet) and a vanilla kernel 4.3.3.

My kernel configuration can be found here https://bpaste.net/show/b71a184baed4

Basically i still do an efi stub boot (no grub installed at all, i just have rEFInd installed) and the kernel is starting with a built-in efifb frame buffer. What is changed is that the vga switcharoo in 4.3.3  (at least for efifb -> radeondrmfb) is working fine. 

Thanks for your help! it was precious!

----------

