Would it be possible to force cpu scaling below usual limits in Linux ?

The Linuxator

Banned
Jun 13, 2005
3,121
1
0
/sys/devices/system/cpu/cpu0/cpufreq is the location of files that determine the aspects of my cpu's operation, here is a pic of the file : pic
Would it be possible for me to force the pentium M dothan on my R50e Thinkpad to do a 400 Mhz by changing the value of scalin_min_freq from 600000 to 400000 ?

Using a command like :
echo -n 400000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

when I do it I go back to the file scaling_min_freq is unaffected, however any value from 600000 and above does make a change, so I figured there could be some file that has 600000 in it that is forcing a minimum limit on the scaling , so I tried changing scaling_available_frequencies from :

1600000 1400000 1200000 1000000 800000 600000

into :

1600000 1400000 1200000 1000000 800000 400000

it gives me a permession denied.

What's above is just some tinkering nothing more , but should I go on with my attempts or is there something in the motherboard as I initially guesses that is preventing me from doing what I am tring to do ?
All I am trying to do is make my cpu clock at 400 MHZ like it does in the T-series when Idle.

I am trying to do a forced multiplier of 4 , is there anyway this can be possible.
 

The Linuxator

Banned
Jun 13, 2005
3,121
1
0
root, and the permession of the file is not the issue here since I am able to change values, but as long as they are between 600000 and 1600000.
 

The Linuxator

Banned
Jun 13, 2005
3,121
1
0
ok I got around the permession issue apparenly I have forgotten one check box for the Write permession, but still, I am not getting a permession denied but the values are not changing below the limit.

There must be something that is causing the limit to be 600000 could it be anyhting other than hardware ?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
You could possibly do it... but it may take some futzing around with the kernel to do it. I noticed that when they first did cpu scaling with /sys on my computer (previous laptop, now sold) I could get the cpu down to 200mhz (from 2000mhz), but with later kernels It was more restrictive.

My guess is that they did this to match the manufacturer's specs to prevent instability or damage.

Remember the files in /sys aren't like normal files, they are ways to provide information to and from the kernel itself. So some files are ment for interacting and other files are just ment for information.

The only thing I can think of is to try messing with other files, and try logging into a console as root instead of using sudo or su. I think there is a slight difference in some stuff that that can cause, not that I know for a fact or understand why.

Otherwise you'll have to look at the kernel and some kernel code itself, I'd bet. Maybe there is a bios setting somewere (doubtfull).

Maybe it is in the hardware... Intel restricts Celeron-m scaling vs Pentium-m scaling..
 

The Linuxator

Banned
Jun 13, 2005
3,121
1
0
Originally posted by: drag
You could possibly do it... but it may take some futzing around with the kernel to do it. I noticed that when they first did cpu scaling with /sys on my computer (previous laptop, now sold) I could get the cpu down to 200mhz (from 2000mhz), but with later kernels It was more restrictive.

My guess is that they did this to match the manufacturer's specs to prevent instability or damage.

Remember the files in /sys aren't like normal files, they are ways to provide information to and from the kernel itself. So some files are ment for interacting and other files are just ment for information.

The only thing I can think of is to try messing with other files, and try logging into a console as root instead of using sudo or su. I think there is a slight difference in some stuff that that can cause, not that I know for a fact or understand why.

Otherwise you'll have to look at the kernel and some kernel code itself, I'd bet. Maybe there is a bios setting somewere (doubtfull).

Maybe it is in the hardware... Intel restricts Celeron-m scaling vs Pentium-m scaling..


Well the reason why I am trying to get it reach 400 mhz (400000) is because I know that the same CPU in a Tseries IBM thinkpad, idles at 400 Mhz, but my guess is that IBM has the motherboard's multilplier settings from 6 till 16, increment of one for my R50e while it's a 4 till 16 on a T series Thinkpad, but my question is that if such thing exists the way I am descring would it be impossible to override via software, I know that when it comes to BIOSs some featrues are overridable and some simply aren't. But the subject s still open to speculation.

So I have the 2.6.14-1.1637 how can I modify it so I can manipulate these /sys files ? Or is it just too complicated and not worthwhile ?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
No clue. I am not expert enough in anything to give a worthwhile answer.

Although I bet you can try at http://acpi.sourceforge.net and search and ask on their mailing lists about it. Those people would probably know much more about it then anybody here.

I am kinda curious about it myself.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
I figured it was more of a hardware thing than software. I can only get my processor down to 91mhz. :(
 

The Linuxator

Banned
Jun 13, 2005
3,121
1
0
Originally posted by: n0cmonkey
I figured it was more of a hardware thing than software. I can only get my processor down to 91mhz. :(


WOOT :Q are we talking about a fairly modern processsor , and what is your cpu and how did you manage to get it that low ?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: The Linuxator
Originally posted by: n0cmonkey
I figured it was more of a hardware thing than software. I can only get my processor down to 91mhz. :(


WOOT :Q are we talking about a fairly modern processsor , and what is your cpu and how did you manage to get it that low ?

I was being kinda silly. :p It's in my Zaurus, which only starts with a 416mhz Xscale processor. Apparently I can drop it to 208mhz and 91mhz now, although I don't know how much battery that will really save me. The wireless card I use with it probably eats more battery than the rest of the unit. ;)
 

The Linuxator

Banned
Jun 13, 2005
3,121
1
0
Originally posted by: n0cmonkey
Originally posted by: The Linuxator
Originally posted by: n0cmonkey
I figured it was more of a hardware thing than software. I can only get my processor down to 91mhz. :(


WOOT :Q are we talking about a fairly modern processsor , and what is your cpu and how did you manage to get it that low ?

I was being kinda silly. :p It's in my Zaurus, which only starts with a 416mhz Xscale processor. Apparently I can drop it to 208mhz and 91mhz now, although I don't know how much battery that will really save me. The wireless card I use with it probably eats more battery than the rest of the unit. ;)


I have never seen a zaurus before !! I didn't know that Sharp made a Linux PDA-like unit. That's intresting, are you running Linux on it or open-bsd ? That's a nice machine there :thumbsup:, how much did it cost you $ 200 + ?

Does that Zaurus of your's have a touch screen ? If so that thing would make a nice car PC / Media player , damn it n0cmonkey
I thought I was done with my Linux car PC ventures and now you have got me started all over again :D
With a touch screen and Mplayer installed in there (for Mp3s and videos) that thing would a perfect car pc / entertainment system.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
The model I have (and the ones above and below it, hell all the clam shell ones I think) is only released in Japan. So I had to order it from a company that imported it from across the ocean. :Q

Originally posted by: The Linuxator
I have never seen a zaurus before !! I didn't know that Sharp made a Linux PDA-like unit. That's intresting, are you running Linux on it or open-bsd ? That's a nice machine there :thumbsup:, how much did it cost you $ 200 + ?

I'm running OpenBSD. Linux is still on there (dualboot, Linux on the flash acting as a bootloader :)shocked: ) for OpenBSD and OpenBSD on the hard drive), and I mess around with it occassionally, but my interests lie in OpenBSD. ;)

It cost > $800USD. :( The newer version was ~$900USD last I checked. It's black, so it's cooler.

Does that Zaurus of your's have a touch screen?

Yep, even works in OpenBSD. :D

If so that thing would make a nice car PC / Media player , damn it n0cmonkey I thought I was done with my Linux car PC ventures and now you have got me started all over again :D
With a touch screen and Mplayer installed in there (for Mp3s and videos) that thing would a perfect car pc / entertainment system.

I've been thinking similar things lately, although a Mac mini would be cheaper (and it's already been done ;)). But this would make a kickass remote. :evil:

I don't know if MPlayer would work on it. The XScale is kind of a SoC (System on Chip), and doesn't include a hardware floating point unit (or it's REALLY weak, can't remember off hand). So for media you kind of have to find players that use integer decoders instead of floating point. There are some mp3 players available and working, but I haven't looked into video yet.
 

The Linuxator

Banned
Jun 13, 2005
3,121
1
0
Hey n0cmonkey I have asked this before on a post but no nody seemed to have the right answer for sure,can you show me how to make certain scripts and /or terminal commands execute automatically (as if I am executing them as root) upon bootup ?

I have about 5-6 commands that I would like to be executed for me on bootup everytime like :

echo -n 140 > /sys/devices/platform/i8042/serio0/speed
echo -n 1 > /sys/devices/platform/i8042/serio0/press_to_select


My guess they are to be placed in a file and given permession to execute but what should I do to it inorder to get it to execute at bootup no matter what user logs in ?



 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Put something like the following, in /etc/init.d. Then use the command: ln -s /etc/init.d/Linuxators_script.sh /etc/rc5.d/S99/Linuxators_script.sh. That should create a symlink, and run the script on boot.

The script should probably look something like (I don't think it has to have too much intelligence...):

 

The Linuxator

Banned
Jun 13, 2005
3,121
1
0
Well I created a file trackpoint_script.sh that has the code you gave to me , I copied it into /etc/init.d
then went to root terminal and typed it and this is what happened :

ln -s /etc/init.d/trackpoint_script.sh /etc/rc5.d/S99/trackpoint_script.sh
ln: creating symbolic link `/etc/rc5.d/S99/trackpoint_script.sh' to `/etc/init.d/trackpoint_script.sh': No such file or directory


I don't know what I did wrong here ?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: The Linuxator
Well I created a file trackpoint_script.sh that has the code you gave to me , I copied it into /etc/init.d
then went to root terminal and typed it and this is what happened :

ln -s /etc/init.d/trackpoint_script.sh /etc/rc5.d/S99/trackpoint_script.sh
ln: creating symbolic link `/etc/rc5.d/S99/trackpoint_script.sh' to `/etc/init.d/trackpoint_script.sh': No such file or directory


I don't know what I did wrong here ?

It looks like you flipped the files. Try:
ln -s /etc/rc5.d/S99/trackpoint_script.sh /etc/init.d/trackpoint_script.sh
 

The Linuxator

Banned
Jun 13, 2005
3,121
1
0
Originally posted by: n0cmonkey
Originally posted by: The Linuxator
Well I created a file trackpoint_script.sh that has the code you gave to me , I copied it into /etc/init.d
then went to root terminal and typed it and this is what happened :

ln -s /etc/init.d/trackpoint_script.sh /etc/rc5.d/S99/trackpoint_script.sh
ln: creating symbolic link `/etc/rc5.d/S99/trackpoint_script.sh' to `/etc/init.d/trackpoint_script.sh': No such file or directory


I don't know what I did wrong here ?

It looks like you flipped the files. Try:
ln -s /etc/rc5.d/S99/trackpoint_script.sh /etc/init.d/trackpoint_script.sh


OK I did that , didn't get any errors and I am off to reboot and see if it works ,
<Terminator Voice> I'll be BAACK</Terminator Voice>
 

The Linuxator

Banned
Jun 13, 2005
3,121
1
0
Originally posted by: n0cmonkey
I forgot to mention, you might have to make the script executable... :eek:
Oh don't worry about that , it was the first thing I did when I first made the file.
But I have rebooted and the script doesn't look like it executed, but I know have two files in etc/init.d one is trackpoint_script and the other is trackpoint_script.sh , the 1st file is the one I have placed in there and the other was generated after the execution it's contents are :
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Ok, I messed up earlier. You did get them the right way around, but I added an extra directory and it screwed you up. It should be ln -s REAL_FILE SYMLINK, or ln -s /etc/init.d/trackpoint_script.sh /etc/rc5.d/S99trackpoint_script.sh .

The S99 is part of the filename. The S tells init to run the script on startup, and the 99 puts it at the end of the startup files. The file I posted should be the contents of the /etc/init.d/trackpoint_script.sh file. If you ls -l the /etc/rc5.d/S99trackpoint_script.sh file the end should look something like: S99trackpoint_script.sh -> /etc/init.d/trackpoint_script.sh.
 

The Linuxator

Banned
Jun 13, 2005
3,121
1
0
OK I typed in the terminal :

ln -s /etc/init.d/trackpoint_script.sh /etc/rc5.d/S99trackpoint_script.sh

and I deleted the file track_point.sh that occured due to the wrong command, and now I only have my orginal file which is the trrackpoin_script in /etc/init.d now I am off to reboot.