Laptop waking up in bag

2008-06-29 Thread Dotan Cohen
My Dell Inspiron laptop has a terrible habit of waking up from RAM
suspension inside my bag. I do not know if it is detecting a signal
from the lid switch or from the power button (these are the only two
ways that I know of to wake the laptop from RAM suspension). How can
I:
1) Find out what ACPI event (lid switch or power button) caused the
system to wake?
2) Find out how much time the laptop has been running since wake (not
uptime, which is the time from boot)?
3) Configure the laptop to poll the lid switch and return to RAM
suspension if the lid is shut (I'm not sure if this is possible).
Ideally this script would run 5 seconds after waking.

Thanks in advance.

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


X not starting from time to time

2008-06-29 Thread Frank Zimmermann
Hi guys,
I'm having a problem with my X server at boot. I often have to reboot
once or twice since X is not starting properly and the screen goes dark.
I've posted the diff output of the log files here:
http://freenet-homepage.de/fzimbi/stuff/xorg.log.diff

To me it looks as if x startup stops after:
(II) fglrx(0): Connected Display1: LCD on internal LVDS [lvds]
(II) fglrx(0):  Display1: No EDID information from DDC.
(II) fglrx(0):  Display1: Failed to get EDID information.
(WW) fglrx(0): Only one display is connnected,so single mode is enabled

I'm running sid on an Asus M6N with latest kernel selfcompiled kernel
based on 2.6.25-g sources, proprietary fglrx 8.50.3 and xorg-server
2:1.4.2-1

Any ideas what might be going wrong?

Thanks Frank
-- 
Frank Zimmermann|
Junker-Jörg-Str. 2  | mail: [EMAIL PROTECTED]
10318 Berlin| phone: +49-30-67304676
Germany | mobile: +49-1520-6017456



signature.asc
Description: OpenPGP digital signature


Re: Laptop waking up in bag

2008-06-29 Thread Paolo
On Sun, Jun 29, 2008 at 03:28:28PM +0300, Dotan Cohen wrote:

> 1) Find out what ACPI event (lid switch or power button) caused the
> system to wake?

keep acpi_listen running in a terminal

> 2) Find out how much time the laptop has been running since wake (not
> uptime, which is the time from boot)?

enclose the s2ram command (likely run by some script in /etc/acpi/) in
2 marker commands, eg

!  logger -t acpi_s2ram === going to sleep ===
!  
!  logger -t acpi_s2ram === got a wake up ===

in case you're seen clock troubles, log an hw timestamp as well, like:

! logger -t acpi_s2ram === going to sleep (`hwclock`) ===

> 3) Configure the laptop to poll the lid switch and return to RAM

hardly reliable, you risk sudden shutdown while working... better figure out
what's wrong, and use s2disk meanwhile.

HTH
-- 
paolo


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: X not starting from time to time

2008-06-29 Thread Paolo
On Sun, Jun 29, 2008 at 02:32:52PM +0200, Frank Zimmermann wrote:
> I'm running sid on an Asus M6N with latest kernel selfcompiled kernel
> based on 2.6.25-g sources, proprietary fglrx 8.50.3 and xorg-server

try Xorg's ATI or VESA drivers, if they work reliably, bugger is that
fglrx -> then  bug ATI for that.

HTH
-- 
paolo


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Laptop waking up in bag

2008-06-29 Thread Dotan Cohen
2008/6/29 Paolo <[EMAIL PROTECTED]>:
> On Sun, Jun 29, 2008 at 03:28:28PM +0300, Dotan Cohen wrote:
>
>> 1) Find out what ACPI event (lid switch or power button) caused the
>> system to wake?
>
> keep acpi_listen running in a terminal
>

Thanks.

>> 2) Find out how much time the laptop has been running since wake (not
>> uptime, which is the time from boot)?
>
> enclose the s2ram command (likely run by some script in /etc/acpi/) in
> 2 marker commands, eg
>
> !  logger -t acpi_s2ram === going to sleep ===
> !  
> !  logger -t acpi_s2ram === got a wake up ===
>
> in case you're seen clock troubles, log an hw timestamp as well, like:
>
> ! logger -t acpi_s2ram === going to sleep (`hwclock`) ===
>

Well, I'd rather avoid playing with system files. Is there a trigger
that I can use to run a script when the laptop wakes? I could run a
script which does no more than record the current timestamp. Then,
when I discover that the machine is running, I can compare the current
unixtime with the timestamp that was written when the machine woke.

>> 3) Configure the laptop to poll the lid switch and return to RAM
>
> hardly reliable, you risk sudden shutdown while working... better figure out
> what's wrong, and use s2disk meanwhile.
>

I would only run the script upon wake, like the script I just
mentioned in point 2.

Thanks.

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


Re: Laptop waking up in bag

2008-06-29 Thread Heiner Markert
Maybe your laptop wakes up if the battery becomes empty, in order to take some 
action to save your data?

Regards
Heiner


Am Sonntag, 29. Juni 2008 14:28:28 schrieb Dotan Cohen:
> My Dell Inspiron laptop has a terrible habit of waking up from RAM
> suspension inside my bag. I do not know if it is detecting a signal
> from the lid switch or from the power button (these are the only two
> ways that I know of to wake the laptop from RAM suspension). How can
> I:
> 1) Find out what ACPI event (lid switch or power button) caused the
> system to wake?
> 2) Find out how much time the laptop has been running since wake (not
> uptime, which is the time from boot)?
> 3) Configure the laptop to poll the lid switch and return to RAM
> suspension if the lid is shut (I'm not sure if this is possible).
> Ideally this script would run 5 seconds after waking.
>
> Thanks in advance.
>
> Dotan Cohen
>
> http://what-is-what.com
> http://gibberish.co.il
> א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Laptop waking up in bag

2008-06-29 Thread Dotan Cohen
2008/6/29 Heiner Markert <[EMAIL PROTECTED]>:
> Maybe your laptop wakes up if the battery becomes empty, in order to take some
> action to save your data?
>
> Regards
> Heiner
>

Interesting thought, but no, it wakes on a full charge as well as on a
partial charge.

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


Re: Laptop waking up in bag

2008-06-29 Thread Paolo
On Sun, Jun 29, 2008 at 05:30:16PM +0300, Dotan Cohen wrote:
> >
> 
> Well, I'd rather avoid playing with system files. Is there a trigger
> that I can use to run a script when the laptop wakes? I could run a

same as above then, wrap acpi_listen in a script, use option -c to make it
yield on 1 event, eg

! while true;do
!   e=`acpi_listen -c 1`
!   logger -t acpi-event "=== $e (`hwclock`) ==="
!#  or simply write on terminal:
!   echo "=== $e (`hwclock`) ==="
! done

likewise, another similar script in another terminal, running as simple
timestamper:

! while true;do
!   logger -t timestamp "=== MARKER (`hwclock`) ==="
!#  or simply write on terminal:
!   echo "=== `date +%s` MARKER (`hwclock`) ==="
!   sleep 5
! done

again, add `hwclock` if you suspect system-time skew.

HTH
-- 
paolo


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]