Author Topic: Oz3.5.3 (collie) On/off Button Problem  (Read 53551 times)

Penguin Man

  • Newbie
  • *
  • Posts: 25
    • View Profile
Oz3.5.3 (collie) On/off Button Problem
« Reply #60 on: June 08, 2005, 12:02:18 pm »
I'm running 3.5.3 with the GPE image, and the only problems I have suspending are that it doesn't lock the screen when I do it (even though I have the "lock screen on suspend" option set) and it won't wake up for alarms.  Susending and waking up using the cancel key works every time, although the apm --suspend command doesn't work at all.

JohnX

  • Full Member
  • ***
  • Posts: 126
    • View Profile
    • http://
Oz3.5.3 (collie) On/off Button Problem
« Reply #61 on: June 08, 2005, 04:40:09 pm »
IIRC in GPE/OZ 3.5.3 the /dev/apm_bios line in /etc/device_table is either commented out or removed by default.  If it's entirely missing you'll have to add it, but doing this will can also lead to the problem where the device won't come out of suspend if you use the cancel button to suspend it.
Zaurus SL-C1000 - Linux 2.6.22 - Angstrom/Debian dual boot - Ambicom 802.11b - 1GB Corsair SD
Nokia N800 - 2GB PQI SD card
Zaurus SL-5500 - OZ 3.5.3/Hentges T2/Opie - 64MB Lexar SD card

JohnX

  • Full Member
  • ***
  • Posts: 126
    • View Profile
    • http://
Oz3.5.3 (collie) On/off Button Problem
« Reply #62 on: June 08, 2005, 08:47:51 pm »
Nothing quite like replying to your own post.  I've been looking at the suspend problem a little bit and just thought I'd put up some of my ideas so other people can shoot them down.   Here is what I have found:

with /dev/apm_bios commented out (#/dev/apm_bios in /etc/device_table):
1) I can boot into a shell (init=/bin/bash) and suspend with the cancel button (To me that means that the Zaurus can suspend without any intervention from apm or needing to have apm_bios in the device_table)
2) apm --suspend returns without doing anything (ie apm can't suspend the zaurus)

with /dev/apm_bios uncommented (/dev/apm_bios in /etc/device_table):
1) If apmd is running, holding cancel button results in a suspend that I can't resume from
2) If apmd is not running apm --suspend does nothing, and I can suspend with the cancel button and resume without problems
3) as long as I suspend from the menu or by running apm --suspend from a terminal I can resume fine

What this problem seems like to me is apmd and the kernel stepping on each other's toes.  If someone who has:
1) a 5500, 5500G or 5000D
2) that can suspend fine with the cancel button with apmd running, and /dev/apm_bios in /etc/device_table

Maybe you could run a couple of the tests I did and see what results you get? That might shed some light on this.

If anyone wants me to run tests/reflash and mess with different stuff I will.  I'm in the process of setting up bitbake on a machine, and I'll start trying to track down the "right cursor causes suspend." No guarantees I'll find anything though, as I'm pretty bad with C and I'm not familiar at all with the inner workings of the kernel. :rollseyes:

-John
« Last Edit: June 09, 2005, 01:57:08 pm by JohnX »
Zaurus SL-C1000 - Linux 2.6.22 - Angstrom/Debian dual boot - Ambicom 802.11b - 1GB Corsair SD
Nokia N800 - 2GB PQI SD card
Zaurus SL-5500 - OZ 3.5.3/Hentges T2/Opie - 64MB Lexar SD card

Penguin Man

  • Newbie
  • *
  • Posts: 25
    • View Profile
Oz3.5.3 (collie) On/off Button Problem
« Reply #63 on: June 09, 2005, 01:06:56 am »
/dev/apm_bios is not commented out on mine (and I haven't changed it from the default), however it exhibits the behavior that you describe as happening with it commented out.  How odd.

JohnX

  • Full Member
  • ***
  • Posts: 126
    • View Profile
    • http://
Oz3.5.3 (collie) On/off Button Problem
« Reply #64 on: June 09, 2005, 02:06:04 pm »
Hmm...Well that is interesting.  Could you see if apmd is running?

Update: I found this in the execution script for /etc/X11/Xserver:
Code: [Select]
               # Horrible hack required to enable resuming after suspend
                rm -f /dev/apm_bios
                killall -9 apmd

Now I just need someone to tell me about the how a Zaurus that doesn't have these problems in the first place behaves with no apmd running.
Zaurus SL-C1000 - Linux 2.6.22 - Angstrom/Debian dual boot - Ambicom 802.11b - 1GB Corsair SD
Nokia N800 - 2GB PQI SD card
Zaurus SL-5500 - OZ 3.5.3/Hentges T2/Opie - 64MB Lexar SD card

Fray

  • Newbie
  • *
  • Posts: 5
    • View Profile
Oz3.5.3 (collie) On/off Button Problem
« Reply #65 on: June 10, 2005, 12:37:03 am »
Quote
Now I just need someone to tell me about the how a Zaurus that doesn't have these problems in the first place behaves with no apmd running.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=83566\"][{POST_SNAPBACK}][/a][/div]


Wait, I don't quite understand what you need tested...  My 5500 seems to have pretty much the same issue; with the apm_bios line in, it won't resume after suspend about 25% of the time.  You're looking for someone with a 5500 who can suspend/resume consistently with the line in?

This would mean I can't help...  but if I got it mixed up and I have what you need, I'd be happy to

Penguin Man

  • Newbie
  • *
  • Posts: 25
    • View Profile
Oz3.5.3 (collie) On/off Button Problem
« Reply #66 on: June 10, 2005, 01:12:55 am »
Quote
Hmm...Well that is interesting.  Could you see if apmd is running?

Update: I found this in the execution script for /etc/X11/Xserver:
Code: [Select]
               # Horrible hack required to enable resuming after suspend
                rm -f /dev/apm_bios
                killall -9 apmd

Now I just need someone to tell me about the how a Zaurus that doesn't have these problems in the first place behaves with no apmd running.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=83566\"][{POST_SNAPBACK}][/a][/div]

Aha, it would seem that on my machine, even though the /dev/apm_bios line in /etc/device_table exists, there is no apmd running and /dev/apm_bios doesn't exist (which would explain the error that apm -s gives - Cannot open APM device: No such file or directory).

JohnX

  • Full Member
  • ***
  • Posts: 126
    • View Profile
    • http://
Oz3.5.3 (collie) On/off Button Problem
« Reply #67 on: June 10, 2005, 01:27:18 am »
Penguin Man: Exactly, I didn't remember correctly how apm was diabled in the GPE release.  I thought it was by commenting out the line in /etc/device_table but it must be through that little script that runs as part of X startup.

Quote
You're looking for someone with a 5500 who can suspend/resume consistently with the line in?

Fray: Thanks for the offer. Unfortunately, you're correct.   Some people seem to have no problems at all suspending the 5500 with the /dev/apm_bios line in /etc/device_table.  One of those people is Mickeyl, one of the main OZ developers.  And since he can't reproduce the crash he can't fix it.

On that note:  I've been trying to get my Zaurus to do the "resume of death" all afternoon and now for whatever reason it seems to be working fine. Bah. I might reflash back to a base OZ 3.5.3 image soon in hopes of getting it to show up again so I test some other things...
Zaurus SL-C1000 - Linux 2.6.22 - Angstrom/Debian dual boot - Ambicom 802.11b - 1GB Corsair SD
Nokia N800 - 2GB PQI SD card
Zaurus SL-5500 - OZ 3.5.3/Hentges T2/Opie - 64MB Lexar SD card

deusiah

  • Newbie
  • *
  • Posts: 16
    • View Profile
Oz3.5.3 (collie) On/off Button Problem
« Reply #68 on: June 10, 2005, 04:46:52 am »
Isn't a 5500 a 5550? They didn't put any different software in did they if not then theres probably something running that's causing the problem. Perhaps it's something to do with my wireless card or some taskbar apps I have open? I'll have to mess about with my Z disabling/enabling various things, I'll let you know if I come across anything interesting.

samac

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Oz3.5.3 (collie) On/off Button Problem
« Reply #69 on: June 10, 2005, 06:02:05 am »
As this appears to be pointing towards an apm problem, I called up the PID for apm found this line
Quote
/usr/sbin/apmd -P /etc/apm/apmd_proxy --proxy-timeout 30
and killed it.

My Zaurus could then suspend and resume from the on/off button.
Suspend with the right arrow and resume from the on/off button.
Suspend from the menu and resume from the on/off button.

All would seem to be fixed with a simple command, but all was not well in the land of Zaurus.

Upon resume I could not connect to the Z from my slackware box, it appears to effect the network connection in some way, because normally I just have to give my usb port an IP address and a route and I have connection.

With apm suspended I would have to manually start the network at the zaurus side as per the thread here:

Quote
You need to save & run the script from this message (read the whole thread for more info) & set up a desktop shortcut for it to make it painless to run. HTH

Why would Power Management effect networks?

samac
Zaurus SL5500
Hentges 1.0.x
64mb CF card
256mb SD card
Pocket-top Keyboard
Slackware 11.0 (2.6.17.13)

grog

  • Hero Member
  • *****
  • Posts: 692
    • View Profile
    • http://
Oz3.5.3 (collie) On/off Button Problem
« Reply #70 on: June 10, 2005, 07:13:35 am »
Re: samac killing apmd causing usb network problems

I have left my device_table at 'factory default' & apmd is still running & I always have to restart my usb modules after disconecting from my desktop without rebooting. So at least in my case the two don't seem to be related.
GROG!

samac

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Oz3.5.3 (collie) On/off Button Problem
« Reply #71 on: June 10, 2005, 08:36:42 am »
Strange I only have to do this on the desktop side
Code: [Select]
ifconfig usb0 192.168.0.4 netmask 255.255.255.0 up
route add -host 192.168.0.5 usb0
and if I could be bothered I could probably add it in to my rc.hotplug script, and not even have to do that.

I have to do nothing on the zaurus side, could that be because I have set usbd0 to start automatically.

samac
Zaurus SL5500
Hentges 1.0.x
64mb CF card
256mb SD card
Pocket-top Keyboard
Slackware 11.0 (2.6.17.13)

grog

  • Hero Member
  • *****
  • Posts: 692
    • View Profile
    • http://
Oz3.5.3 (collie) On/off Button Problem
« Reply #72 on: June 10, 2005, 10:49:26 am »
Quote
Strange I only have to do this on the desktop side
Code: [Select]
ifconfig usb0 192.168.0.4 netmask 255.255.255.0 up
route add -host 192.168.0.5 usb0
and if I could be bothered I could probably add it in to my rc.hotplug script, and not even have to do that.

I have to do nothing on the zaurus side, could that be because I have set usbd0 to start automatically.[div align=\"right\"][a href=\"index.php?act=findpost&pid=83695\"][{POST_SNAPBACK}][/a][/div]
I could try that if my desktop was a nice, workable nix box. Unfortunately I use my Z on 2 stations, both 'doze (one 2000 the other XP).

Is the problem on the desktop side, even though the os's are different? Interesting. I'll try disabling then re-enabling the Z's network icon & see what happens.
[testing...]
Now it reconnects just fine (of course), even when I suspend/resume in between. Maybe I was imagining it all??  I don't think so. I'll do some more testing & report back.
GROG!

Penguin Man

  • Newbie
  • *
  • Posts: 25
    • View Profile
Oz3.5.3 (collie) On/off Button Problem
« Reply #73 on: June 10, 2005, 01:16:42 pm »
Quote
Upon resume I could not connect to the Z from my slackware box, it appears to effect the network connection in some way, because normally I just have to give my usb port an IP address and a route and I have connection.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=83676\"][{POST_SNAPBACK}][/a][/div]

The USB networking can be resumed after suspending that way by calling /etc/apm/scripts.d/usbnet (as root of course).  For the moment I'm perfectly happy suspending/resuming from the cancel key and running that script when I resume and want a network connection (I just setup a "resume usb" icon on my desktop so I can do it quickly).
« Last Edit: June 10, 2005, 01:17:57 pm by Penguin Man »

Fray

  • Newbie
  • *
  • Posts: 5
    • View Profile
Oz3.5.3 (collie) On/off Button Problem
« Reply #74 on: June 10, 2005, 06:42:02 pm »
Quote
On that note:  I've been trying to get my Zaurus to do the "resume of death" all afternoon and now for whatever reason it seems to be working fine. Bah. I might reflash back to a base OZ 3.5.3 image soon in hopes of getting it to show up again so I test some other things...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=83646\"][{POST_SNAPBACK}][/a][/div]

It seems to happen more consistently when you have an app running, like -- bring up calendar, then suspend.

Also I think it helps to suspend and leave it suspended a long time before waking it up.