Bug 41642 - radeon [XPRESS 200M 5955] wakeup from S3 and going into S4 broken with KMS and enabled framebuffer
radeon [XPRESS 200M 5955] wakeup from S3 and going into S4 broken with KMS an...
Status: RESOLVED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel)
All Linux
: P1 normal
Assigned To: drivers_video-dri
:
Depends on:
Blocks: 7216
  Show dependency treegraph
 
Reported: 2011-08-24 09:49 UTC by CameronPoe
Modified: 2011-09-08 12:06 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.34 and higher (including 3.0)
Tree: Mainline
Regression: No


Attachments
my Xorg.0.log (34.44 KB, text/plain)
2011-08-24 09:49 UTC, CameronPoe
Details
my pm-suspend.log with kernel command 'no_console_suspend' - suspend and hibernation won't work properly either (6.24 KB, text/plain)
2011-08-24 09:53 UTC, CameronPoe
Details
my pm-suspend.log with kernel command 'nomodeset' and 'vga=0' - suspend and hibernation works fine (8.27 KB, application/octet-stream)
2011-08-24 09:55 UTC, CameronPoe
Details
fix (1.23 KB, patch)
2011-08-29 14:57 UTC, Alex Deucher
Details | Diff

Description CameronPoe 2011-08-24 09:49:39 UTC
Created attachment 69852 [details]
my Xorg.0.log

I have a problem with suspend and hibernation on openSUSE 11.3 x86_64 on my HP Compaq Presario V5245EU laptop with upgraded ram to 2 GB.

When I type in the console "s2ram -n" I get:

Machine unknown
This machine can be identified by:
    sys_vendor   = "Hewlett-Packard"
    sys_product  = "Presario V5000 (EW848EA#ABU)      "
    sys_version  = "F.54"
    bios_version = "F.54"

This is updated bios to the newest version. I scanned my ram and it passed the test. I have never had any problems with suspend and hibernation on windows xp.

I have tested suspend feature on openSUSE, Mandriva, Debian, Gentoo, Kubuntu, Fedora with LXDE, YlmfOS with Gnome and I have problem with waking up the system from suspend on all of them.

Basically when I select suspend from KDE menu or type the command in the console my laptop goes to sleep but when I switch it back on I can hear the cd-rom waking up, I see hdd led flashing for a wile but I can't actually hear it working, screen and wi-fi led won't even blink and after few seconds I can hear the fan on a high speed but that's it, keyboard doesn't respond at all. I have to press and hold the switch button for few seconds to reboot my laptop.

When I select hibernate from KDE menu or type the command in the console it freezes immediately when I see hibernating splash screen or the message "s2disk: Snapshotting system". And again I have to press and hold the switch button for few seconds to reboot my laptop. I haven't had that problem with only hibernation on Mandriva 2010.1 Free x86_64 because it uses 'nomodeset' I think.

I have 2 GB swap partition on. I use original open drivers for my graphics card and wi-fi. I tried to update pm-utils and suspend packages to the newest and oldest versions (1.4.1 and 0.99) but it didn't help. I have installed newest openSUSE 11.4 and Kernel 3.0 but the problem still exist :(

Hibernation is working fine only when I add 'nomodeset' into kernel command line in the /boot/grub/menu.lst.
Suspend will work too but only if I add 'nomodeset' and change 'vga=0x317' to
'vga=0' or 'vga=normal' or delete that entry.

Unfortunately with this 'nomodeset' my KDE applications get 'crazy'. Basically while watching a movie or browsing the Internet with Firefox or even just like that it logs me out and I have to put my password and wait for the system to start a new session. It logs me out very often so I can't have this 'nomodeset' on :(

I have tried: noapic, nolapic, acpi_osi=, acpi_osi="Windows 2000" ...2006", acpi_osi="Linux",
and even acpi=off, s2ram -f -p -m -a 1 ... -a 2... -a 3,
pm-suspend & pm-hibernate (all options), s2disk, s2both & pm-suspend-hybrid
...none of them help to solve my problem.

I updated XOrg to X Server 1.9.3 but that didn't solve the problem either :(

Can someone fix this bug in Kernel with KMS, PLEASE?!
Comment 1 CameronPoe 2011-08-24 09:53:00 UTC
Created attachment 69862 [details]
my pm-suspend.log with kernel command 'no_console_suspend'  - suspend and hibernation won't work properly either
Comment 2 CameronPoe 2011-08-24 09:55:01 UTC
Created attachment 69872 [details]
my pm-suspend.log with kernel command 'nomodeset' and 'vga=0' - suspend and hibernation works fine
Comment 3 Alex Deucher 2011-08-24 20:11:01 UTC
Does this patch help?

diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index e0138b6..913a30b 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -3298,6 +3298,8 @@ void radeon_combios_asic_init(struct drm_device *dev)
            rdev->pdev->subsystem_device == 0x30a4)
                return;
 
+       return;
+
        /* DYN CLK 1 */
        table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE);
        if (table)

If so, please attach your lspci -vnn output so we can add a proper quirk for your laptop.
Comment 4 CameronPoe 2011-08-26 19:04:17 UTC
And how do I do that exactly?
Patching in Linux is a new thing for me ;)
Comment 5 Alex Deucher 2011-08-26 20:46:16 UTC
Since this patch is so small, just open up drivers/gpu/drm/radeon/radeon_combios.c in your kernel source tree and type:

return;

on the line above the /* DYN CLK 1 */ comment.  Then save the file and build/install your kernel.
Comment 6 CameronPoe 2011-08-26 21:35:42 UTC
I have download the source of kernel 3.0.3 but this 'return;' is already there and it looks like that:

/* quirk for rs4xx HP dv5000 laptop to make it resume
	 * - it hangs on resume inside the dynclk 1 table.
	 */
	if (rdev->family == CHIP_RS480 &&
	    rdev->pdev->subsystem_vendor == 0x103c &&
	    rdev->pdev->subsystem_device == 0x30a4)
		return;

	/* DYN CLK 1 */
	table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE);
	if (table)
		combios_parse_pll_table(dev, table);



So should I make second 'return;' entry to look like that???:

/* quirk for rs4xx HP dv5000 laptop to make it resume
	 * - it hangs on resume inside the dynclk 1 table.
	 */
	if (rdev->family == CHIP_RS480 &&
	    rdev->pdev->subsystem_vendor == 0x103c &&
	    rdev->pdev->subsystem_device == 0x30a4)
		return;
                return;
	/* DYN CLK 1 */
	table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE);
	if (table)
		combios_parse_pll_table(dev, table);
Comment 7 CameronPoe 2011-08-27 14:23:05 UTC
I did as I wrote above and it is working as you said :))))))))))

THANK YOU SO MUCH!!!!!!!!!

This is the output of my 'lspci -vnn':




00:00.0 Host bridge [0600]: ATI Technologies Inc RS480 Host Bridge [1002:5950] (rev 01)
        Subsystem: Hewlett-Packard Company Device [103c:30ae]
        Flags: bus master, 66MHz, medium devsel, latency 64

00:01.0 PCI bridge [0604]: ATI Technologies Inc RS480 PCI Bridge [1002:5a3f] (prog-if 00 [Normal decode])
        Flags: bus master, 66MHz, medium devsel, latency 64
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
        I/O behind bridge: 00009000-00009fff
        Memory behind bridge: c0100000-c01fffff
        Prefetchable memory behind bridge: 00000000c8000000-00000000cfffffff
        Capabilities: [44] HyperTransport: MSI Mapping Enable+ Fixed+
        Capabilities: [b0] Subsystem: Hewlett-Packard Company Device [103c:30ae]

00:05.0 PCI bridge [0604]: ATI Technologies Inc RS480 PCI Bridge [1002:5a37] (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=02, subordinate=03, sec-latency=0
        Capabilities: [50] Power Management version 3
        Capabilities: [58] Express Root Port (Slot-), MSI 00
        Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
        Capabilities: [b0] Subsystem: ATI Technologies Inc Device [1002:5950]
        Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+
        Capabilities: [100] Advanced Error Reporting
        Kernel driver in use: pcieport

00:13.0 USB Controller [0c03]: ATI Technologies Inc IXP SB400 USB Host Controller [1002:4374] (prog-if 10 [OHCI])
        Subsystem: ATI Technologies Inc IXP SB400 USB Host Controller [1002:4374]
        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19
        Memory at c0000000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit-
        Kernel driver in use: ohci_hcd

00:13.1 USB Controller [0c03]: ATI Technologies Inc IXP SB400 USB Host Controller [1002:4375] (prog-if 10 [OHCI])
        Subsystem: ATI Technologies Inc IXP SB400 USB Host Controller [1002:4375]
        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19
        Memory at c0001000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit-
        Kernel driver in use: ohci_hcd

00:13.2 USB Controller [0c03]: ATI Technologies Inc IXP SB400 USB2 Host Controller [1002:4373] (prog-if 20 [EHCI])
        Subsystem: ATI Technologies Inc IXP SB400 USB2 Host Controller [1002:4373]
        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19
        Memory at c0002000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [dc] Power Management version 2
        Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit-
        Kernel driver in use: ehci_hcd

00:14.0 SMBus [0c05]: ATI Technologies Inc IXP SB400 SMBus Controller [1002:4372] (rev 11)
        Subsystem: Hewlett-Packard Company Device [103c:30ae]
        Flags: 66MHz, medium devsel
        I/O ports at 8400 [size=16]
        Memory at c0003000 (32-bit, non-prefetchable) [size=1K]
        Capabilities: [b0] HyperTransport: MSI Mapping Enable- Fixed+
        Kernel driver in use: piix4_smbus

00:14.1 IDE interface [0101]: ATI Technologies Inc IXP SB400 IDE Controller [1002:4376] (prog-if 8a [Master SecP PriP])
        Subsystem: Hewlett-Packard Company Device [103c:30ae]
        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 16
        I/O ports at 01f0 [size=8]
        I/O ports at 03f4 [size=1]
        I/O ports at 0170 [size=8]
        I/O ports at 0374 [size=1]
        I/O ports at 8410 [size=16]
        Capabilities: [70] MSI: Enable- Count=1/1 Maskable- 64bit-
        Kernel driver in use: pata_atiixp

00:14.3 ISA bridge [0601]: ATI Technologies Inc IXP SB400 PCI-ISA Bridge [1002:4377]
        Flags: bus master, 66MHz, medium devsel, latency 0

00:14.4 PCI bridge [0604]: ATI Technologies Inc IXP SB400 PCI-PCI Bridge [1002:4371] (prog-if 01 [Subtractive decode])
        Flags: bus master, 66MHz, medium devsel, latency 64
        Bus: primary=00, secondary=06, subordinate=07, sec-latency=64
        I/O behind bridge: 0000a000-0000afff
        Memory behind bridge: c0200000-c02fffff

00:14.5 Multimedia audio controller [0401]: ATI Technologies Inc IXP SB400 AC'97 Audio Controller [1002:4370] (rev 02)
        Subsystem: Hewlett-Packard Company Device [103c:30ae]
        Flags: bus master, 66MHz, slow devsel, latency 64, IRQ 17
        Memory at c0003400 (32-bit, non-prefetchable) [size=256]
        Capabilities: [40] MSI: Enable- Count=1/1 Maskable- 64bit-
        Kernel driver in use: ATI IXP AC97 controller

00:14.6 Modem [0703]: ATI Technologies Inc SB400 AC'97 Modem Controller [1002:4378] (rev 02) (prog-if 00 [Generic])
        Subsystem: Hewlett-Packard Company Device [103c:30ae]
        Flags: bus master, 66MHz, slow devsel, latency 64, IRQ 17
        Memory at c0003800 (32-bit, non-prefetchable) [size=256]
        Capabilities: [40] MSI: Enable- Count=1/1 Maskable- 64bit-
        Kernel driver in use: ATI IXP MC97 controller

00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration [1022:1100]
        Flags: fast devsel
        Capabilities: [80] HyperTransport: Host or Secondary Interface

00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map [1022:1101]
        Flags: fast devsel

00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller [1022:1102]
        Flags: fast devsel

00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control [1022:1103]
        Flags: fast devsel
        Kernel driver in use: k8temp

01:05.0 VGA compatible controller [0300]: ATI Technologies Inc Radeon XPRESS 200M 5955 (PCIE) [1002:5955] (prog-if 00 [VGA controller])
        Subsystem: Hewlett-Packard Company Device [103c:30ae]
        Flags: bus master, 66MHz, medium devsel, latency 66, IRQ 17
        Memory at c8000000 (32-bit, prefetchable) [size=128M]
        I/O ports at 9000 [size=256]
        Memory at c0100000 (32-bit, non-prefetchable) [size=64K]
        [virtual] Expansion ROM at c0120000 [disabled] [size=128K]
        Capabilities: [50] Power Management version 2
        Kernel driver in use: radeon

06:02.0 Network controller [0280]: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller [14e4:4318] (rev 02)
        Subsystem: Hewlett-Packard Company Broadcom 802.11b/g WLAN [103c:1356]
        Flags: bus master, fast devsel, latency 64, IRQ 21
        Memory at c0200000 (32-bit, non-prefetchable) [size=8K]
        Kernel driver in use: b43-pci-bridge

06:06.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ [10ec:8139] (rev 10)
        Subsystem: Hewlett-Packard Company Device [103c:30a4]
        Flags: bus master, medium devsel, latency 128, IRQ 22
        I/O ports at a000 [size=256]
        Memory at c0202000 (32-bit, non-prefetchable) [size=256]
        Capabilities: [50] Power Management version 2
        Kernel driver in use: 8139too
Comment 8 Alex Deucher 2011-08-29 14:57:35 UTC
Created attachment 70792 [details]
fix

I've gone ahead and sent the attached patch to Dave for 3.1 and stable kernels.
Comment 9 Florian Mickler 2011-09-08 10:14:22 UTC
A patch referencing this bug report has been merged in Linux v3.1-rc5:

commit 302a8e8b06d312dcb3b718dfeb42aa912b5f426b
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Aug 29 14:55:25 2011 +0000

    drm/radeon/kms: add s/r quirk for Compaq Presario V5245EU

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