Bug 67107

Summary: Xorg starts and crashes with DPM enable
Product: DRI Reporter: Christopher Chmielewski <c.chmielewski>
Component: DRM/RadeonAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg
none
xorg log none

Description Christopher Chmielewski 2013-07-20 04:33:37 UTC
I have an a10-4600m processor that has a 7660G on die and I also have a 7670m discrete card, the latest linux-next kernel still causes my xorg to start then pause and go black when radeon.dpm=1 is passed. The computer then become totally unresponsive, the kernel works fine when the argument is not passed though.
Comment 1 Alex Deucher 2013-07-20 16:36:47 UTC
Does it work if you disable the dGPU before loading the radeon module?  Might be a duplicate of bug 66932.  Please make sure your kernel has the patches mentioned in that bug.
Comment 2 Christopher Chmielewski 2013-07-20 19:47:11 UTC
I'm not quite sure how to disable my discrete gpu before the radeon module is loaded but I did disable it before I ran startx and that didn't help. I also tried radeon.aspm=0 and that didn't help either. About the patches I am unsure how to test that I have them but I am running linux-next from the 19th so I'm pretty certain I do.
Comment 3 Christopher Chmielewski 2013-07-29 18:56:49 UTC
I just tried with rc3 and it still happens.
Comment 4 Christopher Chmielewski 2013-08-26 19:52:23 UTC
I'm on rc7 and while X doesn't just crash on start after a few minutes my entire computer locks up.
Comment 6 Alex Deucher 2013-08-26 20:01:45 UTC
(In reply to comment #4)
> I'm on rc7 and while X doesn't just crash on start after a few minutes my
> entire computer locks up.

Can you attach your dmesg output and xorg log?
Comment 7 Christopher Chmielewski 2013-08-27 22:07:23 UTC
Created attachment 84753 [details]
dmesg

Like I said it freezes up my computer so I had to restart in single user mode so there might be some extra stuff at the bottom.
Comment 8 Christopher Chmielewski 2013-08-27 22:08:57 UTC
Created attachment 84754 [details]
xorg log

Both the dmesg and xorg log are from rc7
Comment 9 Christopher Chmielewski 2013-09-17 02:01:08 UTC
This still happens with 3.12-rc1, X still starts and runs for about a minute and then the whole computer freezes and there is no way to recover.
Comment 11 Christopher Chmielewski 2013-09-17 17:57:08 UTC
Thanks that patch did the trick!
Comment 12 Adam Honse 2013-09-26 00:06:04 UTC
I'm using the Ubuntu kernel PPA's 3.12-rc2 kernel which according to the changelog has this patch but am still having the problem.  My laptop is A10-4600M with 7730M discrete GPU.  If I disable gdm and X, I can boot up, log in to a text mode terminal and do text mode things just fine and dmesg shows that dpm is enabled for both GPU's, but trying to start X crashes the entire machine instantly.  This happens when my laptop is plugged in and fully charged, haven't tested it unplugged and on battery.
Comment 13 Adam Honse 2013-10-02 02:51:32 UTC
To follow up with my previous comment, I tried disabling the discrete GPU.  In my case I disable it AFTER the radeon module is loaded (because doing it the other way around causes errors that lag the machine to an unusable state).  The machine has no means of disabling it in the BIOS so I use the acpi_call kernel module with the turn_off_gpu script from here: https://github.com/mkottman/acpi_call/

What I did was start the laptop with dpm=1 and gdm set to not start automatically so I'd boot to a text console.  Radeon module loads at boot and KMS sets the console to the appropriate resolution.  Then I insmod the acpi_call.ko and run the turn-off-gpu script which turns off the discrete GPU.  Then I started gdm, logged in, and ran glxgears to confirm that the integrated GPU was working (ran fine) and looked at Xorg.0.log to confirm radeon.dpm=1 (it did).  This was on battery power, haven't tested plugged in.  I'm downloading Open Arena now to see if gaming performance is improved.  Using xrandr --listproviders confirms that only one GPU is active and available which is the integrated one.
Comment 14 Adam Honse 2013-10-10 22:41:19 UTC
I'm marking this as reopened.  Still having the problem with kernel 3.12-rc4 which has that patch.  Starting the machine with radeon.dpm=1 works fine until I start Xorg (sudo start gdm on Ubuntu), then it blank screens and hangs completely within seconds.  I cannot reliably shut off the dGPU before loading the Radeon module and trying to shut the dGPU off after loading Radeon but before starting Xorg results in the turn_off_gpu script hanging at the ACPI call that is supposed to work for my card when radeon.dpm=1.

One thing I've noticed from reading the bugs related to this is everyone seems to be using VLIW + VLIW systems.  Mine is VLIW + GCN (r600 + radeonsi) as the 7730M (AMD VERDE) is GCN while the integrated 7660G (AMD ARUBA) is VLIW.  I'm not sure if this has any effect on the bug or not, but I figured it's worth mentioning.
Comment 15 Alex Deucher 2013-10-10 23:06:57 UTC
Does this branch work any better?
http://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next-3.13-wip
please also try cherry-picking this commit as well:
http://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-fixes-3.12&id=4076a65544e2de310cbf4eaadb13ee15bbfaaf4f

Also, does vgaswitcheroo not work for you?  Why are you manually messing around with acpi methods?
Comment 16 Adam Honse 2013-10-10 23:20:00 UTC
VGA switcheroo doesn't show up for me.  I've been using kernels from Ubuntu's kernel ppa (daily and -rc builds) but I'll try building my own from your tree and see if that fixes it.
Comment 17 Adam Honse 2013-10-11 22:43:06 UTC
That kernel worked for getting Xorg to not crash, and GNOME 3.10 is working smoothly.  Now my problem is that with radeon.dpm=1 set, GNOME running, if I try to play Team Fortress 2 it crashes right as it should transition into the 3D game mode (after the loading screen when connecting to a server).  The menus and animated character models in the backpack screen work fine.  It is a full crash to desktop and also crashes Xorg at the same time to the point I can't switch VT's.  ONLY happens with DPM enabled though, with DPM disabled using that kernel build TF2 plays fine (albeit at 17fps).  I'll test some other games like OpenArena.
Comment 18 Adam Honse 2013-10-12 01:08:10 UTC
Ok, that was a problem with my xserver-xorg-video-radeon installation.  Everything seems to be working fine with that kernel and patch now!  Marking as resolved - fixed.

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.