Bug 38754 - Complete Freeze when loading radeon module
Summary: Complete Freeze when loading radeon module
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-28 10:07 UTC by Perry3D
Modified: 2011-08-08 01:49 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Output of dmesg without loading the module. (37.51 KB, text/x-log)
2011-06-28 10:07 UTC, Perry3D
no flags Details
the output of dmesg after loading the radeon module. (40.14 KB, patch)
2011-06-28 10:08 UTC, Perry3D
no flags Details | Splinter Review
The Xorg log file when the system freezed. (18.52 KB, patch)
2011-06-28 10:09 UTC, Perry3D
no flags Details | Splinter Review
the output of lpci -vvnn (system started with internal card). (17.22 KB, text/x-log)
2011-06-28 10:09 UTC, Perry3D
no flags Details
kernel.log with monitor plugged in via HDMI. Radeon module is loaded by 'modprobe radeon'. But it gives no output. (77.15 KB, text/x-log)
2011-06-29 10:23 UTC, Perry3D
no flags Details
kernel.log for may be this problem (199.89 KB, text/plain)
2011-06-30 12:10 UTC, Igor
no flags Details
kernel.log. The important part is at the end. (79.93 KB, text/x-log)
2011-06-30 15:28 UTC, Perry3D
no flags Details
the output of lpci -vvnn (root) (system started with internal card). (32.07 KB, text/x-log)
2011-06-30 15:34 UTC, Perry3D
no flags Details
Xorg.0.log with Catalyst driver (75.11 KB, text/plain)
2011-07-07 11:59 UTC, Perry3D
no flags Details
possible fix (1.09 KB, patch)
2011-07-25 10:34 UTC, Alex Deucher
no flags Details | Splinter Review

Description Perry3D 2011-06-28 10:07:23 UTC
Created attachment 48523 [details]
Output of dmesg without loading the module.

Hi,

i am using Arch Linux with with the following kernels:
- kernel26-drm-radeon-testing 20110605-1
- kernel26 2.6.39.1-1
- kernel26-git 20110625-1

with my new ATI card (http://be.msi.com/product/vga/R6870-Hawk.html) i get a complete system freeze (no SysRq Keys) after loading the radeon module. Except i don't plug in a monitor. I already tried all three kernel versions: no success.

I have no problems if i use my internal radeon card (Radeon HD 3300).

Sadly i cannot find any advices in the kernel.log file.
So, i blacklisted the module and disabled gdm to get a terminal. The output of dmesg is attached.
Then i plugged of the monitor and logged in (ssh). After that i loaded the radeon module (see the attached output). It doesn't crash but i cannot see anything on the monitor.
Now i started gdm and my system freezed (Xorg.1.log).

Any ideas? 
How can i provide more information?
Comment 1 Perry3D 2011-06-28 10:08:15 UTC
Created attachment 48524 [details] [review]
the output of dmesg after loading the radeon module.
Comment 2 Perry3D 2011-06-28 10:09:03 UTC
Created attachment 48525 [details] [review]
The Xorg log file when the system freezed.
Comment 3 Perry3D 2011-06-28 10:09:43 UTC
Created attachment 48526 [details]
the output of lpci -vvnn (system started with internal card).
Comment 4 Alex Deucher 2011-06-28 15:07:28 UTC
Probably a duplicate of bug 38583.  Can you try the patches I noted in comment 3?
Comment 5 Perry3D 2011-06-29 09:22:45 UTC
Hi Alex,

thanks for your answer.
I'm sorry, but these two patches are already included in the kernel26-git package i mentioned in the first post. I checked the git log :/ . And it doesn't help.
But to be sure i will compile the actual git kernel.

Do you have some other suggestions?

Greetings Perry
Comment 6 Alex Deucher 2011-06-29 09:32:32 UTC
What kind of monitor(s) are you using and what connector(s) on the card are you using?  The driver is not able to detect any monitor attached.
Comment 7 Perry3D 2011-06-29 10:06:26 UTC
I compiled the newest kernel from git. No difference.

I'm using a Hyundai W241D. It is connected via DVI.
I will test the HDMI Connector as soon as i find a cable.

Are you referring to the dmesg output? Then it is right, i plugged off the monitor. Otherwise the system instantly freezes.
Comment 8 Perry3D 2011-06-29 10:22:33 UTC
I tested the HDMI connector. It still freezes.

Now the attached kernel_hdmi.log is produced while the monitor was plugged in. But i cannot find any message after i executed 'modprobe radeon'. It immediately crashes.

I have two additional remarks:
- i have no problems with Windows 7.
- after a freeze i have to turn of my PC completely. If i only press reset the monitor stays black.
Comment 9 Perry3D 2011-06-29 10:23:47 UTC
Created attachment 48566 [details]
kernel.log with monitor plugged in via HDMI. Radeon module is loaded by 'modprobe radeon'. But it gives no output.
Comment 10 Igor 2011-06-30 12:10:47 UTC
Created attachment 48618 [details]
kernel.log for may be this problem

Hi all,

It seems that I have nearly the same issue. I bought a new Radeon HD6850 Sapphire card, and when I tried to boot my system after installation, I got a black screen (no X at that moment). But I was able to use my keyboard (actually I tried to login as root and run 'halt' command).

I'm attaching my kernel.log file. If you want some additional info/logs, please let me know.

Unluckily, it seems that I won't have time this and may be next week to try something you can advise (e.g. new kernel or smth else). Sorry about that.  

Thanks for your work guys!

Regards,
Igor.
Comment 11 Alex Deucher 2011-06-30 13:35:07 UTC
(In reply to comment #10)
> It seems that I have nearly the same issue. I bought a new Radeon HD6850
> Sapphire card, and when I tried to boot my system after installation, I got a
> black screen (no X at that moment). But I was able to use my keyboard (actually
> I tried to login as root and run 'halt' command).

Can you try the patches referenced in bug 38583?
Comment 12 Perry3D 2011-06-30 15:28:20 UTC
Created attachment 48621 [details]
kernel.log. The important part is at the end.

There is a difference: when i load the radeon module the system is totally unresponsive: no keyboard, no shh.

I tested some module options and one time it gives me some output to the kernel.log. As i tried it a second time there was no messages in the kernel.log. Seems to be random.

The command was: modprobe radeon no_wb=1 dynclks=0 vramlimit=500000 test=0 tv=0 audio=0 hw_i2c=0 pcie_gen2=0

And there is no crash if i append modeset=0.
Comment 13 Alex Deucher 2011-06-30 15:34:18 UTC
(In reply to comment #12)
> The command was: modprobe radeon no_wb=1 dynclks=0 vramlimit=500000 test=0 tv=0
> audio=0 hw_i2c=0 pcie_gen2=0

You shouldn't need to specify any of those options, specifically, no_wb may cause problems on your board.  Does it work any better if you just do:
modprobe radeon modeset=1
Comment 14 Perry3D 2011-06-30 15:34:37 UTC
Created attachment 48622 [details]
 the output of lpci -vvnn (root) (system started with internal card).
Comment 15 Perry3D 2011-06-30 15:53:48 UTC
modprobe radeon modeset=1 also freeze the system :(.
Isn't that the default parameter?
Comment 16 Igor 2011-06-30 22:12:49 UTC
Yes, just forgot to mention, my system boots fine with modeset=0 (but I'm not able to use X since xf86-video-ati needs KMS), also it's working fine with catalyst.

Alex, I will definitely try those patches, just a little bit later, sorry.
Comment 17 Perry3D 2011-07-04 10:58:29 UTC
I don't if this is a useful information but my card is slightly overclocked ex factory. The default clock for a HD6870 is 900 Mhz and my card has 930 Mhz.

Anyone has more suggestions what information i can provide additionally? 

Maybe i will try the catalyst driver :/
Comment 18 Perry3D 2011-07-07 11:59:54 UTC
Created attachment 48863 [details]
Xorg.0.log with Catalyst driver

I tested the current catalyst driver. No problems so far.
Comment 19 Igor 2011-07-09 11:51:39 UTC
Just tried latest kernel-git (linux-git from AUR), and I'm able to run X. So it seems that my problem was a duplicate of 38583 and it is fixed now.
Comment 20 Alex Deucher 2011-07-11 06:40:07 UTC

*** This bug has been marked as a duplicate of bug 38583 ***
Comment 21 Perry3D 2011-07-11 14:46:57 UTC
I am sorry. But this bug still exists for my system. I also tried the kernel26-git (20110711) package but i get the same crash as before.
And it seems that i have a slightly different problem as Igor cause i am not able to use my keyboard after the black screen. Even the num lock is not working any more.
Comment 22 Rob Wouters 2011-07-19 05:49:41 UTC
> with my new ATI card (http://be.msi.com/product/vga/R6870-Hawk.html) i get a
> complete system freeze (no SysRq Keys) after loading the radeon module. Except
> i don't plug in a monitor. I already tried all three kernel versions: no
> success.

I have the exact same bug with the exact same card. I just tried kernel 3.0-rc7 which immediately hard freezes upon boot. The patches mentioned in bug #38583 seem to be already applied to 3.0-rc7 and do not offer a solution. I am currently running 2.6.38 however which works perfectly fine.

If anybody can help/guide me tracking this issue down further I am happy to do so.
Comment 23 Alex Deucher 2011-07-19 21:03:32 UTC
(In reply to comment #22)
> I have the exact same bug with the exact same card. I just tried kernel 3.0-rc7
> which immediately hard freezes upon boot. The patches mentioned in bug #38583
> seem to be already applied to 3.0-rc7 and do not offer a solution. I am
> currently running 2.6.38 however which works perfectly fine.
> 
> If anybody can help/guide me tracking this issue down further I am happy to do
> so.

Can you bisect?
Comment 24 Rob Wouters 2011-07-21 07:42:04 UTC
(In reply to comment #23)
> (In reply to comment #22)
> > I have the exact same bug with the exact same card. I just tried kernel 3.0-rc7
> > which immediately hard freezes upon boot. The patches mentioned in bug #38583
> > seem to be already applied to 3.0-rc7 and do not offer a solution. I am
> > currently running 2.6.38 however which works perfectly fine.
> > 
> > If anybody can help/guide me tracking this issue down further I am happy to do
> > so.
> 
> Can you bisect?

Any links you can give me to figure out how to do that?
Comment 25 Rob Wouters 2011-07-21 18:12:53 UTC
(In reply to comment #24)
> (In reply to comment #23)
> > (In reply to comment #22)
> > > I have the exact same bug with the exact same card. I just tried kernel 3.0-rc7
> > > which immediately hard freezes upon boot. The patches mentioned in bug #38583
> > > seem to be already applied to 3.0-rc7 and do not offer a solution. I am
> > > currently running 2.6.38 however which works perfectly fine.
> > > 
> > > If anybody can help/guide me tracking this issue down further I am happy to do
> > > so.
> > 
> > Can you bisect?
> 
> Any links you can give me to figure out how to do that?

(In reply to comment #23)
> (In reply to comment #22)
> > I have the exact same bug with the exact same card. I just tried kernel 3.0-rc7
> > which immediately hard freezes upon boot. The patches mentioned in bug #38583
> > seem to be already applied to 3.0-rc7 and do not offer a solution. I am
> > currently running 2.6.38 however which works perfectly fine.
> > 
> > If anybody can help/guide me tracking this issue down further I am happy to do
> > so.
> 
> Can you bisect?

Ok, I managed to figure out how to bisect:

desktop linux # git bisect good
2feea49ae34a2fcea1035136b85f5eaca56f5cd0 is the first bad commit
commit 2feea49ae34a2fcea1035136b85f5eaca56f5cd0
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Tue Apr 12 14:49:24 2011 -0400

    drm/radeon/kms: properly program vddci on evergreen+
    
    Change vddci as well as vddc when changing power modes
    on evergreen/ni.  Also, properly set vddci on boot up
    for ni cards.  The vbios only sets the limited clocks
    and voltages on boot until the mc ucode is loaded.  This
    should fix stability problems on some btc cards.
    
    Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

:040000 040000 cdec09fa04a3c2c659ca5490b129c7ca0ef0cd35 f10955ccdf6658b033f11e4e5e1af7736ed5e723 M      drivers

If you need more info let me know.
Comment 26 Rob Wouters 2011-07-22 12:16:29 UTC
Some more info: I am now successfully running kernel 3.0 (final) with the following line (from the commit found with bisect above) commented out, twice:

    radeon_atom_set_voltage(rdev, voltage->vddci, SET_VOLTAGE_TYPE_ASIC_VDDCI);

I realize this is just a (ugly) workaround, but hopefully this narrows down the problem. I have enabled the debug setting in the DRM module to found out to what value it's trying to set vddci:

    desktop ~ # grep vddci /var/log/messages 
    Jul 22 20:45:23 desktop kernel: [drm:evergreen_pm_misc], Setting: vddci: 1150

I have no idea if this value is too high or too low, but it seems (to me) this is what triggers the bug.

I hope this helps and again let me know if I can provide more information.
Comment 27 Perry3D 2011-07-25 08:09:00 UTC
I can confirm this workaround with kernel 3.0. Thx Rob.
Comment 28 Alex Deucher 2011-07-25 10:34:37 UTC
Created attachment 49534 [details] [review]
possible fix

Does this patch help?
Comment 29 Rob Wouters 2011-07-25 15:39:45 UTC
(In reply to comment #28)
> Created an attachment (id=49534) [details]
> possible fix
> 
> Does this patch help?

Yes, this fixed it! Thank you! :)
Comment 30 Perry3D 2011-07-27 14:53:51 UTC
Works for me too :)
Comment 31 Florian Mickler 2011-08-08 01:49:47 UTC
A patch referencing this bug report has been merged in Linux v3.1-rc1:

commit 4639dd21e759e32125adc7171abf6cb8140d54cf
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Jul 25 18:50:08 2011 -0400

    drm/radeon/kms: add missing vddci setting on NI+


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.