public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: apm suspend broken in 2.4.10
@ 2001-09-28 22:30 Alex Cruise
  2001-09-28 22:31 ` Randy.Dunlap
  0 siblings, 1 reply; 19+ messages in thread
From: Alex Cruise @ 2001-09-28 22:30 UTC (permalink / raw)
  To: 'Randy.Dunlap'; +Cc: 'linux-kernel@vger.kernel.org'

From: Randy.Dunlap [mailto:rddunlap@osdlab.org]
 
> > Here's the complete list of modules which might typically 
> > be loaded at boot:
> > [ ad nausaeum ]

> Unload some of these (that you don't really need to run)
> and try "apm -s".
> If that fails, unload some more of them and try again...
> That would at least narrow down the search for us.

I already tried that... Maybe my message didn't get through :)  

>AC> Just for fun, I tried removing all of my loaded 2.4.10 modules one by
one,
>AC> and attempting 'apm --suspend' in between, and still had the same
problem
>AC> when I got down to the bare minimum (ext3 and jbd)

Anyway, it looks like something keyboard- or A20-related is vetoing my
suspend request.  Did you get my "the plot thickens" message?  It's not
appearing in the lkml archives, maybe it got lost last night.

-0xe1a

^ permalink raw reply	[flat|nested] 19+ messages in thread
[parent not found: <6B90F0170040D41192B100508BD68CA1015A81B2@earth.infowave.co m>]
* RE: apm suspend broken in 2.4.10
@ 2001-09-28  3:03 Alex Cruise
  0 siblings, 0 replies; 19+ messages in thread
From: Alex Cruise @ 2001-09-28  3:03 UTC (permalink / raw)
  To: 'Randy.Dunlap'; +Cc: 'linux-kernel@vger.kernel.org'

The plot thickens!  Here's what I did:

In kernel/pm.c, at around line 242, I inserted these lines:

	if (status) {
		// inserted by awc

		printk( "awc: APM Suspend vetoed by: \n");
		printk( "  type = %d", dev->type );
		printk( " id = %d", dev->id );
		printk( " callback = %d", dev->callback );
		printk( " data = %d", dev->data );
		printk( " flags = %d", dev->flags );
		printk( " state = %d", dev->state );
		printk( " prev_state = %d\n", dev->prev_state );
	
		// we now return to your regularly scheduled kernel...

...and after compiling, installing, rebooting and entering "apm --suspend"
at a vc, I found this in syslog:

Sep 27 19:39:09 onus kernel: awc: APM Suspend vetoed by: 
Sep 27 19:39:09 onus kernel:   type = 1 id = 1104151299 callback =
-1072064644 data = 0 flags = 0 state = 0 prev_state = 0

1104151299 is 0x41D00303, which if you consult your include/linux/pm.h
(PM_SYS_DEV = 1, PM_SYS_KBC = 0x41d00303), would seem AFAICT to indicate
that it's the keyboard driver--or something upstream of it--who's vetoing my
suspend.  Am I crazy?

Obviously, apart from the final CR after typing "apm --suspend", I'm not
touching the keyboard before it fails.  I tried asking KLaptop (the KDE
power applet) to suspend using the mouse, and I found exactly the same debug
output repeated in syslog.

-0xe1a

^ permalink raw reply	[flat|nested] 19+ messages in thread
* RE: apm suspend broken in 2.4.10
@ 2001-09-28  1:50 Alex Cruise
  2001-09-28 22:05 ` Randy.Dunlap
  0 siblings, 1 reply; 19+ messages in thread
From: Alex Cruise @ 2001-09-28  1:50 UTC (permalink / raw)
  To: 'Randy.Dunlap'; +Cc: 'linux-kernel@vger.kernel.org'

From: Randy.Dunlap [mailto:rddunlap@osdlab.org]

> > I'm gonna go try the 2.4.7 from RH's "Roswell" beta now.
> OK, thanks for testing that.

2.4.7 has the apm=on bug and won't suspend either... I'm beginning to
suspect that something else is afoot, but I might as well try 2.4.2... 

Funny, with 2.4.2, "apm=on" seems to work as expected, and the first time I
tried "apm --suspend", the screen blanked but nothing else appeared to
happen.  When I hit a key, the suspend command appeared to still be running.
I switched to a different vc and did a "ps ax", it looked like it was  stuck
in the middle of trying to unmount an smbfs filesystem.

Next time I booted up, I umounted the smbfs system and did an "apm
--suspend" that appears to have shut everything down... And when I hit the
power button, it comes up again, albeit with an incredibly dim screen (a
common problem on this Dell Latitude C600).

So, from the point of view of my laptop, something important seems to have
changed between 2.4.2 and 2.4.7.

> I suspect that it's something like a single driver change (not apm,
> but PM-support in a driver).  How many I/O-device drivers do you
> use?  Would it be difficult to try to isolate which one may be
> faulty?

How would I find out what driver(s) might be vetoing my suspend request?

Here's the complete list of modules which might typically be loaded at boot:

3c59x
smbfs
lns_cp437
vfat
fat
ide-cd
cdrom
md
usb-uhci
usbcore
maestro3
sound
soundcore
ac97_codec
r128
agpgart
usb-uhci
usbcore

-0xe1a

^ permalink raw reply	[flat|nested] 19+ messages in thread
* RE: apm suspend broken in 2.4.10
@ 2001-09-27 23:56 Alex Cruise
  2001-09-28  0:10 ` Randy.Dunlap
  2001-09-28  0:52 ` Alan Cox
  0 siblings, 2 replies; 19+ messages in thread
From: Alex Cruise @ 2001-09-27 23:56 UTC (permalink / raw)
  To: 'Randy.Dunlap'; +Cc: 'linux-kernel@vger.kernel.org'

From: Randy.Dunlap [mailto:rddunlap@osdlab.org]

> > -0xe1a
> {little-endian n[iy]bbles ?}

It's just the closest I can get to my own name in hex. ;)

> Sounds like our 2.4.10's are different then.  :)

It's possible... I got mine from kernel.org, applied the preemptible-kernel
and ext3fs patches, and  compiled with RH's "kgcc" 

> Without this patch, mine didn't create /proc/apm, register as a
> misc device, or create the kapmd-idle kernel thread.
> Must be a distro thingy.

Did you have apm=on set before, or nothing at all?  Here's what I've seen so
far:

In all cases, I've got apm compiled into the kernel, not a module.

- With 2.4.10, Before your patch, with no apm= option in the kernel command
line, APM in general works, but suspend doesn't.  When I append apm=on or
apm=off to my kernel command line, APM is disabled.
- With 2.4.10, After applying your patch, apm=on no longer disables APM, but
suspend still doesn't work.

> Return of EAGAIN from the SUSPEND ioctl means that
> send_event() failed, which means that some device driver
> didn't want suspend to happen...which means that some
> device driver got changed. :(

Just for fun, I tried removing all of my loaded 2.4.10 modules one by one,
and attempting 'apm --suspend' in between, and still had the same problem
when I got down to the bare minimum (ext3 and jbd)

> What was the last working kernel AFAUK (for this APM stuff)?

I just checked, and the RH-compiled 2.4.9-0.5 doesn't suspend either.  It
appears to suffer from the same "apm=on" command-line bug too.  I'm gonna go
try the 2.4.7 from RH's "Roswell" beta now.

-0xe1a

^ permalink raw reply	[flat|nested] 19+ messages in thread
* RE: apm suspend broken in 2.4.10
@ 2001-09-27 21:07 Alex Cruise
  0 siblings, 0 replies; 19+ messages in thread
From: Alex Cruise @ 2001-09-27 21:07 UTC (permalink / raw)
  To: 'Randy.Dunlap'; +Cc: 'linux-kernel@vger.kernel.org'

I should, however, mention that "apm --standby" seems to work as expected.
It's only the "suspend" option that says "Resource temporarily unavailable."

-0xe1a

^ permalink raw reply	[flat|nested] 19+ messages in thread
* RE: apm suspend broken in 2.4.10
@ 2001-09-27 21:03 Alex Cruise
  2001-09-27 22:17 ` Randy.Dunlap
  0 siblings, 1 reply; 19+ messages in thread
From: Alex Cruise @ 2001-09-27 21:03 UTC (permalink / raw)
  To: 'Randy.Dunlap'; +Cc: 'linux-kernel@vger.kernel.org'

From: Randy.Dunlap [mailto:rddunlap@osdlab.org]

> Verified here.
> APM doesn't install if apm=on or apm=off is used in 2.4.10.
> 
> Here's a small patch for it.  With this patch, apm thread,
> /proc/apm, misc apm_bios device etc. are created.

Thanks... apm=on works now, but APM functionality itself still suffers from
the same failure as before (Resource temporarily unavailble.)

I should mention that before your patch, /dev/misc/apm_bios, /dev/apm_bios
and /proc/apm were already being created by the driver; it's going through
the motions but not delivering the goods.

-0xe1a


^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: apm suspend broken in 2.4.10
@ 2001-09-27  0:29 Alex Cruise
  2001-09-27 20:36 ` Randy.Dunlap
  0 siblings, 1 reply; 19+ messages in thread
From: Alex Cruise @ 2001-09-27  0:29 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org'

Mine displays a similar failure, except my strace shows:

  ioctl(3, APM_IOC_SUSPEND, 0 ) = -1 EAGAIN (Resource temporarily
unavailable)

I also noticed (as reported by a previous poster) that whether you pass
"apm=on" or "apm=off" to the kernel, apm gets disabled.  When you don't
specify a setting, it's enabled.  I had a look at the arch/i386/kernel/apm.c
in 2.4.10 though, and it seemed to make sense.

--
Alex Cruise - Programmer, Iconoclast, Opinionated Bastard.
GCS/P v3.1a: d- s+:+ C++++$ UF++ UL++ P--- L++ E++ W++ N+ K w-- O- M 
PS++ PE- Y+ PGP-- t+@ 5- X-- R !tv b++ DI++ D++ G e* h--- r+++ y+++ 

^ permalink raw reply	[flat|nested] 19+ messages in thread
* apm suspend broken in 2.4.10
@ 2001-09-25 22:00 jc
  2001-09-26  8:44 ` Matthias Andree
  0 siblings, 1 reply; 19+ messages in thread
From: jc @ 2001-09-25 22:00 UTC (permalink / raw)
  To: linux-kernel

it worked fine with 2.4.9

now with 2.4.10 :

strace apm -s 

...
open("/dev/apm_bios", O_RDWR)           = 3
time([1001455050])                      = 1001455050
sync()                                  = 0
ioctl(3, AGPIOC_RELEASE, 0)             = -1 EAGAIN (Resource temporarily unavailable)
...



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2001-09-28 22:34 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-28 22:30 apm suspend broken in 2.4.10 Alex Cruise
2001-09-28 22:31 ` Randy.Dunlap
     [not found] <6B90F0170040D41192B100508BD68CA1015A81B2@earth.infowave.co m>
2001-09-28  3:31 ` Lewin A.R.W. Edwards
  -- strict thread matches above, loose matches on Subject: below --
2001-09-28  3:03 Alex Cruise
2001-09-28  1:50 Alex Cruise
2001-09-28 22:05 ` Randy.Dunlap
2001-09-27 23:56 Alex Cruise
2001-09-28  0:10 ` Randy.Dunlap
2001-09-28  0:52 ` Alan Cox
2001-09-28  9:09   ` jc
2001-09-28 10:05     ` Keith Owens
2001-09-27 21:07 Alex Cruise
2001-09-27 21:03 Alex Cruise
2001-09-27 22:17 ` Randy.Dunlap
2001-09-28  9:12   ` jc
2001-09-27  0:29 Alex Cruise
2001-09-27 20:36 ` Randy.Dunlap
2001-09-25 22:00 jc
2001-09-26  8:44 ` Matthias Andree

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox