Author Topic: Suspend Crashes  (Read 70268 times)

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Suspend Crashes
« Reply #30 on: May 06, 2007, 06:19:44 pm »
Quote
What does your /etc/fstab look like? Have you enable the microdrives cache?
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
This is my /etc/fstab. Thanks!
Code: [Select]
/dev/wd0a  /      ffs  rw,noatime,softdep 1 1
/dev/wd0d  /home  ffs  rw,noatime,softdep 1 2
/dev/wd0e  /tmp   ffs  rw,noatime,softdep 1 2
/dev/wd0f  /usr   ffs  rw,noatime,softdep 1 2
/dev/wd0g  /home  ffs  rw,noatime,softdep 1 2

And i have harddisk cache enabled, following the suggestions in [a href=\"http://exit3.i-55.com/%7Exikon/zaurustipsandtricks.html]http://exit3.i-55.com/%7Exikon/zaurustipsandtricks.html[/url]
« Last Edit: May 06, 2007, 06:22:23 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Suspend Crashes
« Reply #31 on: May 07, 2007, 10:17:45 am »
Quote
Here is what i got more than once when the Z fails to resume:

Code: [Select]
wdc0:0:0:  not ready, st = 0x88, err = 0x00
wdc0 channel 0: reset failed for drive 0
wd0f : device timeout reading fsbn 156672 of 156672-0 (wd0 bn 7791264 cn 7729 tn 6 sn 54)

It seems that resuming in X works better than in console. Maybe i am wrong.

Also does the close-lip-to-suspend thing involve both suspend and turning off the lcd?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160638\"][{POST_SNAPBACK}][/a][/div]


well
it seems today i felt into a resume bug too......i suspend this morning (in X under fluxbox) and this afternoon it was impossible to resume............ i had to remove the battery...
i wonder if it could be linked to my old zbsdmod.o/zboot in my flash...i'm updating to see if it helps...
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Suspend Crashes
« Reply #32 on: May 07, 2007, 10:30:06 am »
This is what mathemajikian told me today:
Quote
For a normal openbsd system I would use the 6 partitions. The Z it has to read the drive upon resuming, and 6 partitions might be a little to much for the slow hard drive. Thats why you are seeing those errors when you resume. The disks motor can't keep up with the kernel requests.

I am using 6 partitions following the advice here: http://www.planetofidiots.com/zaurus/#install

So there seem to be two solutions:
1) Use one big partitions for everything + one swap partition (or simply one partition with swapfile -- which one is better?)
2) Swap the internal MD with a hi-speed CF

Anyway i will install the system again in one big partition and see if the problem persists.
« Last Edit: May 07, 2007, 10:33:06 am by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Suspend Crashes
« Reply #33 on: May 07, 2007, 11:49:07 am »
Quote
This is what mathemajikian told me today:
Quote
For a normal Openbsd system I would use the 6 partitions. The Z has to read the drive upon resuming, and 6 partitions might be a little to much for the slow hard drive. Thats why you are seeing those errors when you resume. The micro drives motor can't keep up with the kernel requests.

I am using 6 partitions following the advice here: http://www.planetofidiots.com/zaurus/#install

So there seem to be two solutions:
1) Use one big partitions for everything + one swap partition (or simply one partition with swapfile -- which one is better?)
2) Swap the internal MD with a hi-speed CF

Anyway i will install the system again in one big partition and see if the problem persists.

What's the output of the following two commands:

# fdisk wd0

# disklabel wd0

If you created the partitions outside the bounds of the disk, then you would be attempting to read beyond the disk and this could cause these errors. I would try and use the one big partition wd0a + swap. Remember not to change wd0c.

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Suspend Crashes
« Reply #34 on: May 07, 2007, 01:22:20 pm »
Quote
Quote
What does your /etc/fstab look like? Have you enable the microdrives cache?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160648\"][{POST_SNAPBACK}][/a][/div]
This is my /etc/fstab. Thanks!
Code: [Select]
/dev/wd0a  /      ffs  rw,noatime,softdep 1 1
/dev/wd0d  /home  ffs  rw,noatime,softdep 1 2
/dev/wd0e  /tmp   ffs  rw,noatime,softdep 1 2
/dev/wd0f  /usr   ffs  rw,noatime,softdep 1 2
/dev/wd0g  /home  ffs  rw,noatime,softdep 1 2

Also, I just noticed that you have softdep in your fstab. This will not work with the snapshot GENERIC kernel!  In order to utilize softdep you'll have to rebuild the kernel from source with the following option:

option     FFS_SOFTUPDATES

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Suspend Crashes
« Reply #35 on: May 07, 2007, 01:43:14 pm »
Here are the results of both:
Code: [Select]
Disk: wd0    geometry: 11905/16/63 [12000556 Sectors]
Offset: 0    Signature: 0xAA55
         Starting       Ending       LBA Info:
 #: id    C   H  S -    C   H  S [       start:      size   ]
------------------------------------------------------------------------
 0: 00    0   0  0 -    0   0  0 [           0:           0 ] unused      
 1: 00    0   0  0 -    0   0  0 [           0:           0 ] unused      
 2: 00    0   0  0 -    0   0  0 [           0:           0 ] unused      
*3: A6    0   1  1 - 11904  15 63 [          63:    12000177 ] OpenBSD    
# /dev/rwd0c:
type: ESDI
disk: ESDI/IDE disk
label: HMS360606D5CF00
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 11905
total sectors: 12000556
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0  # microseconds
track-to-track seek: 0    # microseconds
drivedata: 0

16 partitions:
#             size        offset  fstype [fsize bsize  cpg]
  a:        409185            63  4.2BSD   2048 16384    1 # Cyl     0*-   405
  b:        524160        409248    swap                   # Cyl   406 -   925
  c:      12000556             0  unused      0     0      # Cyl     0 - 11905*
  d:        408240        933408  4.2BSD   2048 16384    1 # Cyl   926 -  1330
  e:       6290928       1342656  4.2BSD   2048 16384    1 # Cyl  1332 -  7572
  f:        613872       7634592  4.2BSD   2048 16384    1 # Cyl  7574 -  8182
  g:       3750768       8249472  4.2BSD   2048 16384    1 # Cyl  8184 - 11904

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Suspend Crashes
« Reply #36 on: May 07, 2007, 01:47:10 pm »
Quote
Also, I just noticed that you have softdep in your fstab. This will not work with the snapshot GENERIC kernel!  In order to utilize softdep you'll have to rebuild the kernel from source with the following option:

option     FFS_SOFTUPDATES
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160719\"][{POST_SNAPBACK}][/a][/div]

Thanks. But I am not yet familiar with obsd, let alone compiling the kernel. So would it be possible for you to upload the new kernel somewhere? Thanks in advance!

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Suspend Crashes
« Reply #37 on: May 07, 2007, 05:35:37 pm »
Quote
Quote
Quote
What does your /etc/fstab look like? Have you enable the microdrives cache?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160648\"][{POST_SNAPBACK}][/a][/div]
This is my /etc/fstab. Thanks!
Code: [Select]
/dev/wd0a  /      ffs  rw,noatime,softdep 1 1
/dev/wd0d  /home  ffs  rw,noatime,softdep 1 2
/dev/wd0e  /tmp   ffs  rw,noatime,softdep 1 2
/dev/wd0f  /usr   ffs  rw,noatime,softdep 1 2
/dev/wd0g  /home  ffs  rw,noatime,softdep 1 2

Also, I just noticed that you have softdep in your fstab. This will not work with the snapshot GENERIC kernel!  In order to utilize softdep you'll have to rebuild the kernel from source with the following option:

option     FFS_SOFTUPDATES
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160719\"][{POST_SNAPBACK}][/a][/div]


ok for the softdep, but since i put noatime in /, now the boot process is much much longer: after the "/dev/rwd0a: file system is clean; not checking", the zaurus is doing something with the harddrive for a long time before the boot continue.....
what is happenning there???

EDITED:
after the long wait, i finally have this message:
/dev/rwd0j: Invalid signature in fsinfo block/dev/dwd0j: 74237 files, 887368 free (221842 clusters)

what does it mean??
« Last Edit: May 07, 2007, 05:51:06 pm by jpmatrix »
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Suspend Crashes
« Reply #38 on: May 07, 2007, 05:51:54 pm »
Quote
Also, I just noticed that you have softdep in your fstab. This will not work with the snapshot GENERIC kernel!  In order to utilize softdep you'll have to rebuild the kernel from source with the following option:

option     FFS_SOFTUPDATES

It's compiled in GENERIC now, so you should be fine with softdep in your fstab:    
Quote
To use Soft Updates, your kernel must have

option FFS_SOFTUPDATES

compiled in, this is already in place on GENERIC.
« Last Edit: May 07, 2007, 05:55:17 pm by mathemajikian »

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Suspend Crashes
« Reply #39 on: May 10, 2007, 12:23:07 pm »
it seems i went again into an mission impossible to resume ! ... even the charge light didn't lit... only way was to remove battery....

any clue about that ??
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Suspend Crashes
« Reply #40 on: May 10, 2007, 03:24:12 pm »
The suspend problem doesn't go away, and actually becomes even worse, since I reinstalled the system from the latest snapshots in one partition last night (i did absolutely nothing else apart from following the Afterboot suggestions religiously.

zzz suspend can be resumed sometimes, but fails sometimes as well;

closing lid to suspend fails to resume *100%* of the time.

Is it really that there is nothing broken in the apm, or i go wrong somewhere?    

Suspend/resume is such a basic thing that must work out of the box for a healthy distro, isn't it?

Now i am really confused about what to do with the setup ...
« Last Edit: May 10, 2007, 03:26:52 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Suspend Crashes
« Reply #41 on: May 10, 2007, 03:40:42 pm »
Also can someone kindly tell me explicitly how to use apm or other means to show accurate remaining power?

I've tried all the options possible with apm and only have 100% or 180 minutes all the time. Even though the battery is actually running low (when i boot into cacko and check).

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Suspend Crashes
« Reply #42 on: May 10, 2007, 03:58:00 pm »
Okay, just to be more precise to the symptoms:

When suspending in console (both zzz and closing the lid), resume will produce a very short white flash on the screen, followed by screen black out. Typing "wsconsctl display.backlight=100" doesn't work at all.
After waiting a while i see the green light on, which i guess is the system trying desparately to resume the microdrive, but keeps failing (sometimes i see the error message of failing to reset wdc0 blah, but most of the time just everything in the dark).

When suspending in X, resume usually can bring the screen back, but then the system freezes. After a while the screen goes dark and the green LED turns on, which probably also indicate the harddrive reset failure ...


***

So here i would really appreciate clear answers to the questions ( the more i read the documentation and the tips pages, the more i seem to get confused, just because things do not work as described )
Sorry for getting a bit paranoid now because i am beginning to get a bit frustrated after spending two weeks without getting a stable enough system working.

1) Which version is actually more preferred? The snapshots (which I've been trying to get working but always got errors) or the "official" releases (from the 4.1 dir)?

2) What should I put in /etc/fstab about wd0 if I install the snaphot in one big partition?

3) Should writecacheenable be enabled or not?

4) About swapfile: is it fine to set up swapfile after installing *everything* (including all the distribution sets) in one big partition?

5) And of course, what is the source of the suspend trouble? Frankly, I have already tested a few dozen times (believe me) trying to exhaust all the possibilities: with/without memory cards mounted, with/without cards inserted, with/without AC, with/without disk cache, with/without turning on mechdep.lidsuspend in /etc/sysctl.conf ...
« Last Edit: May 10, 2007, 04:10:01 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Suspend Crashes
« Reply #43 on: May 10, 2007, 04:52:38 pm »
Quote
Sorry for getting a bit paranoid now because i am beginning to get a bit frustrated after spending two weeks without getting a stable enough system working.

Quote
1) Which version is actually more preferred? The snapshots (which I've been trying to get working but always got errors) or the "official" releases (from the 4.1 dir)?

Releases are generally preferred. Snapshots = -current which is the bleeding edge, and as stated before there can be a lot of bleeding involved!

Quote
2) What should I put in /etc/fstab about wd0 if I install the snaphot in one big partition?

If your swap file is on this partition then you can't put in softdep. Other than that you should be fine.

Quote
3) Should writecacheenable be enabled or not?

Your choice.

Quote
4) About swapfile: is it fine to set up swapfile after installing *everything* (including all the distribution sets) in one big partition?

I don't see any problems with this, but thats just me.

Quote
5) And of course, what is the source of the suspend trouble? Frankly, I have already tested a few dozen times (believe me) trying to exhaust all the possibilities: with/without memory cards mounted, with/without cards inserted, with/without AC, with/without disk cache, with/without turning on mechdep.lidsuspend in /etc/sysctl.conf ...

Try this:

use zzz -z suspend and see if it still fails to resume, if so then try zzz -S standby and see what happens.

zzz -z suspend puts the Z in a deep sleep whereas zzz -S standby puts the Z in a light sleep.

If that doesn't work then use shutdown -hp now until the problem is corrected. If you can't wait then convert back to a penguin distribution.
« Last Edit: May 10, 2007, 08:58:11 pm by mathemajikian »

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Suspend Crashes
« Reply #44 on: May 10, 2007, 04:55:38 pm »
Quote
Also can someone kindly tell me explicitly how to use apm or other means to show accurate remaining power?

I've tried all the options possible with apm and only have 100% or 180 minutes all the time. Even though the battery is actually running low (when i boot into cacko and check).

The apm battery monitor doesn't work all that great. Here's a list of known problems which are currently being worked on:

    *  Repair pcmcia issues that are causing "white-out" problems with some devices.
    * Fix the odd suspend crashing bugs and RTC skew.
    * C860/C1000 support.
    * Support the I2C GPIO controller (C3100 and C3200) using the machine-independent i2c code.
    * Internal flash memory support as a sd(4) device.
    * Fix battery drain during suspend.
    * Fix remaining issues in SDIO support.