[ltp] KDE crashes but not Gnome after suspend

Ivarsson, Torbjorn (T) linux-thinkpad@linux-thinkpad.org
Thu, 15 Apr 2004 22:09:52 -0500


To continue my story...

Whenever I suspend/resume KDE using APM, KDE crashes in a relatively reproducible fashion. The first time I suspend/resume everything works fine. The second time I suspend/resume I get the crash. When I do the second suspend the Konsole get a bunch of enters (newlines - I can see them before the computer suspends), and the screensaver password box pops up. Then everything goes black :) When I try to resume after the second suspend screen either goes black with a white line on the top, or I only see the bottom half of my desktop - the mouse works, but the system is responseless.

So, I suspect that the resume scripts are doing something after the first suspend so that the second suspend/resume fails. I added some debug-logging code into the scripts.

BTW: In Mandrake /etc/rc.d/init.d/apmd calls /usr/sbin/pmsuspend2. The pmsuspend2 script checks for ACPI or APM, and then calls /etc/sysconfig/suspend-scripts/suspend-control. The suspend-control script calls appropriate scripts in /etc/sysconfig/suspend-scripts/suspend.d/

Anyway, the suspend/resume scripts executes without any problems (as I can see). The second time I resume (i.e., when KDE crashes) and the pmsuspend2 script has finished, apmd calls the pmsuspend2 script again after about 6 seconds. This time to suspend. I don't know how to figure out why the script gets called a second time.

Checking the /var/log/syslog and comparing the resume-sequences, the steps are very similar between the first resume and the second resume. However, the first resume-sequence has some events *not* seen in the second resume-sequence.

This is what happens when I resume (taken from syslog), seen during both resume-sequences (except where noted):

+++ the next lines are common to both resumes +++
kernel: PCI: Setting latency timer of device 0000:00:1d.0 to 64
kernel: PCI: Setting latency timer of device 0000:00:1d.1 to 64
kernel: PCI: Setting latency timer of device 0000:00:1d.2 to 64
kernel: PCI: Found IRQ 11 for device 0000:02:07.0
kernel: PCI: Sharing IRQ 11 with 0000:00:1d.0
kernel: PCI: Sharing IRQ 11 with 0000:00:00.0
kernel: hda: Wakeup request inited, waiting for !BSY...
kernel: hda: start_power_step(step: 1000)
kernel: blk: queue cfcfec00, I/O limit 4095Mb (mask 0xffffffff)
kernel: hda: completing PM request, resume
kernel: hdc: Wakeup request inited, waiting for !BSY...
kernel: hdc: start_power_step(step: 1000)
kernel: hdc: completing PM request, resume
kernel: input: PS/2 Generic Mouse on isa0060/serio1

+++ the next lines are *not* seen for the second resume +++
kernel: agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0
kernel: agpgart: Putting AGP V2 device at 0000:00:00.0 into 1x mode
kernel: agpgart: Putting AGP V2 device at 0000:01:00.0 into 1x mode
kernel: [drm:radeon_cp_indirect] *ERROR* radeon_cp_indirect called without lock held

+++ the next line is common to both resumes +++
apmd[2111]: call proxy: Executing proxy: '/usr/sbin/pmsuspend2' 'resume' 'suspend'

+++ the next line is *not* seen during second resume +++
kernel: ts: Compaq touchscreen protocol output

+++ the next lines are common to both resumes +++
xinetd[3813]: Reading included configuration file: /etc/xinetd.d/cvs [file=/etc/xinetd.conf] [line=15]
xinetd[3813]: Reading included configuration file: /etc/xinetd.d/fam [file=/etc/xinet.d/fam] [line=12]
xinetd[3813]: Reading included configuration file: /etc/xinetd.d/rsync [file=/etc/xinet.d/rsync] [line=19]
xinetd[3813]: removing cvspserver
xinetd[3813]: removing rsync
xinetd[3813]: bind failed (Cannot assign requested address (errno = 99)). service = sgi_fam
xinetd[3813]: Service sgi_fam failed to start and is deactivated
xinetd[3813]: xinetd Version 2.3.13 started with libwrap options compiled in
xinetd[3813]: Started working: 0 available services
xinetd: xinetd startup succeeded

+++ the next lines are *not* seen for the second resume +++
kernel: Linux Kernel Card Services
kernel:   options:  [pci] [cardbus] [pm]
kernel: PCI: Found IRQ 11 for device 0000:02:00.0
kernel: PCI: Sharing IRQ 11 with 0000:00:1d.1
kernel: Yenta: CardBus bridge found at 0000:02:00.0 [1014:0528]
kernel: Yenta: ISA IRQ mask 0x06d8, PCI irq 11
kernel: Socket status: 30000007
kernel: agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0
kernel: agpgart: Putting AGP V2 device at 0000:00:00.0 into 1x mode
kernel: agpgart: Putting AGP V2 device at 0000:01:00.0 into 1x modekernel: 

+++ then follows the same lines for both resumes, ALSA and network are resumed +++


So, there's a clear error-message:

kernel: [drm:radeon_cp_indirect] *ERROR* radeon_cp_indirect called without lock held

that I'm not sure how to trouble shoot. The only thing the xfree suspend script (in suspend.d) is doing is to switch VT and tell the KDE screensaver to lock. I assume that X and/or the graphics-card (Radeon 7500) must be told to suspend/resume somewhere.

I've got a couple of questions:

1) Where can I find the scripts for suspend/resume of X and/or graphics-card?
2) Any ideas on how to fix the radeon_cp_indirect error? (Google didn't give me anything)
3) What is Yenta and Compaq Touchscreen doing in my system?
4) Where can I tap in and peek to see why apmd is doing a suspend directly after my second resume?
5) Any suggestions on how to proceed?


Thanks,
T.