Bug 32970 - [switchable] Xorg usually hangs up system on start
Summary: [switchable] Xorg usually hangs up system on start
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-10 08:22 UTC by Nikolay Amiantov
Modified: 2019-11-19 08:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
lspci -v (9.87 KB, text/plain)
2011-01-10 08:22 UTC, Nikolay Amiantov
no flags Details
dmesg when starts (30.22 KB, text/plain)
2011-01-10 08:24 UTC, Nikolay Amiantov
no flags Details
Xorg.log when hangups (7.16 KB, text/plain)
2011-01-10 08:24 UTC, Nikolay Amiantov
no flags Details
Xorg.log when starts (30.47 KB, text/plain)
2011-01-10 08:25 UTC, Nikolay Amiantov
no flags Details
intel_gpu_dump when starts (71.61 KB, application/x-bzip)
2011-01-10 08:25 UTC, Nikolay Amiantov
no flags Details
intel_gpu_dump after hangup (30.12 KB, application/x-bzip)
2011-01-13 04:01 UTC, Nikolay Amiantov
no flags Details
dmesg after hangup (30.12 KB, text/plain)
2011-01-13 04:01 UTC, Nikolay Amiantov
no flags Details

Description Nikolay Amiantov 2011-01-10 08:22:50 UTC
Created attachment 41846 [details]
lspci -v

Overview: On notebook with switchable graphics (Acer Aspire 4820TG-5454G50Miks) when switching to the integrated graphics card before starting Xorg server, system usually shows non-blanking cursor and hangs up.

Steps to reproduce:
1. Switch to the integrated graphics card with vgaswitcheroo (with or without switching off unused card)
2. Start Xorg

Actial results:
System hangs up.

Expected results:
Xorg starts properly, login screen is shown.

Build:
xf86-video-intel: fd9235ebe03a01982238cdd6e8b55f613e14b6af
Repeats with current stable version (2.14.0) and with older commits, also with older driver and Xorg versions on Gentoo Linux (~amd64 + x11 overlay)
Comment 1 Nikolay Amiantov 2011-01-10 08:24:10 UTC
Created attachment 41847 [details]
dmesg when starts
Comment 2 Nikolay Amiantov 2011-01-10 08:24:42 UTC
Created attachment 41848 [details]
Xorg.log when hangups
Comment 3 Nikolay Amiantov 2011-01-10 08:25:05 UTC
Created attachment 41849 [details]
Xorg.log when starts
Comment 4 Nikolay Amiantov 2011-01-10 08:25:59 UTC
Created attachment 41850 [details]
intel_gpu_dump when starts
Comment 5 Nikolay Amiantov 2011-01-10 08:31:19 UTC
When starts up successfully, there is no way to stop server completely (if trying, server output blanks, but I still have console and input, however, service stop doesn't complete, when trying to restart it, hangs up)

When I set discrete video card, server starts up normally.
Comment 6 Nikolay Amiantov 2011-01-10 08:39:17 UTC
Same results on Arch Linux (amd64 with [unstable]).
On Kubuntu 10.10, server usually starts normally if switched card while splash screen is showing, but there are multiple messages about lockups in VGA BIOS or something and no splash screen when shutting down.

Also, server starts either in some very rare cases or (I expect some kind of race) if I set switching script *after* kdm/Xorg start, but not too late. (however, I still need some luck every boot, after some reboots it might finally start) Don't really know if there is connection between this and success chance, but it seems to be true.
Comment 7 Nikolay Amiantov 2011-01-10 08:50:52 UTC
Finally, I can try to set up SSH server and get system logs after hangup, but only after 12.01.2010. Ask if you need any.
Comment 8 Chris Wilson 2011-01-11 16:24:48 UTC
commit 5222454cf941b09205d502242dd1e44fd62aa551
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Sep 22 12:31:46 2010 +1000

    drm/radeon: don't allow device to be opened if powered down
    
    If the switcheroo has switched the device off, don't let X open it.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
Comment 9 Nikolay Amiantov 2011-01-13 00:47:09 UTC
(In reply to comment #8)
> commit 5222454cf941b09205d502242dd1e44fd62aa551
> Author: Dave Airlie <airlied@redhat.com>
> Date:   Wed Sep 22 12:31:46 2010 +1000
> 
>     drm/radeon: don't allow device to be opened if powered down
> 
>     If the switcheroo has switched the device off, don't let X open it.
> 
>     Signed-off-by: Dave Airlie <airlied@redhat.com>

I have this chunk of my code in my kernel, and I'm running 2.6.37 now. Also, my first (card0) card is Intel according to debugfs.

uname -a
Linux abbradarbook 2.6.37-gentoo #4 SMP PREEMPT Fri Jan 7 15:20:35 MSK 2011 x86_64 Intel(R) Core(TM) i5 CPU M 450 @ 2.40GHz GenuineIntel GNU/Linux
Comment 10 Chris Wilson 2011-01-13 02:27:45 UTC
Yet you have a very suspiciously similar hang...
Comment 11 Nikolay Amiantov 2011-01-13 04:01:11 UTC
Created attachment 41956 [details]
intel_gpu_dump after hangup
Comment 12 Nikolay Amiantov 2011-01-13 04:01:56 UTC
Created attachment 41957 [details]
dmesg after hangup

Tho last lines look interesting.
Comment 13 Nikolay Amiantov 2011-01-13 04:31:19 UTC
According to this and my dmesg after hangup:
http://web.archiveorange.com/archive/v/fXkbRuBmy6ZxnQjvK84u
Looks like I really have a similar bug. Maybe, this check on disableness occurs only at the first open, and not when you reopened card or something similar. (really do not know anything about how video drivers in kernel work)
Comment 14 Nikolay Amiantov 2011-01-13 10:18:51 UTC
Bug is reproducable on the head kernel git commit at this moment:
commit	f878133bf022717b880d0e0995b8f91436fd605c
Comment 15 Martin Peres 2019-11-19 08:17:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/173.


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.