Aye, Aye Raspberry Pi

Here you can discuss things that are not directly related to running or using XBMC4XBOX.
Post Reply
User avatar
Xphazer
Posts: 524
Joined: Wed Jul 04, 2012 4:39 am
Location: Montréal
Has thanked: 240 times
Been thanked: 106 times

Re: Aye, Aye Raspberry Pi

Post by Xphazer »

Oh nice stuff xbs, i will definetly lower my turbo threshold. :)
Thanks!
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: Aye, Aye Raspberry Pi

Post by LudviG »

I thought that much to remove the #, but i actually was afraid to ask that directly. Stupid, i know :P

At least i got the codecs correct :)

XBS: I did read the post u linked to on RPi forum, but since i am a noob i need to ask more.
I have the script in

Code: Select all
/storage/.config/autostart.sh


You need to make it exec

Code: Select all
#!/bin/sh
(sleep 20
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
)&


How to edit the autostart.sh file? I connected to my RPi using putty, but i suck at linux terminal.
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
xbs
Posts: 292
Joined: Thu Jul 05, 2012 3:22 pm
Location: Portugal
Has thanked: 29 times
Been thanked: 22 times

Re: Aye, Aye Raspberry Pi

Post by xbs »

1. Create the file using notepad or notepad++ (in windows)
2. Copy the file to the mentioned folder (In Windows: Network > OPENELEC > Configfiles)
3. SSH RPi and type

Code: Select all

chmod ugo+x /storage/.config/autostart.sh
4. Reboot the RPi
5. Check using

Code: Select all

cat /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
6. Enjoy OC @ 50% CPU load :)
Skins: SLik JX720 MS_Redux Mosaic
Utils: HeXEn
github.com/xbs08/
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: Aye, Aye Raspberry Pi

Post by LudviG »

I've seen several places where they ask me to go to the RPi via network-openelec. But this wont show here, just the media sharing stuff.

Am i doing something wrong?

Running the RPi and the laptop on the same router. Laptop connected via wireless. Running windows 7 Home Premium.

Image
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
xbs
Posts: 292
Joined: Thu Jul 05, 2012 3:22 pm
Location: Portugal
Has thanked: 29 times
Been thanked: 22 times

Re: Aye, Aye Raspberry Pi

Post by xbs »

On the nav bar try typing:
\\OPENELEC\Configfiles

You can also try WinSCP
Skins: SLik JX720 MS_Redux Mosaic
Utils: HeXEn
github.com/xbs08/
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: Aye, Aye Raspberry Pi

Post by LudviG »

xbs wrote:On the nav bar try typing:
\\OPENELEC\Configfiles

You can also try WinSCP
Thanks alot, that helped. To be honest i should have thought of that myself, feel like a total noob :P

Since i am at work and nowhere close to my server, i am looking forward to trying this at workweek end @ home :)

It seems like it could be a nice addon to my xbox to tackle the newer formats :) But my X-boxes will never be packed away :)
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: Aye, Aye Raspberry Pi

Post by LudviG »

xbs wrote:1. Create the file using notepad or notepad++ (in windows)
2. Copy the file to the mentioned folder (In Windows: Network > OPENELEC > Configfiles)
3. SSH RPi and type

Code: Select all

chmod ugo+x /storage/.config/autostart.sh
4. Reboot the RPi
5. Check using

Code: Select all

cat /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
6. Enjoy OC @ 50% CPU load :)
After the check-command, should something show in the terminal? I the CPU goes up to 100% when i run the command and then falls back to idle (94-96%)
But as long i have system information up, it hits 100% often i see.
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
xbs
Posts: 292
Joined: Thu Jul 05, 2012 3:22 pm
Location: Portugal
Has thanked: 29 times
Been thanked: 22 times

Re: Aye, Aye Raspberry Pi

Post by xbs »

It should show the value of the threshold, i.e. 50

You can try different values but I find 50 to be the most balanced.
At 50, normal (xvid/divx) SD content doesn't force the OC but most HD will and that's fine especially if it has DTS/AC3 audio.
It also seems to make the GUI faster/smoother.

You shoudn't read the CPU load in system info because the graphical bars updates will put the CPU load at 90%ish (another prof that the RPi is not a XBOX :)).
SSH and type

Code: Select all

top
that's the real value or in XBMC install the htop addon and type

Code: Select all

htop
You can also type

Code: Select all

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
Here's another script for you guys

Code: Select all

#!/bin/bash

echo -e "\n###############################################"
echo "#       RASPBERRY PI SYSTEM INFORMATIONS      #"
echo "###############################################"

echo -e "\nCPU current Frequency: `vcgencmd measure_clock arm`"
echo "CORE current Frequency: `vcgencmd measure_clock core`"
echo "CORE current Voltage: `vcgencmd measure_volts core`"
echo "CPU current Temperature: `vcgencmd measure_temp`"

echo -e "\nFirmware Version: `vcgencmd version`\n"

echo -e "Codecs Status:"
echo "`vcgencmd codec_enabled H264`"
echo "`vcgencmd codec_enabled MPG2`"
echo "`vcgencmd codec_enabled WVC1`"

echo
Name it sysinfo.sh and place it in /storage/.config/ (i.e. \\OPENELEC\Configfiles)
Run it by typing

Code: Select all

sh /storage/.config/sysinfo.sh
Last edited by xbs on Wed Dec 19, 2012 10:57 pm, edited 1 time in total.
Skins: SLik JX720 MS_Redux Mosaic
Utils: HeXEn
github.com/xbs08/
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: Aye, Aye Raspberry Pi

Post by LudviG »

xbs wrote:It should show the value of the threshold, i.e. 50
You can try different values but I find 50 to be the most balanced.
At 50, normal (xvid/divx) SD content doesn't force the OC but most HD will and that's fine especially if it has DTS/AC3 audio.
It also seems to make the GUI faster/smoother when navigating thru XBMC.
Ok, cause noting happens when i write that in the terminal. Will double chech the code in the file and run the other command again. No idea what that command does though :P
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: Aye, Aye Raspberry Pi

Post by LudviG »

Here is the autostart.sh:

Image

As you see when i run the check command it shows 95:

Image
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
xbs
Posts: 292
Joined: Thu Jul 05, 2012 3:22 pm
Location: Portugal
Has thanked: 29 times
Been thanked: 22 times

Re: Aye, Aye Raspberry Pi

Post by xbs »

Even if there's a problem in the code or the place where the file is or even the name of the file it should show the default value, i.e. 95

EDIT: Ah ok it show 95, that's the default value.

SSH

Code: Select all

cd /storage/.config/

Code: Select all

ls
Last edited by xbs on Wed Dec 19, 2012 11:12 pm, edited 1 time in total.
Skins: SLik JX720 MS_Redux Mosaic
Utils: HeXEn
github.com/xbs08/
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: Aye, Aye Raspberry Pi

Post by LudviG »

xbs wrote:Even if there's a problem in the code or the place where the file is or even the name of the file it should show the default value, i.e. 95

Ah ok it show 95, that's the default value.

Check the script code, path and name (make sure is not autostart.sh.txt)
Also make sure you made it executable by running chmod...
The file is a .sh file and path is: \\OPENELEC\Configfiles\autostart.sh

May it be the code then? Look at my last post and u see how it is in notepad+. Should the last line be at the end of the line above?

Thanks for the script :) Tried it now:

Image
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
xbs
Posts: 292
Joined: Thu Jul 05, 2012 3:22 pm
Location: Portugal
Has thanked: 29 times
Been thanked: 22 times

Re: Aye, Aye Raspberry Pi

Post by xbs »

Everything seems fine... try this:

Code: Select all

#!/bin/bash

(sleep 20

echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold

)&
chmod and reboot then check the threshold again.

btw there's some errors in the system info script that I'm not seeing here.
Skins: SLik JX720 MS_Redux Mosaic
Utils: HeXEn
github.com/xbs08/
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: Aye, Aye Raspberry Pi

Post by LudviG »

Here is the list:

Image
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: Aye, Aye Raspberry Pi

Post by LudviG »

xbs wrote:Everything seems fine... try this:

Code: Select all

#!/bin/bash

(sleep 20

echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold

)&
chmod and reboot then check the threshold again.

btw there's some errors in the system info script that I'm not seeing here.
Tried this. Threshold is still 95. BTW, should there come something after the chmod command? Nothing happens when i write it.

Could it be something wrong with the OC?

I noticed there where some errors, but guessed u knew of them.
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
xbs
Posts: 292
Joined: Thu Jul 05, 2012 3:22 pm
Location: Portugal
Has thanked: 29 times
Been thanked: 22 times

Re: Aye, Aye Raspberry Pi

Post by xbs »

Code: Select all

chmod ugo+x /storage/.config/autostart.sh
Nothing visible will happen but the autostart.sh will became executable.
On boot the file will be exec and the threshold set.

The OC seems fine, in the system info it shows current freq 900
Skins: SLik JX720 MS_Redux Mosaic
Utils: HeXEn
github.com/xbs08/
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: Aye, Aye Raspberry Pi

Post by LudviG »

Ok, tried everything u asked now, and still get the threshold of 95. Could there be something with the installation. Since i havent scanned any library or anything i could try a fresh install of openelec.
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
xbs
Posts: 292
Joined: Thu Jul 05, 2012 3:22 pm
Location: Portugal
Has thanked: 29 times
Been thanked: 22 times

Re: Aye, Aye Raspberry Pi

Post by xbs »

No, I don't believe it has anything to do with OE installation.

Try two more things:

Code: Select all

sh /storage/.config/autostart.sh
and

Code: Select all

cat /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
Skins: SLik JX720 MS_Redux Mosaic
Utils: HeXEn
github.com/xbs08/
User avatar
LudviG
Posts: 267
Joined: Sun Jul 15, 2012 10:05 pm
Location: Norway
Has thanked: 29 times
Been thanked: 13 times

Re: Aye, Aye Raspberry Pi

Post by LudviG »

Get error at the first comman:

Code: Select all

root ~ # sh /storage/.config/autostart.sh
/storage/.config/autostart.sh: line 2: $'\r': command not found
/storage/.config/autostart.sh: line 7: $'\r': command not found
'oot ~ # sleep: invalid number '20
/storage/.config/autostart.sh: line 4: $'\r': command not found
/storage/.config/autostart.sh: line 5: /sys/devices/system/cpu/cpufreq/ondemand/: No such file or directory
/storage/.config/autostart.sh: line 6: $'\r': command not found
Never argue with an idiot! First he brings you down to his level, then he beats you with experience.
User avatar
xbs
Posts: 292
Joined: Thu Jul 05, 2012 3:22 pm
Location: Portugal
Has thanked: 29 times
Been thanked: 22 times

Re: Aye, Aye Raspberry Pi

Post by xbs »

There's something wrong with the code.

Replace the autostart.sh with this one: https://dl.dropbox.com/u/16176679/autostart.sh

Save link as don't copy code.
Skins: SLik JX720 MS_Redux Mosaic
Utils: HeXEn
github.com/xbs08/
Post Reply