Author Topic: Zaurus Ui Freezes If Suspended Too Long  (Read 23724 times)

alan

  • Full Member
  • ***
  • Posts: 221
    • View Profile
Zaurus Ui Freezes If Suspended Too Long
« Reply #15 on: February 23, 2005, 02:30:36 am »
dvdrw : i always have a cf card in the slot, and a sd card, too.

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Zaurus Ui Freezes If Suspended Too Long
« Reply #16 on: February 23, 2005, 03:06:35 am »
@projekt : this is a bit HS to this thread, but even now you can scrap all the things you want, (even X if you want) all it takes is to remove the packages.
SLC-860 cacko / senao wifi

dvdrw

  • Newbie
  • *
  • Posts: 32
    • View Profile
    • http://
Zaurus Ui Freezes If Suspended Too Long
« Reply #17 on: February 23, 2005, 07:02:20 pm »
Quote
dvdrw : i always have a cf card in the slot, and a sd card, too.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=68260\"][{POST_SNAPBACK}][/a][/div]

I modified the apm script to stop PCMCIA services (cardmgr) after eject and before the $APM --suspend, and to restart PCMCIA services on resume (sprinkled some "sleep 1"s throughout as well).  seems to help (no more hangs for me) but this could just be luck/timing.  browsing all the OESF forums for "resume" shows that there seems to be some core kernel/driver issue that might be beyond our control.  e.g., it could be some issue with SD resume as opposed to CF resume, or perhaps none of these at all if it is X (or the WM?) that is crashing.  haven't had any time to explore any of this deeper...

if it is just X crashing, another idea might be to have the apm script grep `ps` output to determine if X has crashed on resume, and if it has, kill anything remaining and to auto-restart X.  I haven't spent the time trying to repro the resume crash to try this but next time it happens I'll hopefully have time to look into this.

projekt

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Zaurus Ui Freezes If Suspended Too Long
« Reply #18 on: February 25, 2005, 08:02:36 am »
pgas: yeah, but I am a bit obsessive compulsive.  i guess its because i use my main computer so much, i hate having too much uninstalled software, i frequently ghost back to ideal states. Bah.

dvdrw: actually, its not just X i've found.  I've been running just the startup shell without x and a few virtual terminals.   sometimes when i come back links and vim have both frozen. bummer.
« Last Edit: February 25, 2005, 08:04:01 am by projekt »

alan

  • Full Member
  • ***
  • Posts: 221
    • View Profile
Zaurus Ui Freezes If Suspended Too Long
« Reply #19 on: March 08, 2005, 03:42:41 pm »
Sorry for coming back to an old post, but i noticed today that my Zaurus only freezes when i set the backlight to very different levels when the Z is pluged in and when it is not.

If i set the light to maximum when the zaurus is plugged and to minimum when it runs on battery, suspend when plugged, then unplug it and then have the zaurus back on, the Z freezes nearly every time.

Don't know if it is revelant, but i think so...

dvdrw

  • Newbie
  • *
  • Posts: 32
    • View Profile
    • http://
Zaurus Ui Freezes If Suspended Too Long
« Reply #20 on: March 10, 2005, 12:33:04 pm »
for some time, I've been using a test hacked version of /usr/bin/apm to see if this eliminates the problem, and it's been working well:

   
Code: [Select]
#!/bin/sh
#
# X11 ROM apm wrapper
# http://www.pdaXrom.org
#

APM=/usr/bin/apm.x

if [ "$1" = "--suspend" -o "$1" = "-s" -o "$1" = "--su" ]; then
    cardctl eject 2>/dev/null

    sleep 1
    /etc/rc.d/init.d/pcmcia stop
    sleep 1

    $APM --suspend

    sleep 1
    /etc/rc.d/init.d/pcmcia start
else
    $APM $@
fi

note that this test hacked version always does a cardctl eject and PCMCIA stop/start (I removed the check for card present in case that didn't always work).  this seems to fix the problem for me (C750 w/CF wi-fi card and SD flash).  however if the problem occurs without a CF card installed, then it could very well be SD automount/dismount, or something else.  if I get some time, I'll put back the original apm script and look at the SD stuff.

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Zaurus Ui Freezes If Suspended Too Long
« Reply #21 on: March 22, 2005, 10:29:07 am »
Thanks for this hack! I've been using it for a while & have had zero lock ups. I was having  several per week.
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

andrewwoods

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • http://
Zaurus Ui Freezes If Suspended Too Long
« Reply #22 on: March 22, 2005, 04:28:18 pm »
Quote
Sorry for coming back to an old post, but i noticed today that my Zaurus only freezes when i set the backlight to very different levels when the Z is pluged in and when it is not.

If i set the light to maximum when the zaurus is plugged and to minimum when it runs on battery, suspend when plugged, then unplug it and then have the zaurus back on, the Z freezes nearly every time.

Don't know if it is revelant, but i think so...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=69800\"][{POST_SNAPBACK}][/a][/div]

I have changed my backlight settings to be the same on mains or battery and have had no lockups since. Coincidence? Maybe.
SL-C860 pdaxrom Beta3 512MB SD
Buffalo CF WLAN RTM-8000 GPRS ANYCOM BT

dvdrw

  • Newbie
  • *
  • Posts: 32
    • View Profile
    • http://
Zaurus Ui Freezes If Suspended Too Long
« Reply #23 on: March 22, 2005, 11:27:22 pm »
Quote
Thanks for this hack! I've been using it for a while & have had zero lock ups. I was having  several per week.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=71790\"][{POST_SNAPBACK}][/a][/div]

very cool!  I haven't had any lockups as well since I've been using it.  it'd be interesting to find out if anyone else has had any luck with this hack...!

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Zaurus Ui Freezes If Suspended Too Long
« Reply #24 on: March 23, 2005, 11:33:34 am »
Quote
Quote
Thanks for this hack! I've been using it for a while & have had zero lock ups. I was having  several per week.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=71790\"][{POST_SNAPBACK}][/a][/div]

very cool!  I haven't had any lockups as well since I've been using it.  it'd be interesting to find out if anyone else has had any luck with this hack...!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=71890\"][{POST_SNAPBACK}][/a][/div]
I've also noted in another thread that my clock has also kept better time since using this. Not sure if it's related. Anyone else noticed less clock slippage?
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Zaurus Ui Freezes If Suspended Too Long
« Reply #25 on: March 28, 2005, 07:32:07 am »
I'm now also trying this hack (i was too lazy to try it before...) and I have now also remove all the "sleep 1" and so far so good...
SLC-860 cacko / senao wifi

LadyBug

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • http://
Zaurus Ui Freezes If Suspended Too Long
« Reply #26 on: April 06, 2005, 02:44:16 pm »
I also edited apm as per the instructions above and haven't had any
suspend-related problems since.

However, I still get UI lockups after a long period (like half an hour
or so) of xmms music playback.  
C760, Symbol CF WiFi, Lexar 1GB SD, score of CFs
Currently running pdaXrom.

ScottYelich

  • Hero Member
  • *****
  • Posts: 992
    • View Profile
    • http://www.zaurususergroup.com/modules.php?opmodload&namephpWiki&filei
Zaurus Ui Freezes If Suspended Too Long
« Reply #27 on: July 12, 2005, 09:45:07 pm »
Quote
it happens to me sometimes, on my 750.

Just for information, it also happens when you suspend the Z while you don't use X (using the command "apm -s") and leave it for some days. When you turn it back on, it automatically close the session and you have to log in again.

Hope it means something to you...

Ho, by the way, i have no wifi card...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=68144\"][{POST_SNAPBACK}][/a][/div]

Why does everyone jump straight to -9?

DO NOT USE -9 AS YOUR FIRST KILL SIGNAL.

Try a nice friendly -HUP ...  perhaps a little stronger -TERM.

If, for some reason, these don't work, knock a little louder with -KILL (ie: -9), but
don't whine if something else gets hosed due to the strong signal (not to scare
anyone, it's unlikely that anything critical is happening anyway, any more than
just writing a file-- but you could leave resources locked/in use (ie: memory, etc)).

Also, use -HUP and -TERM and -KILL .... you'll be thankful when you miss your
kill -1 and do a kill 1 instead ... you'll use -HUP from then on (well, maybe not on
a pda, but on a production server etc.)

Scott

macwiz

  • Full Member
  • ***
  • Posts: 151
    • View Profile
    • http://www.macwiz.co.uk
Zaurus Ui Freezes If Suspended Too Long
« Reply #28 on: July 13, 2005, 03:20:43 am »
Quote
I'm now also trying this hack (i was too lazy to try it before...) and I have now also remove all the "sleep 1" and so far so good...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=72526\"][{POST_SNAPBACK}][/a][/div]

I have tried it too, but not so fortunate... still getting lock-ups. I am not a techie, and confess that I am just typing the hack in without any real understanding of what it does (will check again to see if I typed/pasted it right). But what difference does removing the "sleep 1" do? And has anyone made any further modifications?

This fault is really beginning to bug me.

Thanks
Macwiz
c860, never quite lived up to my expectations... my fault I guess
17in MacBook Pro lovely xxxx
iPhone 3G ummm
SE P990i with UIQ3. Never enough RAM.
Pocket Loox 720 used for designing ebooks. Just don't like it though!

macwiz: apple mac support in Oxfordshire
Twitter: @boffinboy

rgrep

  • Full Member
  • ***
  • Posts: 149
    • View Profile
Zaurus Ui Freezes If Suspended Too Long
« Reply #29 on: July 19, 2005, 07:23:38 am »
Hi,

I have had this problem occasionally with pdaXrom but am now running RC10 and have had it a lot over the last couple of days.  I tried the 'sleep 1' fix above but it didn't seem to help me.  I did however notice that the clock was way out of sync when I resumed by Zaurus even though I had just seen ntpdate set it correctly after I booted up.  So I looked in /usr/bin/datentime.py for the commands to set the hardware clock and added them to the stock /usr/bin/apm.

Code: [Select]
#!/bin/sh
#
# X11 ROM apm wrapper
# http://www.pdaXrom.org
#

pre_suspend() {
    # test -e /etc/rc.d/init.d/pcmcia && /etc/rc.d/init.d/pcmcia stop >/dev/null 2>/dev/null
    cardctl eject
    rmmod -a
    rmmod -a
    echo -n Suspending ...
}

post_suspend() {
    # test -e /etc/rc.d/init.d/pcmcia && /etc/rc.d/init.d/pcmcia start >/dev/null 2>/dev/null
    # sleep 1
    cardctl insert > /dev/null 2>&1
    echo ... Resumed
}

APM=/usr/bin/apm.x

if [ "$1" = "--suspend" -o "$1" = "-s" -o "$1" = "--su" ]; then
    pre_suspend
    /usr/bin/sethwclock
    /sbin/sltime -set
    $APM --suspend
    post_suspend
else
    $APM $@
fi

That is the standard /usr/bin/apm with only the lines '/usr/bin/sethwclock' and '/sbin/sltime -set' added by me.

This has fixed my problem so far and I hope it helps other people.

Cheers,

Matt
[img]https://www.oesf.org/forums/style_emoticons/default/smile.gif\" border=\"0\" class=\"linked-sig-image\" /] Has: Dynamism C760 / Linksys WCF12 WiFi / Kingston 512MB SD
[img]https://www.oesf.org/forums/style_emoticons/default/biggrin.gif\" border=\"0\" class=\"linked-sig-image\" /] Loves: pdaXrom / Warwalking
[img]https://www.oesf.org/forums/style_emoticons/default/sad.gif\" border=\"0\" class=\"linked-sig-image\" /] Hates: NetGear MA701 WiFi / SanDisk 256MB SD / C760 Charging Faults