Author Topic: Swapfile causes Zaurus to freeze  (Read 2232 times)

edwinbradford

  • Newbie
  • *
  • Posts: 46
    • View Profile
Swapfile causes Zaurus to freeze
« on: September 17, 2004, 02:29:55 pm »
I posted this a few weeks back without success and the problem has come back to haunt me. I've tried running Qswap to generate a swapfile of varying sizes on my FAT formatted CF card but each time I reawake after a suspend the zaurus freezes. Strange thing is, the text cursor blinks on the screen but it won't respond to any key or pen commands and I have to switch of the battery and restart. It's a Zaurus C700 with the latest Sharp Rom.

I also installed a swapfile generating script from here http://rio.vg/zaurus/ which worked but didnt solve the freezing problem. I assume that a swapfile once generated doen't need to be deactivated, you just suspend and awake without touching the swap file? Assuming so, does anyone know what the problem might be?

edwinbradford

  • Newbie
  • *
  • Posts: 46
    • View Profile
Swapfile causes Zaurus to freeze
« Reply #1 on: September 18, 2004, 03:59:09 pm »
OK, now I've tried this solution http://cmisip.home.insightbb.com/zaurus.htm#SWP but changed the script for a CF card rather than an SD card. I ran it like this:

++++++++++++++++++++++++++++++

ln -sf /etc/rc.d/rc.local /etc/rc.d/rc5.d/S99local


Now, in rc.local type in:

umount /mnt/cf
killall cardmgr
fsck.msdos -y /dev/hda1
sleep 2
/sbin/cardmgr


Now we can create the swap file on /mnt/cf:

dd if=/dev/zero of=/mnt/cf/swapfile bs=1M count=32
mkswap -v1 /mnt/cf/swapfile


Add the lines at the bottom of rc.local (before exit 0):

mount /mnt/cf
sleep 3
/sbin/swapon /mnt/cf/swapfile


Also add the corresponding commands to terminate the swap file in /etc/rc.d/init.d/halt:

/sbin/swapoff /mnt/cf/swapfile
sleep 3
umount /mnt/card
umount /mnt/cf
sleep 2

++++++++++++++++++++++++++++++++

But couldn't get the swapfile to activate on reboot. Then I tried all the commands one by one in the terminal and any that didn't work (fsck wouldn't work after killall) were deleted, still no luck.

I also tried this thread https://www.oesf.org/forums/inde...t=0&#entry42491 and especially:

Quote
If you use a swap file, instead of a swap partition, then you might have to run "su root" to gain full system access on the command line and edit the /root/etc/rc.d/rc.sysinit file and uncomment the section that runs the rc.local script. The Zaurus computers with the default ROM are somewhat non-standard in the places where they place some configuration files like rc.sysinit. Then put the "swapon /path/filename" command in the rc.local file. Someone else on the board mentioned how to make /root writable with the mount command.

Managed to find all the information on how to make the /root writable but still no swap file on reboot. What's going on? Nothing seems to work? My last idea is to learn how to use fdisk and try to make a bootable partition as per the same thread:

Quote
Regarding getting the swap file to work on boot-up: If you already have a separate partition for the swap space, then you can run "su root" to become the system administrator and then edit the /etc/fstab file. I do not recall off the top of my head the syntax for that. Someone else here probably knows, or you can read a reference manual.

edwinbradford

  • Newbie
  • *
  • Posts: 46
    • View Profile
Swapfile causes Zaurus to freeze
« Reply #2 on: September 19, 2004, 07:44:16 am »
Used fdisk, made a swapfile partition on my CF card which I configured in fstab to run at startup. Guess what, makes no difference. Still freezes on suspend. I checked with a "Free" command in terminal and the swap file was there after restart (I can prevent freezing on restart by not running any applications at all). Today I've installed cacko temporarily and ran Qswap to see what happened. It STILL freezes so I've figured out that swapdisks just freeze either on all machines or on the C700 if you leave them running and put the machine to sleep.

Meaning you have to shut down all applications, then shut down the swap file, then next time you reboot, switch on the swap file then launch applications... do you see? What's the point? If you're a user who uses the zaurus for a couple of hours at a time then you might live with it. If like me you use it for 5 minute spells frequently then it's a non starter.

Correct me if I'm wrong.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Swapfile causes Zaurus to freeze
« Reply #3 on: September 19, 2004, 09:35:45 am »
From what Mickeyl said in another thread, 2.4.18 kernels umount the storage cards on suspend. This may upset the memory management in the kernel. The question is whether or not anyone has got a swapfile on external storage using this kernel (that means all 5500/5000D 3.xx ROMs, Cacko, PdaXrom, OZ >=3.3.5, and all C machine and 5600 ROMs etc.)?


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

edwinbradford

  • Newbie
  • *
  • Posts: 46
    • View Profile
Swapfile causes Zaurus to freeze
« Reply #4 on: September 19, 2004, 10:29:44 am »
Well I'm a linux novice but it sounds like something that's begging to be fixed or worked around. From what I've read lots of people are forced to use swap files and it must be a pain in the butt to have to keep activating deactivating them. Kernels are beyond me but hopefully someone will release one that addresses it. Thanks for the reply.