Bug 101771

Summary: MacBook Pro 2015 11,5 - Xorg fatal error on screen detection for kernels 4.10.0+ (and possibly 4.9.8+)
Product: xorg Reporter: berg <berglh>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED NOTABUG QA Contact: Xorg Project Team <xorg-team>
Severity: critical    
Priority: medium    
Version: 7.7 (2012.06)   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg log for failed boot on Linux 4.10.0 from SSD
none
Xorg log for successful boot on Linux 4.9.8 from SSD
none
dmesg 4.10.0 Live USB Ubuntu Gnome 17.04
none
lshw -C video 4.10.0 Live USB Ubuntu Gnome 17.04
none
ssd-linux-4.10.0-syslog none

Description berg 2017-07-13 05:32:59 UTC
Created attachment 132652 [details]
Xorg log for failed boot on Linux 4.10.0 from SSD

I'm experiencing an issue with kernels greater than version 4.10.0 on a 2015 MacBook Pro 11,5 laptop running Ubuntu Gnome 16.04. The newest kernel I've found so far is 4.9.8, however it appears there are 29 releases between this and 4.10.0. 

I'm using this as a reference point because of the ability to boot Ubuntu Gnome 17.04 from the LiveUSB key which boots the 4.10.0-19 kernel.

Xorg is stopping with a fatal error on startup, interestingly, this only happens when booting from the internal SSD. If booting from a LiveUSB key, the laptop starts up successfully, but there are no Xorg logs available in /var/logs

I have reached a point now where I'm pretty certain there is either something wrong with my Xorg configuration (likely), radeon driver or something related to how Xorg is detecting my displays.
Comment 1 berg 2017-07-13 05:34:01 UTC
Created attachment 132653 [details]
Xorg log for successful boot on Linux 4.9.8 from SSD
Comment 2 berg 2017-07-13 05:34:31 UTC
Created attachment 132654 [details]
dmesg 4.10.0 Live USB Ubuntu Gnome 17.04
Comment 3 berg 2017-07-13 05:35:18 UTC
Created attachment 132655 [details]
lshw -C video 4.10.0 Live USB Ubuntu Gnome 17.04
Comment 4 Michel Dänzer 2017-07-13 06:17:26 UTC
Are the failure Xorg log file and dmesg output attached from the same boot?

The Xorg log file looks like the radeon kernel module isn't loaded before Xorg starts.
Comment 5 berg 2017-07-14 00:05:53 UTC
Michel,

No, the dmesg output was from booting from a live usb key, there is no dmesg/kernel log saved to disk when trying to boot 4.10.0 from the internal SSD of the MacBook pro.

Keep in mind, this laptop has some fancy GPU/IGP muxing when running OS X. Typically in Linux it has always used soley used the radeon GPU and in the past when trying to swtich it to Intel only, I had problems with X also loading.

The screen output on a normal boot looks like this, complaining of an ACPI error: https://bugzilla.kernel.org/attachment.cgi?id=257215

Enabling debugging on the kernel and showing more verbose messaging to screen results in this output: https://bugzilla.kernel.org/attachment.cgi?id=257217

As mentioned, none of these message ever have a change to be written to disk, sorry for the photos.
Comment 6 Michel Dänzer 2017-07-14 01:58:31 UTC
(In reply to berg from comment #5)
> No, the dmesg output was from booting from a live usb key, there is no
> dmesg/kernel log saved to disk when trying to boot 4.10.0 from the internal
> SSD of the MacBook pro.

Nothing in /var/log/kern.log*?

Without seeing the corresponding dmesg, from the Xorg log file it looks like you should make sure the radeon kernel module is loaded and properly initializes before Xorg starts.
Comment 7 berg 2017-07-14 02:16:56 UTC
> Nothing in /var/log/kern.log*?

Nope, no sign of the kernel version starting at all: 

berg@bmbp:/var/log$ zcat kern* | grep "Linux version"
Jun 27 15:02:07 bmbp kernel: [    0.000000] Linux version 4.9.8-mbp115 (berg@bmbp) (gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12) ) #1 SMP Mon Feb 6 19:38:12 AEST 2017
Jun 27 17:11:22 bmbp kernel: [    0.000000] Linux version 4.9.8-mbp115 (berg@bmbp) (gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12) ) #1 SMP Mon Feb 6 19:38:12 AEST 2017

berg@bmbp:/var/log$ grep "Linux version" kern.*
kern.log:Jul 11 14:58:10 bmbp kernel: [    0.000000] Linux version 4.9.8-mbp115 (berg@bmbp) (gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12) ) #1 SMP Mon Feb 6 19:38:12 AEST 2017

> Without seeing the corresponding dmesg, from the Xorg log file it looks like
> you should make sure the radeon kernel module is loaded and properly
> initializes before Xorg starts.

I'm not sure how I would ensure that, and curious as to why it would be any different starting Linux 4.10.0 from a LiveUSB key than from the internal SSD - speed at which it's reading from the device? Can I add some kind of delay for loading the video driver?
Comment 8 berg 2017-07-14 02:31:37 UTC
Created attachment 132681 [details]
ssd-linux-4.10.0-syslog
Comment 9 berg 2017-07-14 02:34:42 UTC
(In reply to berg from comment #8)
> Created attachment 132681 [details]
> ssd-linux-4.10.0-syslog

So I found some data in the syslog files, even though it didn't get dumped to kern.log, this might be useful. Line 2605 seems to indicate a problem initialising the GPU.
Comment 10 Michel Dänzer 2017-07-14 03:32:54 UTC
> Jul 13 10:51:28 bmbp kernel: [    2.011562] si_fw: mixing new and old firmware!

Looks like there's a problem with the firmware files for the radeon driver. Make sure the firmware-amd-graphics / firmware-linux-nonfree package is up to date and that the initrd contains the current files from /lib/firmware/radeon/.
Comment 11 berg 2017-07-16 09:28:52 UTC
(In reply to Michel Dänzer from comment #10)
> > Jul 13 10:51:28 bmbp kernel: [    2.011562] si_fw: mixing new and old firmware!
> 
> Looks like there's a problem with the firmware files for the radeon driver.
> Make sure the firmware-amd-graphics / firmware-linux-nonfree package is up
> to date and that the initrd contains the current files from
> /lib/firmware/radeon/.

Hi Michel,

So, in Ubuntu 16.10 there's no firmware-amd-graphics or firmware-linux-nonfree packages anymore. 

I did however, find that the linux-firmware package on the LiveUSB key was indeed newer, so I went ahead and downloaded this package to match that on the live USB key: https://packages.ubuntu.com/source/zesty/linux-firmware which incidentally updates all the initrd images.

Since updating to the newer package version the kernel started booting correctly. I guess the morale of the story here is that I should update my distribution to avoid this kind of problem. I had issues upgrading the same distribution on another laptop so have been putting it off.

The latest mainline kernel 4.12.2 is now booting successfully.

Many thanks for your help, seems like testing kernel patches on new kernels is what is getting me into trouble in this case :)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.