Suspend works only when boot USB stick is pulled out -2.1rc2

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
User avatar
solnyshok
White ninja
White ninja
Posts: 16
Joined: 28 Jul 2013, 16:18
Distribution: Porteus 2.1x64 @64GB microSDHC
Location: Riga, Latvia

Suspend works only when boot USB stick is pulled out -2.1rc2

Post#1 by solnyshok » 28 Jul 2013, 16:44

Hi,

I am new to Porteus, tried Ubuntu (hdd install), Puppy Slacko (USB) and Upup Raring (USB) before. Everything works well, including HP buttons for WiFi On/Off, Brightness and Volume controls. I saved my customizations to module and Porteus is booting very quickly.

I am booting Porteus 2.1rc2/Mate on hp 2530p (4GB RAM) from USB (/dev/sdb1 - FAT32) with cheatcodes copytoram, changes=EXIT:/porteus/porteussave.dat

My problem 1: Running on laptop, I would like to occasionally suspend it, but when I click
Menu -> Shutdown -> Suspend
nothing happens, unless I pull out USB. Then OS suspends. It wakes fine, all my apps are in modules which are loaded to RAM, so I can continue to use it. However, with this approach, /mnt/sdb1 is empty after wakeup, I cannot use it anymore.

My problem 2: Even without suspending laptop, I would like to remove USB stick after boot, and pop it in only to save changes at shutdown or manually.

What would be the right approach then? How can I remove USB cleanly, and retain ability to save changes later?

User avatar
fanthom
Site Admin
Site Admin
Posts: 4613
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Suspend works only when boot USB stick is pulled out -2.

Post#2 by fanthom » 28 Jul 2013, 20:43

hi solnyshok,

a) please try to suspend when running any other desktop (KDE4, LXDE, etc) to make sure it's not Mate related.
b) removing USB stick is not possible when you are using 'changes=' or 'changes=EXIT:' cheatcode.
when 'EXIT:' extension is used then writes are delayed till shutdown but system still needs to read the changes saved during previous session. imagine you downloaded porteus screenshots and saved in /Downloads folder. these images gets dumped on your stick during shutdown but after a reboot they need to be accessible (so you cant take the stick out).

copy2ram has no effect on changes, only modules are copied to memory.
Please add [Solved] to your thread title if the solution was found.

User avatar
solnyshok
White ninja
White ninja
Posts: 16
Joined: 28 Jul 2013, 16:18
Distribution: Porteus 2.1x64 @64GB microSDHC
Location: Riga, Latvia

Re: Suspend works only when boot USB stick is pulled out -2.

Post#3 by solnyshok » 28 Jul 2013, 21:21

Hi, phantom. I will try other DE.

Can you elaborate why persistence information is written to .dat files instead of xzm's? I think Puppy Linux is doing exactly this - they save compressed squashfs images (sfs files) on shutdown. Instead of writing/reading thousands of files, only one compressed image is saved/read.

Do you know if anybody here is using a script to automatically save persistence data to a xzm module on shutdown? Will I be able to unmount usb stick after boot, if I remove "changes" from boot params?

User avatar
fanthom
Site Admin
Site Admin
Posts: 4613
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Suspend works only when boot USB stick is pulled out -2.

Post#4 by fanthom » 29 Jul 2013, 08:49

Can you elaborate why persistence information is written to .dat files instead of xzm's?
few reasons for that:
- writing to .dat is done in real time so no data loss in case of power outage/system hang
- writing to xzm is time consuming and means very high CPU usage. imagine someone downloaded Ubuntu ISO (900MB) and this data needs to be compressed to xzm. this would take forever on low specs PC.
- in order to write to xzm this archive must be unpacked first. when space is limited (on usb stick) then this operation may be not possible. moreover: we cant unpack to FAT/NTFS due to perms/symlinks issues. we could unpack to RAM but if one has 512MB then it wont be possible in case of dealing with large xzm.
Do you know if anybody here is using a script to automatically save persistence data to a xzm module on shutdown?
there is a script called 'save-changes' which dumps your current session to the xzm module. you could create /etc/rc.d/rc.local_shutdown which runs this script and achieve what you want. mind that every reboot will produce new xzm. let us know if that worked.
Will I be able to unmount usb stick after boot, if I remove "changes" from boot params?
yes, but remember to use 'copy2ram'
Please add [Solved] to your thread title if the solution was found.

User avatar
solnyshok
White ninja
White ninja
Posts: 16
Joined: 28 Jul 2013, 16:18
Distribution: Porteus 2.1x64 @64GB microSDHC
Location: Riga, Latvia

Re: Suspend works only when boot USB stick is pulled out -2.

Post#5 by solnyshok » 30 Jul 2013, 07:00

I tried LXDE,XFCE,Openbox,Mate. All of them wait to suspend until USB sticks is physically pulled out from the USB slot. Strange. In the 2nd USB slot I have wireless mouse transmitter, but it doesn't interfere with suspend.

Post Reply