OESF Portables Forum

Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: qx773 on February 17, 2004, 09:38:09 pm

Title: Preventing Suspend
Post by: qx773 on February 17, 2004, 09:38:09 pm
I was using tkcVox to try and record a training session, but it only recorded the first 7 minutes 11 seconds before the Zaurus SL-C760 went into suspend mode and cut off the recording.  Does anyone know how to prevent an individual program from suspending?
Title: Preventing Suspend
Post by: Foxdie on February 18, 2004, 06:26:40 am
No but you can prevent the pda from going into suspend by editing qpe.conf which I have forgotten where it\'s located, sorry  I know you can disable suspend in there by giving an insanely high value or a value of 0
Title: Preventing Suspend
Post by: zmike on February 18, 2004, 08:12:07 am
It seems that every time you play with the brightness, it gets overwritten though!
The file is in /home/zaurus/Settings.
Title: Preventing Suspend
Post by: tumnus on February 18, 2004, 09:23:13 am
To temporarily disable suspending, you can run this command from the terminal as the \'zaurus\' user:

qcop QPE/System \'setScreenSaverMode(int)\' 2

To re-enable suspending you run this command:

qcop QPE/System \'setScreenSaverMode(int)\' 100

That\'s how apps like Opie Reader disable suspending when you are reading an e-book with autoscroll on. tkcVox should do this too and I put a request in theKompany\'s Mantis system for this, but tkcVox seems like a half finished product to me. I can\'t record more than a length of time that produces a filesize larger than about 1MB anyway. It just suddenly stops. I guess it uses /tmp and runs out of memory.
Title: Preventing Suspend
Post by: lardman on February 18, 2004, 10:01:51 am
It should be easy enough to do it yourself - stick a script around the binary to do the call before starting and the other after stopping the program, then edit the .desktop file to point to the script rather than the binary. Nice and easy, something like:

---------------------------------------------------------
#! /bin/sh
qcop QPE/System \'setScreenSaverMode(int)\' 2
./opie-reader
qcop QPE/System \'setScreenSaverMode(int)\' 100
---------------------------------------------------------


Si
Title: Preventing Suspend
Post by: tumnus on February 18, 2004, 10:45:42 am
Yes. Only problem with scripts like that though is you lose the taskbar icon and you cannot get back to the app instance by relaunching as I think it launches another instance (or tries to).
Title: Preventing Suspend
Post by: Anonymous on February 18, 2004, 11:56:39 am
Hmmm...Tumnus, in my experience that is not completely true.  I use a script like that for Wellenreiter and it seems to work fine.  I get the teskbar icon and no attempt for a relaunch.  I think it may depend on what application you are running.
Title: Preventing Suspend
Post by: qx773 on February 18, 2004, 11:14:13 pm
Thank you for the information.  I had to reboot after modifying the *.desktop file in order for the change to the Exec line to take effect.  Now, I am able to record without the computer going into suspend.
Title: Preventing Suspend
Post by: qx773 on February 19, 2004, 01:35:17 am
I was able to create a 2MB+ recording file with tkcVox after disabling suspend.  I did notice, however, that if the input gain is set too high, then tkcVox will terminate during playback with a division error.  You will see the error message when you run tkcVox from the terminal command line, but not from the graphical environment.