aunali1 / linux-mbp-arch

Arch Linux kernel with 2018+ MacBook Pro patches.
177 stars 31 forks source link

Black screen in 5.6.x #13

Closed zrhoffman closed 4 years ago

zrhoffman commented 4 years ago

This holds for both 8cca9c0e04 and 7f38ded5b3. Using prebuilt packages from packages.aunali1.com. Model: MacBookPro15,1 (MV902xx/A). This is still an issue when using the default Arch Linux kernel, but given all of the other newer MBP-specific issues that this project fixes, maybe this issue is not completely irrelevant.

Commented out kernel modules listed in /etc/mkinitcpio.conf, removed all dkms modules, and re-ran mkinitcpio. There were no errors making the initcpios with mkinitcpio -k /boot/vmlinuz-linux-mbp -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-mbp.img. Also commmented out udev rules, everything in /etc/modules-load.d, and /etc/modprobe.d. Tried the linux kernel as well. Same result (black screen)

Kernel parameters: cryptdevice=UUID=...:cryptroot root=/dev/mapper/cryptroot audit=0 loglevel=3 quiet

The laptop's screen is completely black, but my 2 external monitors are usable. They both show the same screen, trying to split them with xrandr yields:

xrandr: Output eDP is not disconnected but has no modes

Disabling all video drivers, Xorg uses modesetting. The 2 external displays can show separate screens, xrandr detects the MBP's main display and calls it the primary display, and the screen's backlight turns on when starting X, but the MBP screen itself stays black.

Output of ls -1 /dev/dri:

by-path
card0
renderD128

Nothing sticks out to me in dmesg -e or journalctl -xe. When comparing logs, everything I see that fails in 5.6.x also failed in 5.5.18 and does not seem related to the black screen.

aunali1 commented 4 years ago

Others have also reported Linux 5.6.x having issues with AMDGPU on pre-Navi MBPs (so all 15,x). Now to clarify, does 5.5.18-3 work fine for you?

Regarding debug info, can you gist/pastebin or attach here the output of dmesg with kernel argument drm.debug=0xf appended. Should be a fairly extensive output.

aunali1 commented 4 years ago

@zrhoffman I have pushed a temporary fix for the eDP issue with a new kernel release. Please let me know if this works to solve the display panel issue. This will not work with external displays attached.

zrhoffman commented 4 years ago

Now to clarify, does 5.5.18-3 work fine for you?

Yes, with regard to this issue. The main thing I have not gotten to work is WiFi, so I use a USB WiFi card when I need it.

Updated to 5.6.12/278048db75, disconnected both external monitors, added kernel argument, remade GRUB. Gist of dmesg before starting Xorg: https://gist.github.com/zrhoffman/547f9260e99dc1ac5dac3f15feb8407e

This will not work with external displays attached.

5.6.12 works great for me with external displays attached, black screen is gone and external displays work. Thanks! :+1:

aunali1 commented 4 years ago

@zrhoffman Interesting...others have reported that their external displays bug out mainly since this forces the Display Port link rate training to a specific value. Can you please paste the output of xrandr --verbose | grep bpc.

Regarding wifi, it should work without any issues for your model. The only requirement being that you will need to place the required firmware that corresponds to your chipset from a macOS Mojave install. I have hosted an up to date archive here if you do not have access to one.

The files you will need can be found on macOS (irrespective of version) from the following command ioreg -l | grep RequestedFiles. An example output is as follows:

"RequestedFiles" = ({"Firmware"="C-4364__s-B2/kauai.trx","TxCap"="C-4364__s-B2/kauai-X0.txcb","Regulatory"="C-4364__s-B2/kauai-X0.clmb","NVRAM"="C-4364__s-B2/P-kauai-X0_M-HRPN_V-u__m-7.5.txt"})

On Linux you will need to copy those files into their respective locations as follows:

  1. Copy the trx to /lib/firmware/brcm/brcmfmac4364-pcie.bin (e.g. sudo cp kauai.trx /lib/firmware/brcm/brcmfmac4364-pcie.bin
  2. The clmb to /lib/firmware/brcm/brcmfmac4364-pcie.clm_blob (e.g. sudo cp kauai-X0.clmb /lib/firmware/brcm/brcmfmac4364-pcie.clm_blob)
  3. The txt to something like /lib/firmware/brcm/brcmfmac4364-pcie.Apple Inc.-MacBookPro15,1.txt. You will need to replace 15,1 with your model number. (e.g. sudo cp P-kauai-X0_M-HRPN_V-u__m-7.5.txt /lib/firmware/brcm/brcmfmac4364-pcie.Apple Inc.-MacBookPro15,1.txt)

Also, iwd has the best success rate in comparison to wpa_supplicant. If you are using NetworkManager be sure to add the following to /etc/NetworkManager/NetworkManager.conf:

[device]
wifi.backend=iwd

I am working on better distribution for the firmware and would appreciate if you could post what files you used for your model.

aunali1 commented 4 years ago

@zrhoffman As the reported issue has been fixed, i'll go ahead and close this issue.

zrhoffman commented 4 years ago

Okay, thank you again. Here is the output of xrandr --verbose | grep bpc that you asked for:

    max bpc: 16 
    max bpc: 8 
    max bpc: 8 
    max bpc: 8 
    max bpc: 8 
aunali1 commented 4 years ago

Ahh makes sense, thanks a lot!