# Running many hacks? Try this:



## mikerr (Jun 2, 2005)

My tivo was becoming *very* sluggish after installing a few hacks and some umentionables 

I found this tip, which made a huge difference:

download setpri from 
 here

ftp it over to tivo, and unzip it

cd /var/hack
gzip -d setpri.zip

then insert this line into /etc/rc.d/sysinit.author BEFORE all the hacks, i.e. as the first line of that file:

/var/hack/setpri fifo 1 $$

This just sets your hacks to be lower priority than tivo's GUI, making it more responsive if you have a lot of hacks, it doesn't slow anything down at all.

Note this also solves many stuttering with tivoweb(plus) issues too!


----------



## davisa (Feb 19, 2002)

I'm surprised no-one else has replied to this, because it looks like a very useful tip.

Thanks for posting, I'll give it a go.


----------



## Pete77 (Aug 1, 2006)

davisa said:


> I'm surprised no-one else has replied to this, because it looks like a very useful tip.
> 
> Thanks for posting, I'll give it a go.


I have tried installing this but it seems to stop the autospace.tcl graphic from working in Now Playing even if I have autospace startup before setpri runs in my rc.sysinit.author.edit file.


----------



## CarlWalters (Oct 17, 2001)

Does this requires a re-boot of TiVo or just a re-start of TiVoWeb?


----------



## Pete77 (Aug 1, 2006)

CarlWalters said:


> Does this requires a re-boot of TiVo or just a re-start of TiVoWeb?


A reboot of Tivo is required to make this operational since this Linux command affects the background priority given to the running of both TivoWeb and other non TivoWeb utilities like Endpad or Autospace versus the running of the normal Tivo menus and interface that appear on your Tv.

However as I have indicated it seems to completely disable the successful operation of AutoSpace on the Now Playing screen in Tivo, even if autospace loads before the setpri command is run. It does not interfere with Endpad which is still running and adding time to programs as normal.

It does seem to make the Tivo menus a little faster but at the price of no Autospace on screen graphic.......................


----------



## Pete77 (Aug 1, 2006)

mikerr said:


> download setpri from
> here
> 
> ftp it over to tivo, and put it in /bin
> ...


Do you or anyone else have any suggestions on what command is now needed to return the fifo setpri to the original priority number as I found this command makes the autospace.tcl graphic in Now Playing not work at all and it also now takes ages to log on to the machine using TivoWeb.

I tried removing the setpri command line from the rc.sysinit.author.edit file with my Startup Editor utility in TivoWeb and rebooted the machine but still the autospace graphic in Now Playing is not showing. So it looks to me like the setpri command makes a permanent change that is recorded to the hard drive on the Tivo and remembered on each machine reboot?

I have decided that having faster Tivo menus is not important to me and instead I want to retain my autospace Now Playing graphic and to have fast TivoWeb access as I did before. How can I deactivate the setpri command giving priority to the Tivo menus above all else? What alternative setpri number would return them to their original priority status in relation to background programs like Endpad and Autospace?


----------



## B33K34 (Feb 9, 2003)

I might try this. I'm in the (slow) process of reinstalling all my hacks after the directory got wiped. Currently frustrated by all the things that seem to be missing from TivoWeb as opposed to the TWP i had installed previously.


----------



## mikerr (Jun 2, 2005)

Pete77 said:


> Do you or anyone else have any suggestions on what command is now needed to return the fifo setpri to the original priority number as I found this command makes the autospace.tcl graphic in Now Playing not work at all and it also now takes ages to log on to the machine using TivoWeb.


 I think the problem is that autospace attempts to set its own prioirty using the setpri command, but you didn't have that command on tivo before now.

So you could remove the setpri command from autospace script, or remove the setpri command from your tivo (see below)



> So it looks to me like the setpri command makes a permanent change that is recorded to the hard drive on the Tivo and remembered on each machine reboot?


No, it doesn't write to the hard drive at all !

Just remove the setpri command from /bin if you want to return to the way you had it before

mount -o remount,rw /
rm /bin/setpri

and reboot to get rid.


----------



## Pete77 (Aug 1, 2006)

mikerr said:


> No, it doesn't write to the hard drive at all !
> 
> Just remove the setpri command from /bin
> 
> ...


OK thanks.

But no way to keep autospace and have setpri achieve what one was hoping it would achieve it seems?


----------



## mikerr (Jun 2, 2005)

I don't use autospace, but i've just made a copy of autospace.tcl with the setpri lines edited out (attached)

I'll install it just to try later

[edit] the standard autospace1.1 works fine as found here:
http://www.tivocommunity.com/tivo-vb/showthread.php?t=153732


----------



## Pete77 (Aug 1, 2006)

mikerr said:


> I don't use autospace, but i've just made a copy of autospace.tcl with the setpri lines edited out (attached)
> 
> I'll install it just to try later


Well I mounted and unmounted and deleted setpri from the Tivo /bin directory and removed the command from my rcsysinit.author.edit file and rebooted the Tivo but still the Autospace graphic no longer appears in my Now Playing screen. So your suggested change seems to have killed the ability of Autospace to run for good. 

Any suggestions?


----------



## benallenuk (Aug 1, 2005)

WOW, instant performance increase in menu's etc. Great find.


----------



## Pete77 (Aug 1, 2006)

I now have it all working fine. It was something about my other rc.sysinit.author.edit lines not ending with the same 2&1 Null stuff as the Autospace line that it seemed to object to when combined with the setpri line also existing in the file.

Autospace now loads and runs the graph as normal if I go to Now Playing and don't cursor up or down but if I cursor up or down then the graphic doesn't appear at the top of the Now Playing screen until a few seconds after I have stopped cursoring.

I am also getting much improved performance with the OzTivo TivoGuy Yahoo Widget desktop utility which is now getting the Now Playing data from the Tivo three or four seconds faster but without causing any pixellation during recordings. Strange really as I had hoped it might stop the recording pixellation problem but had thought this would be because it would take longer to get the data due to the request being given lower priority by the Tivo system.

It also appears to have cured my problem with the Tivo sporadically spontaneously rebooting when using several TivoWeb applications that place a heavy load on the Tivo processor like Highlights and Tracker in succession. Or at least so far when I have tried repeatedly using these I haven't eventually made Tivo reboot as would normally be the case previously.

Here is my current rc.sysinit.author.edit file (the edit suffix being due to it being modified by Sanderton's Startup Editor utility for TivoWeb).



> /var/hack/setpri fifo 1 >/dev/null 2>&1 &
> /var/hack/tivoweb-tcl/tivoweb >/dev/null 2>&1 &
> /var/hack/endpad.tcl -s 1 -e 4 -sugqual 0 -sugeq -auto >/dev/null 2>&1 &
> /var/hack/setrgb.sh >/dev/null 2>&1 &
> /var/hack/autospace.tcl start >/dev/null 2>&1 &


Or should I have $$ after fifo 1? I think the/dev/null 2>&1 & business probably takes the place of that doesn't it though?

Also there's no need to put setpri in /bin and so having to mount and unmount and all that stuff to do it. It works just as well from /var/hack where most non TivoWeb hacks normally go on most Tivos.


----------



## BobBlueUK (Jan 4, 2002)

Thanks for this tip, have just put it on my TiVo and had an instant improvement in general menu & TiVoWeb responsiveness.

May even help prevent the occasional reboots I experience with all the hacks running...


----------



## Pete77 (Aug 1, 2006)

BobBlueUK said:


> Thanks for this tip, have just put it on my TiVo and had an instant improvement in general menu & TiVoWeb responsiveness.
> 
> May even help prevent the occasional reboots I experience with all the hacks running...


I only get the Tivo reboots when using several demanding TivoWeb modules like Highlights, Tracker and especially Backup (which usually always kicks the reboot if run after Highlights or Tracker) in succession but the box can run for weeks at a time without rebooting if just left running using the normal Tivo box menus. I changed TIVOSH_POOLSIZE in the tivoweb (no extension) file in the tivoweb-tcl directory to a 3244068 value a while ago as suggested by others but it didn't totally cure the problem, although it may have reduced it happening a little.

Following the use of the setpri command in my rc.sysinit file it did seem to be even harder to get the box to reboot by making demanding use of TivoWeb but after a bit of heavy duty trying I still persuaded it to. Next on the list is to replace the Tivo power supply with a new one as others have suggested this may be the cause but I am still rather sceptical this will do any good as the box never reboots when TivoWeb is not being used. I actually suspect that some of these TivoWeb apps cause a numeric overflow in a register somewhere in some circumstances and I believe the Linux response to this overflow condition is to reboot the box? Also the fact that I have nearly 600 items in Now Playing means I am causing problems that the designers of some of the TivoWeb modules probably never anticipated facing when they created them?


----------



## CarlWalters (Oct 17, 2001)

I think I'm running this - it's in my rc.sysinit.author and I've rebooted (from the telnet prompt - but is there a way I can check? I tried ps ax but can't see a process called setpri anywhere - should I see it?


----------



## john1980 (Jun 17, 2004)

Pete77 said:


> /var/hack/setpri fifo 1 >/dev/null 2>&1 &
> /var/hack/tivoweb-tcl/tivoweb >/dev/null 2>&1 &


Wow... people do still run TivoWeb v1.9.4... if you wish to try something a "little better" you may wish to have a look at TivoWebPlus v1.3.1 (it even has setpri bundled with it).

Speaking of setpri... you may also wish to experiment by switch the "fifo 1" parameters with "ts 0" (this will switch it from first in, to time sliced) as it should make things respond even faster - particularly if you run a few hacks.

Oh, and the above setpri command is unlikely to do anything... it should read:
/var/hack/setpri fifo 1 $$
_or_
/var/hack/setpri ts 0 $$


----------



## RichardJH (Oct 7, 2002)

Just upgraded to latest version of TWP but get this error from info module. Any ideas



> action_info '/' ''
> df: cannot read table of mounted filesystems: No such file or directory
> while executing
> "exec df -h -T"
> ...


----------



## Pete77 (Aug 1, 2006)

john1980 said:


> Wow... people do still run TivoWeb v1.9.4... if you wish to try something *"a little better"* you may wish to have a look at TivoWebPlus v1.3.1 (it even has setpri bundled with it).


Dear John,

Much though I appreciate that you are obviously bound to be an ardent promoter of the virtues of TivoWebPlus 1.3.1 and much though it may be better than TivoWeb 1.9.4 with later S2 and S3 Tivo machines with their dual tuners I just can't agree with you that it is the better choice for the Thomson PVR10UK S1 Tivo.

I ran TivoWebPlus 1.3.1 on my machine for around a month in November this year and during this time I experienced a very nasty hang of the Tivo box stuck between two Tivo menus and another one where it just stopped responding permanently to all remote input. This simply didn't ever happen with TivoWeb 1.9.4. Also crucially I have a very large Now Playing list of around 600 items and I also run the OzTivo Yahoo Desktop Widget and I found OzTivo took around 47 seconds to obtain the Now Playing list using TivoWebPlus 1.3.1 but only 31 seconds in conjunction with TivoWeb 1.9.4. And also during this extraction process of Now Playing data by OzTivo pixellation is sometimes caused on recording programs and was therefore worse when running TivoWebPlus 1.3.1 in conjunction with the OzTivo Yahoo Widget.

Also at present Ljay's module add on for User Interface/Preferences to be able to edit thumbs ratings for series will not work under TWP1.3.1 and nor will Ljay's modification of the httpd log file to record external access attempts to TivoWeb over the internet. I PM'ed Ljay to ask him if he intended to support these for TWP 1.3.1 but unfortunately he didn't reply.

So for all those reasons out of choice and not ignorance I have gone back to TW 1.9.4 as I find that all TWP 1.3.1 functionality can be replicated in TW 1.9.4 more reliably apart from the Channel Preferences module which is only a very minor additional convenience of TWP 1.3.1. Also as I say the Edit Thumbs and httpd log for external web access facilities for TW 1.9.4 designed by Ljay do not work with TivoWeb.

Coming back to TivoWeb john I also wonder if you can shed any light on why the add on module to play items in Now Playing from TivoWeb listed near the bottom of the http://tivo.lightn.org/ page (http://tivo.lightn.org/now_playing.tgz) doesn't actually seem to work with the UK Thomson Tivo PVR10UK? Also are you planning to ever add such functionality to be able to play Now Playing items to TivoWebPlus at some point?



> Speaking of setpri... you may also wish to experiment by switch the "fifo 1" parameters with "ts 0" (this will switch it from first in, to time sliced) as it should make things respond even faster - particularly if you run a few hacks.
> 
> Oh, and the above setpri command is unlikely to do anything... it should read:
> /var/hack/setpri fifo 1 $$
> ...


Thanks for your suggestions on the ts switch and for pointing out my errors with missing off the $$ suffix.


----------



## Pete77 (Aug 1, 2006)

john1980 said:


> Speaking of setpri... you may also wish to experiment by switch the "fifo 1" parameters with "ts 0" (this will switch it from first in, to time sliced) as it should make things respond even faster - particularly if you run a few hacks.


I can now confirm that the setpri "ts 0" switch does appear to work better in speeding up Tivo menus than the "fifo 1" switch, especially with the Autospace bar graph display in Now Playing.

It also seems to mean significantly less pixellation when the Yahoo OzTivo Widget requests data from Tivoweb and a recording is taking place. No doubt this pixellation in turn results from my Now Playing list having over 600 items in it and my Season Pass/Wishlist list having over 150 items. Something that the designer of the OzTivo Widget may not have anticipated as being a likely possibility.


----------

