lkml.org 
[lkml]   [2004]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: uspend to Disk - Kernel 2.6.4 vs. r50p
From
Date
Pavel Machek <pavel@ucw.cz> writes:

> Hi!
>
> > >Use echo 4 > /proc/acpi/sleep, and vanilla kernels.
> > >
> > >
> > >
> > What If it happends that I have T22 Thinkpad, and it doesn't work with
> > ACPI in 2.6 (causes problems with network cards for some reason, long
> > and not yet fixed bug in ACPI), and I don't have /proc/acpi. How can I
> > use swsusp than ?
>
> I added entry to FAQ:
>
> Q: My machine doesn't work with ACPI. How can I use swsusp than ?
>
> A: Do reboot() syscall with right parameters. Warning: glibc gets in
> its way, so check with strace:
>
> reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, 0xd000fce2)
>
> Ouch, and when you code that trivial program, send me source, I lost
> mine.

#include <unistd.h>
#include <syscall.h>

#define LINUX_REBOOT_MAGIC1 0xfee1dead
#define LINUX_REBOOT_MAGIC2 672274793
#define LINUX_REBOOT_CMD_SW_SUSPEND 0xD000FCE2

int main()
{
syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
LINUX_REBOOT_CMD_SW_SUSPEND, 0);
return 0;
}
--
Peter Osterlund - petero2@telia.com
http://w1.894.telia.com/~u89404340
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [from the cache]
©2003-2011 Jasper Spaans