Bug 30052 - [BISECTED]Fails to start X with intel+Ati video, whith modeset=1
Summary: [BISECTED]Fails to start X with intel+Ati video, whith modeset=1
Status: RESOLVED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_video-dri
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-28 10:02 UTC by Antonov Nikolay
Modified: 2013-12-23 11:35 UTC (History)
8 users (show)

See Also:
Kernel Version: 2.6.36-2.6.38
Subsystem:
Regression: No
Bisected commit-id:


Attachments
/var/log/messages |grep kernel (111.58 KB, text/plain)
2011-02-28 10:02 UTC, Antonov Nikolay
Details
Xorg.log (6.46 KB, text/plain)
2011-02-28 10:03 UTC, Antonov Nikolay
Details
Kernel Config (69.67 KB, application/octet-stream)
2011-02-28 10:05 UTC, Antonov Nikolay
Details
Radeon_only dmesg (90.37 KB, text/plain)
2011-02-28 18:36 UTC, Antonov Nikolay
Details
ubuntu natty alpha dmesg (62.44 KB, text/plain)
2011-03-08 17:48 UTC, Antonov Nikolay
Details
kernel bisect (3.17 KB, text/plain)
2011-04-09 20:28 UTC, Antonov Nikolay
Details

Description Antonov Nikolay 2011-02-28 10:02:23 UTC
Created attachment 49572 [details]
/var/log/messages |grep kernel

I have Acer 480TG notebook. It have 2 video cards Intel(integrated) and Ati 5470 (discreet).

Problem: linux-2.6.36 - 2.6.38(older version not tested) fails to start X with modeset=1 on both drivers. I see console text(but promt doesn't blank), or black screen.

Tested on:
linux-2.6.36-gentoo-r5
linux-2.6.38-rc5
linux-2.6.38-rc6-git4
and 2.6.38-rc3*
(Same problem with FedoraTestDay's LiveCD. photo: http://img809.imageshack.us/i/cimg3250j.jpg/ )
Comment 1 Antonov Nikolay 2011-02-28 10:03:07 UTC
Created attachment 49582 [details]
Xorg.log
Comment 2 Antonov Nikolay 2011-02-28 10:05:29 UTC
Created attachment 49592 [details]
Kernel Config
Comment 3 Antonov Nikolay 2011-02-28 10:06:42 UTC
notebook ~ # lspci 
00:00.0 Host bridge: Intel Corporation Arrandale DRAM Controller (rev 18)
00:01.0 PCI bridge: Intel Corporation Arrandale PCI Express x16 Root Port (rev 18)
00:02.0 VGA compatible controller: Intel Corporation Arrandale Integrated Graphics Controller (rev 18)
00:16.0 Communication controller: Intel Corporation Ibex Peak HECI Controller (rev 06)
00:1a.0 USB Controller: Intel Corporation Ibex Peak USB2 Enhanced Host Controller (rev 05)
00:1b.0 Audio device: Intel Corporation Ibex Peak High Definition Audio (rev 05)
00:1c.0 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 1 (rev 05)
00:1c.5 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 6 (rev 05)
00:1d.0 USB Controller: Intel Corporation Ibex Peak USB2 Enhanced Host Controller (rev 05)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)
00:1f.0 ISA bridge: Intel Corporation Ibex Peak LPC Interface Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation Ibex Peak 4 port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation Ibex Peak SMBus Controller (rev 05)
01:00.0 VGA compatible controller: ATI Technologies Inc Device 68e0
01:00.1 Audio device: ATI Technologies Inc Device aa68
02:00.0 Ethernet controller: Attansic Technology Corp. Device 1073 (rev c0)
03:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
7f:00.0 Host bridge: Intel Corporation QuickPath Architecture Generic Non-core Registers (rev 05)
7f:00.1 Host bridge: Intel Corporation QuickPath Architecture System Address Decoder (rev 05)
7f:02.0 Host bridge: Intel Corporation QPI Link 0 (rev 05)
7f:02.1 Host bridge: Intel Corporation QPI Physical 0 (rev 05)
7f:02.2 Host bridge: Intel Corporation Device 2d12 (rev 05)
7f:02.3 Host bridge: Intel Corporation Device 2d13 (rev 05)




Gentoo, x86_64... any additional information/tests/bisects?
Comment 4 Alex Deucher 2011-02-28 16:48:07 UTC
Does it work ok if you manually select the radeon as the primary gpu in the bios?
Comment 5 Antonov Nikolay 2011-02-28 18:14:57 UTC
When "Discreet"(Radeon only) mode activated in BIOS - works well.

tested on linux-2.6.38-rc6-git6 linux-2.6.38-rc6-git4
Comment 6 Antonov Nikolay 2011-02-28 18:36:51 UTC
Created attachment 49652 [details]
Radeon_only dmesg

Little "diff":

Intel+radeon
[drm] Detected VRAM RAM=3584M, BAR=128M
[drm] RAM width 128bits DDR
[TTM] Zone  kernel: Available graphics memory: 1400816 kiB.
[TTM] Initializing pool allocator.
[drm] radeon: 3584M of VRAM memory ready
[drm] radeon: 512M of GTT memory ready.

radeon only:
[drm] Detected VRAM RAM=512M, BAR=128M
[drm] RAM width 64bits DDR
[TTM] Zone  kernel: Available graphics memory: 1498134 kiB.
[TTM] Initializing pool allocator.
[drm] radeon: 512M of VRAM memory ready
[drm] radeon: 512M of GTT memory ready.

I have 3Gb DDR3 Memory and 512(not sure)Video Memory (up to 1655Mb HyperMemory(tm)).
Comment 7 Alex Deucher 2011-02-28 19:01:15 UTC
looks like the vga switcheroo stuff is trying to resume the radeon driver which was never properly loaded in the first place.  Dave Airlie might have some idea what's going on.
Comment 8 Antonov Nikolay 2011-03-01 06:35:19 UTC
kernel boots well without vgaswitcheroo, but radeon doesn't probe due to #15181

notebook ostin # dmesg |grep radeon
[    6.476805] [drm] radeon defaulting to kernel modesetting.
[    6.476807] [drm] radeon kernel modesetting enabled.
[    6.476854] radeon 0000:01:00.0: enabling device (0000 -> 0003)
[    6.476863] radeon 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    6.476868] radeon 0000:01:00.0: setting latency timer to 64
[    6.546117] radeon 0000:01:00.0: Invalid ROM contents
[    6.546171] radeon 0000:01:00.0: Invalid ROM contents
[    6.546190] [drm:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
[    6.546192] radeon 0000:01:00.0: Fatal error during GPU init
[    6.546196] [drm] radeon: finishing device.
[    6.547337] radeon 0000:01:00.0: PCI INT A disabled
[    6.547346] radeon: probe of 0000:01:00.0 failed with error -22

and I need vgaswitcheroo, because ATI card consume much energy and notebook works 2-2.5 hours (in windows about 6 hours).
Comment 9 Dave Airlie 2011-03-01 07:40:18 UTC
my first guess is that the ATI card is actually powered off at the start, and we don't try to power on cards to post them.

I need to look at the code to see if I can readback the power state from the hw.
Comment 10 Antonov Nikolay 2011-03-08 17:48:57 UTC
Created attachment 50322 [details]
ubuntu natty alpha dmesg

fedora-20110302 (rawhide) fails to boot.
Ubntntu natty alpha3 boots well.

ubuntu:
Linux ubuntu 2.6.38-5-generic #32-Ubuntu SMP Tue Feb 22 16:10:15 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Linux-firmware 1.47

I compile 2.6.38-rc7-git4 with ubuntu kernel config(with minor chanes, like built-in sata-drivers, etc...), but it doesn't boot...
Comment 11 Antonov Nikolay 2011-04-09 20:28:13 UTC
Created attachment 53992 [details]
kernel bisect

Ok... I bisect kernel. But I am not totally sure in result (because "bad" results does not happens every boot)

Bisect shows that "bad" commit is d3147e86d71e74c93d361988d9441575da71345e but this is trivial patch, so I test commits-neighborhoods and 
5222454cf941b09205d502242dd1e44fd62aa551 "bad" too.

PS: after bug happens kernel(?) prints to console something like "__pm_runtime_resume() return 1"

PPS: https://bugs.freedesktop.org/show_bug.cgi?id=36003 looks like this bug

sorry for my English
Comment 12 Sébastien Villemot 2011-04-11 21:46:12 UTC
I am affected a quite similar problem.

I have a desktop PC with 2 graphics card: one Intel (bundled within i3 core cpu), and one Radeon.

Using kernel 2.6.38 (Debian version 2.6.38-3), I get:

Apr 11 22:30:50 brouzouf kernel: [    5.820704] radeon 0000:01:00.0: Invalid ROM contents
Apr 11 22:30:50 brouzouf kernel: [    5.820790] radeon 0000:01:00.0: Invalid ROM contents
Apr 11 22:30:50 brouzouf kernel: [    5.820817] [drm:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
Apr 11 22:30:50 brouzouf kernel: [    5.820843] radeon 0000:01:00.0: Fatal error during GPU init
Apr 11 22:30:50 brouzouf kernel: [    5.820866] [drm] radeon: finishing device.
Apr 11 22:30:50 brouzouf kernel: [    5.820868] [TTM] Memory type 2 has not been initialized.

My configuration works fine using kernel 2.6.32 (Debian version 2.6.32-31).

I do not use any special boot option (hence I am using KMS, which is activated by default under Debian).

Let me know if I can help in any way to help debugging this, I really need this to work.

Thanks
Comment 13 Sébastien Villemot 2011-04-12 20:53:48 UTC
Actually I resolved my problem by forcing the loading of the "radeon" module in initramfs, so that the Radeon card is initialized before the Intel card.

Note that I also have to take care of starting the X server for the radeon card before starting the X server for the intel one.
Comment 14 Marco Trevisan (Treviño) 2011-05-27 12:57:16 UTC
Could this related to Bug 15851 too?
Comment 15 Antonov Nikolay 2011-05-30 12:31:57 UTC
Yes, I can reproduce #15851:
steps:
Crtl+Alt+F1, "OFF" - everything is OK
Stop gdm daemon - OK
Start gdm or X - Freez.

with "ON" - X restarts successfully.

backtraces are very similar... so, I think it is one bug.
Comment 16 Seth Forshee 2011-06-03 13:53:31 UTC
Adding here some of the information that I added to the freedesktop.org bugzilla here:

https://bugs.freedesktop.org/show_bug.cgi?id=36003

It seems to me that nothing being done currently in the radeon and switcheroo code guarantees that the ATI card is powered on before probing the hardware. I tried adding a call to the ATPX method to turn on power from radeon_register_atpx_handler(), but this doesn't seem to be helping. Can anyone comment on what steps need to be taken to ensure that the card is powered on before proceeding with hardware initialization?
Comment 17 Antonov Nikolay 2011-06-18 19:11:13 UTC
I can't reproduce this bug on 2.6.39-git19 and 3.0-rc3.
Seems bug fixed.
Thanks!
Comment 18 Seth Forshee 2011-08-31 14:16:18 UTC
I just completed a bisection with some of the reporters to identify what fixed this, and it came down to this commit:

  commit 3448a19da479b6bd1e28e2a2be9fa16c6a6feb39
  Author: Dave Airlie <airlied@redhat.com>
  Date:   Tue Jun 1 15:32:24 2010 +1000

  vgaarb: use bridges to control VGA routing where possible.

I can't see why this would have any impact on whether or not the GPU is powered on when nouveau probes it. Is there any explanation for why this appears to fix the issue, or is it likely that it's just changing the timing enough to somehow mask it?

Note You need to log in before you can comment on or make changes to this bug.