2005-12-04 00:12:37

by Michael Tokarev

[permalink] [raw]
Subject: Could not suspend device [VIA UHCI USB controller]: error -22

When I try to "standby" (echo standby > /sys/power/state)
a 2.6.14 system running on a VIA C3-based system with VIA
chipset (suspend to disk never worked on this system --
as stated on swsusp website it's due to the lack of some
CPU instruction on this CPU [but winXP suspends to disk
on this system just fine]), it immediately comes back, with
the above error message:

Stopping tasks: =====================================================================|
ACPI: PCI interrupt for device 0000:00:07.5 disabled
Could not suspend device 0000:00:07.3: error -22
ACPI: PCI Interrupt 0000:00:07.5[C] -> Link [LNKC] -> GSI 12 (level, low) -> IRQ 12
ACPI: PCI Interrupt 0000:00:0a.0[A] -> Link [LNKC] -> GSI 12 (level, low) -> IRQ 12
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Some devices failed to suspend
Restarting tasks... done

Here's the PCI devices:

00:00.0 Host bridge: VIA Technologies, Inc. VT8601 [Apollo ProMedia] (rev 05)
00:01.0 PCI bridge: VIA Technologies, Inc. VT8601 [Apollo ProMedia AGP]
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 40)
00:07.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00:07.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 1a)
00:07.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 1a)
00:07.4 Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 40)
00:07.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 50)
00:0a.0 Multimedia controller: Philips Semiconductors SAA7134 (rev 01)
00:0d.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
01:00.0 VGA compatible controller: Trident Microsystems CyberBlade/i1 (rev 6a)

(note it's the second USB interface which fails).
And here's the USB device list:

Bus 002 Device 002: ID 07cc:0301 Carry Computer Eng., Co., Ltd 6-in-1 Card Reader
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 003: ID 0458:0036 KYE Systems Corp. (Mouse Systems)
Bus 001 Device 001: ID 0000:0000

This machine was never able to go to standby mode completely - before
2.6.14, it performed resume after several secounds of sleeping. Now
it does not even try to sleep anymore.

Also, "suspend to mem" does just nothing, -- the same as "suspend to disk"
(but for disk, it never worked at all as stated above).

Any hints on where to look at?

Thanks.

/mjt


2005-12-04 00:32:00

by Greg KH

[permalink] [raw]
Subject: Re: Could not suspend device [VIA UHCI USB controller]: error -22

On Sun, Dec 04, 2005 at 03:12:41AM +0300, Michael Tokarev wrote:
> When I try to "standby" (echo standby > /sys/power/state)
> a 2.6.14 system running on a VIA C3-based system with VIA
> chipset (suspend to disk never worked on this system --
> as stated on swsusp website it's due to the lack of some
> CPU instruction on this CPU [but winXP suspends to disk
> on this system just fine]), it immediately comes back, with
> the above error message:

Can you try 2.6.15-rc4 or newer to see if that fixes this issue for you?

thanks,

greg k-h

2005-12-04 22:51:36

by Michael Tokarev

[permalink] [raw]
Subject: Re: Could not suspend device [VIA UHCI USB controller]: error -22

Greg KH wrote:
> On Sun, Dec 04, 2005 at 03:12:41AM +0300, Michael Tokarev wrote:
>
>>When I try to "standby" (echo standby > /sys/power/state)
>>a 2.6.14 system running on a VIA C3-based system with VIA
>>chipset (suspend to disk never worked on this system --
>>as stated on swsusp website it's due to the lack of some
>>CPU instruction on this CPU [but winXP suspends to disk
>>on this system just fine]), it immediately comes back, with
>>the above error message:
>
> Can you try 2.6.15-rc4 or newer to see if that fixes this issue for you?

Yes, 2.6.15-rc4 restores previous functionality - the error in
$subject is now gone, and it seems the system goes to standby
as it should, without errors and 'standby process interruptions'.
Thanks.

With the only problem which was here all the time - it comes "back
to C" after less a secound all the disks/monitor/etc are placed
into sleep mode.. Ie,

..preparing for standby...
..hdd stops spinning..
..monitor is turned off..
..less-than-a-secound-pause..
Back to C!
..the system goes back, restoring interrupts etc...

I tried various 'wakeup' settings in bios, incl. turning everything
off in that menu - no difference.

The same behaviour is shown by all 2.6 kernels I tried so far
(since 2.6.6 or so).

BTW.. It looks like i should change the $subject now.. ;)

/mjt

2005-12-04 23:26:17

by Greg KH

[permalink] [raw]
Subject: Re: Could not suspend device [VIA UHCI USB controller]: error -22

On Sun, Jan 02, 2000 at 11:28:12AM +0300, Michael Tokarev wrote:
> Greg KH wrote:
> >On Sun, Dec 04, 2005 at 03:12:41AM +0300, Michael Tokarev wrote:
> >
> >>When I try to "standby" (echo standby > /sys/power/state)
> >>a 2.6.14 system running on a VIA C3-based system with VIA
> >>chipset (suspend to disk never worked on this system --
> >>as stated on swsusp website it's due to the lack of some
> >>CPU instruction on this CPU [but winXP suspends to disk
> >>on this system just fine]), it immediately comes back, with
> >>the above error message:
> >
> >Can you try 2.6.15-rc4 or newer to see if that fixes this issue for you?
>
> Yes, 2.6.15-rc4 restores previous functionality - the error in
> $subject is now gone, and it seems the system goes to standby
> as it should, without errors and 'standby process interruptions'.
> Thanks.
>
> With the only problem which was here all the time - it comes "back
> to C" after less a secound all the disks/monitor/etc are placed
> into sleep mode.. Ie,
>
> ..preparing for standby...
> ..hdd stops spinning..
> ..monitor is turned off..
> ..less-than-a-secound-pause..
> Back to C!
> ..the system goes back, restoring interrupts etc...
>
> I tried various 'wakeup' settings in bios, incl. turning everything
> off in that menu - no difference.
>
> The same behaviour is shown by all 2.6 kernels I tried so far
> (since 2.6.6 or so).

Does normal "suspend" work for you on this machine (echoing "disk" to
that sysfs file?)

I'd suggest creating a bugzilla.kernel.org entry for this new problem.

thanks,

greg k-h

2005-12-05 08:54:22

by Michael Tokarev

[permalink] [raw]
Subject: Re: Could not suspend device [VIA UHCI USB controller]: error -22

Greg KH wrote:
> On Sun, Jan 02, 2000 at 11:28:12AM +0300, Michael Tokarev wrote:
[]
>>With the only problem which was here all the time - it comes "back
>>to C" after less a secound all the disks/monitor/etc are placed
>>into sleep mode.. Ie,
>>
>> ..preparing for standby...
>> ..hdd stops spinning..
>> ..monitor is turned off..
>> ..less-than-a-secound-pause..
>> Back to C!
>> ..the system goes back, restoring interrupts etc...
>>
>>I tried various 'wakeup' settings in bios, incl. turning everything
>>off in that menu - no difference.
>>
>>The same behaviour is shown by all 2.6 kernels I tried so far
>>(since 2.6.6 or so).
>
> Does normal "suspend" work for you on this machine (echoing "disk" to
> that sysfs file?)

No, it never worked (disk or even mem) because - as i've read - linux
needs some CPU instruction (I don't remember which) which isn't implemented
on this CPU (neverless, win is pretty happy -- doing suspend/hibernate.. ;)

> I'd suggest creating a bugzilla.kernel.org entry for this new problem.

Oh well. Ok, I'll do. Thank you.

/mjt

2005-12-05 19:06:16

by Pavel Machek

[permalink] [raw]
Subject: Re: Could not suspend device [VIA UHCI USB controller]: error -22

Hi!

> Also, "suspend to mem" does just nothing, -- the same as "suspend to disk"
> (but for disk, it never worked at all as stated above).

Can you quote exact messages? Suspend to mem should not have problems
without 4MB pages, as it does not do any pagetables related magic. If
it does include same check, it is bug and should be easy to fix.

Pavel
--
Thanks, Sharp!

2005-12-05 19:05:52

by Pavel Machek

[permalink] [raw]
Subject: Re: Could not suspend device [VIA UHCI USB controller]: error -22

Hi!

> When I try to "standby" (echo standby > /sys/power/state)
> a 2.6.14 system running on a VIA C3-based system with VIA
> chipset (suspend to disk never worked on this system --
> as stated on swsusp website it's due to the lack of some
> CPU instruction on this CPU [but winXP suspends to disk

Lack of 4MB does not mean suspend is impossible, it is only uglier and
harder to do than usually. See x86-64 -- it faces similar problem. But
I do not have C3 here, and so I can't easily fixes, and there are not
enough C3 users to fix it themselves. [Ouch and cc: me on suspend
problems.]
Pavel
--
Thanks, Sharp!

2005-12-05 19:05:53

by Pavel Machek

[permalink] [raw]
Subject: Re: Could not suspend device [VIA UHCI USB controller]: error -22

Hi!

> ..preparing for standby...
> ..hdd stops spinning..
> ..monitor is turned off..
> ..less-than-a-secound-pause..
> Back to C!
> ..the system goes back, restoring interrupts etc...
>
> I tried various 'wakeup' settings in bios, incl. turning everything
> off in that menu - no difference.
>
> The same behaviour is shown by all 2.6 kernels I tried so far
> (since 2.6.6 or so).

Try ACPI wakeup settings, and ask on ACPI lists. Unfortunately noone
really cares about standby these days.
Pavel

--
Thanks, Sharp!

2005-12-07 10:30:59

by Michael Tokarev

[permalink] [raw]
Subject: Re: Could not suspend device [VIA UHCI USB controller]: error -22

Pavel Machek wrote:
> Hi!
>
>>Also, "suspend to mem" does just nothing, -- the same as "suspend to disk"
>>(but for disk, it never worked at all as stated above).
>
>
> Can you quote exact messages? Suspend to mem should not have problems
> without 4MB pages, as it does not do any pagetables related magic. If
> it does include same check, it is bug and should be easy to fix.

Hmm.. There's no messages, no at all.

echo mem > /sys/power/state

does exactly nothing. When writing 'suspend' to that file, the system
at least tries to do something (now with 2.6.15-rc4 it completes the
syspend procedure; but it wakes up again in a secound or two), with all
the messages et al, but not 'mem' or 'disk' - no messages at all.

/mjt

2005-12-07 10:39:52

by Michael Tokarev

[permalink] [raw]
Subject: Re: Could not suspend device [VIA UHCI USB controller]: error -22

Pavel Machek wrote:
> Hi!
>
>
>> ..preparing for standby...
>> ..hdd stops spinning..
>> ..monitor is turned off..
>> ..less-than-a-secound-pause..
>> Back to C!
>> ..the system goes back, restoring interrupts etc...
>>
>>I tried various 'wakeup' settings in bios, incl. turning everything
>>off in that menu - no difference.
>>
>>The same behaviour is shown by all 2.6 kernels I tried so far
>>(since 2.6.6 or so).
>
> Try ACPI wakeup settings, and ask on ACPI lists. Unfortunately noone
> really cares about standby these days.

Which "ACPI wakeup settings" did you mean? In BIOS or in kernel?

In my BIOS, there's a page called "Power management" (or something
of that sort), which, among other things, contains a section
"Wakeup devices" or "Wakeup events" - i tried to turn them all
on and off, all at once and in alot of different combinations -
makes no real difference, the system wakes up in a secound or
two regardless.

Too bad no one cares about standby.. :(
I've several of those systems, and I love them for their quiet
operation. The only problem for me is the system startup time
(about 3 minutes) and applications startup time (due to the
empty filesystem cache) -- it'd be very nice to be able to
suspend the system somehow instead of turning it off... Now,
suspend to disk does not work at all (that 4M pages stuff on
a VIA C3 CPU), suspend to mem does not work either, and "normal"
standby, while works, triggers a wakeup almost immediately.
So, in short, no suspend at all...

But Ok. Lemme see what's going on around that file in the code..

/mjt

2005-12-07 11:03:00

by Pavel Machek

[permalink] [raw]
Subject: Re: Could not suspend device [VIA UHCI USB controller]: error -22

Hi!

> >>Also, "suspend to mem" does just nothing, -- the same as "suspend to disk"
> >>(but for disk, it never worked at all as stated above).
> >
> >
> > Can you quote exact messages? Suspend to mem should not have problems
> > without 4MB pages, as it does not do any pagetables related magic. If
> > it does include same check, it is bug and should be easy to fix.
>
> Hmm.. There's no messages, no at all.
>
> echo mem > /sys/power/state
>
> does exactly nothing. When writing 'suspend' to that file, the
>system

I think you mean 'standby'?

> at least tries to do something (now with 2.6.15-rc4 it completes the
> syspend procedure; but it wakes up again in a secound or two), with all
> the messages et al, but not 'mem' or 'disk' - no messages at all.

You are hitting something else than missing 4MB pages:

static inline int
arch_prepare_suspend(void)
{
/* If you want to make non-PSE machine work, turn off paging
in swsusp_arch_suspend. swsusp_pg_dir should have identity
mapping, so
it could work... */
if (!cpu_has_pse) {
printk(KERN_ERR "PSE is required for swsusp.\n");
return -EPERM;
}
return 0;
}

...so just insert printks into the code to find out what is going on...

Pavel
--
Thanks, Sharp!

2005-12-07 11:05:34

by Pavel Machek

[permalink] [raw]
Subject: Re: Could not suspend device [VIA UHCI USB controller]: error -22

On St 07-12-05 13:39:48, Michael Tokarev wrote:
> Pavel Machek wrote:
> >>I tried various 'wakeup' settings in bios, incl. turning everything
> >>off in that menu - no difference.
> >>
> >>The same behaviour is shown by all 2.6 kernels I tried so far
> >>(since 2.6.6 or so).
> >
> > Try ACPI wakeup settings, and ask on ACPI lists. Unfortunately noone
> > really cares about standby these days.
>
> Which "ACPI wakeup settings" did you mean? In BIOS or in kernel?

/proc/acpi/wakeup. And do ask on acpi mailing lists.

> Too bad no one cares about standby.. :(
> I've several of those systems, and I love them for their quiet
> operation. The only problem for me is the system startup time
> (about 3 minutes) and applications startup time (due to the
> empty filesystem cache) -- it'd be very nice to be able to
> suspend the system somehow instead of turning it off... Now,
> suspend to disk does not work at all (that 4M pages stuff on
> a VIA C3 CPU), suspend to mem does not work either, and "normal"
> standby, while works, triggers a wakeup almost immediately.
> So, in short, no suspend at all...

Well, printk time. Find out what is wrong. Noone else can because lack
of hardware.
Pavel
--
Thanks, Sharp!