Eee Atom CPU control - testing

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#16 Post by Sit Heel Speak »

I don't have an eee, but am tinkering with a Mini-9 with N270 Atom. Found something yesterday, which may be of interest:

At http://cvs.fedora.redhat.com/viewvc/F-11/mingw32-gcc/

file: gcc-atom.patch

A patch to enable gcc to use -march=atom -mtune=atom

Written by a trio of Intel engineers in merrie olde Cathay.

There is a large hunk in the middle --maybe a thousand lines, text-search the patch on "i386.c" (in Geany) to find the beginning of the vast sea of green-- which will not apply cleanly to the gcc 4.4.1 source if you use the patch command. Perhaps because too big?

So I have applied this big hunk by hand-editing i386.c, in the gcc-4.4.1 source. Then, after deleting this large hunk from the patch, the rest of it applies cleanly to the rest of the gcc source.

Here is the gcc 4.4.1 i386.c, patched by hand, in case anyone with an Atom feels 90% as ambitious as yours truly. I plan to compile a kernel and OpenBox using the patched gcc, in the next few days, in my project to custom-fit the Mini-9 with a Puppy. If anyone comes up with meebo-less Skype for the Atom, please convey it to me.

mawebb88
Posts: 246
Joined: Sun 13 Jul 2008, 09:54
Location: France nr Lyon

Testing

#17 Post by mawebb88 »

01micko wrote:Ok, maybe we can snag some more testers with this little gui I knocked up such that you can change the status of your performance without going near the command line.
You will see the status in a splash screen about 5 seconds after clicking your choice. Start it from Menu>>System>>Eee Performance.

Warning: Only for eee pcs. Use at own risk. I have tested it but only on a Celeron, no unusual behaviour. If you Atom guys experience your cpu getting warm or something unusual in 'Top' shut down and uninstall the pet.

Cheers and many thanks tempestuous for your work with eee pcs.

Update: Version 0.1.1 shows a tool tip. eg:"Powersave should show a value of '770'". Only so we know what we are doing.

Of course you should familiarise yourself with the commands in the main post so you know what is happening.
Thanks for gui. It seems though not to work correctly for me on my eee901. Not sure exactly but it seems necessary to click another button to get the first one to change the green box value.

Rgds Mike

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#18 Post by tempestuous »

Well the question now becomes: do you want a manual CPU FSB control,
or do you want an automatic control, so that the CPU FSB goes into Powersave mode whenever the laptop is on batteries?

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#19 Post by tempestuous »

Now moving on to the fan.
I have already compiled the third-party "eee" kernel module for this purpose, and jakfish reports that it works OK, but it would probably be better to use the fan control functions of the new "eeepc-laptop" module now that Puppy 4.3 contains this module.

Some testing is needed -
normally the fan speed is controlled by bios. Running this command should set the fan control to manual -

Code: Select all

echo 1 > /sys/class/hwmon/hwmon0/pwm1_enable
To check success, run this command -

Code: Select all

cat /sys/class/hwmon/hwmon0/pwm1_enable
where the result should be "1" (manual control enabled)
but if the result is "0" then manual control is disabled, and the bios still has control.

Now that you're in manual mode, do this to set a fan speed -

Code: Select all

echo x > /sys/class/hwmon/hwmon0/pwm1
where x is a value between 0 (fan off) to 255 (full speed, 12V).

Of course, you need to keep an eye on temperature! I haven't been able to Google the exact information, but could users please look in /sys/class/hwmon/hwmon0 and you should see some file relating to temperature.
EDIT: I think it's "temp1_input". If true, you would do this to check temperature

Code: Select all

cat /sys/class/hwmon/hwmon0/temp1_input
EDIT: I was just advised by PM of the correct location of the fan/temp state files.
I have edited the information above.

mawebb88
Posts: 246
Joined: Sun 13 Jul 2008, 09:54
Location: France nr Lyon

My vote

#20 Post by mawebb88 »

tempestuous wrote:Well the question now becomes: do you want a manual CPU FSB control,
or do you want an automatic control, so that the CPU FSB goes into Powersave mode whenever the laptop is on batteries?
Automatic sounds good to me.

Rgds Mike

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

Re: My vote

#21 Post by 01micko »

mawebb88 wrote:
tempestuous wrote:Well the question now becomes: do you want a manual CPU FSB control,
or do you want an automatic control, so that the CPU FSB goes into Powersave mode whenever the laptop is on batteries?
Automatic sounds good to me.

Rgds Mike
Automatic with manual override :) . What if you want 'Performance'?
Puppy Linux Blog - contact me for access

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#22 Post by 01micko »

tempestuous wrote:Now moving on to the fan.
I have already compiled the third-party "eee" kernel module for this purpose, and jakfish reports that it works OK, but it would probably be better to use the fan control functions of the new "eeepc-laptop" module now that Puppy 4.3 contains this module.

Some testing is needed -
normally the fan speed is controlled by bios. Running this command should set the fan control to manual -

Code: Select all

echo 1 > /sys/class/hwmon/hwmon0/pwm1_enable
To check success, run this command -

Code: Select all

cat /sys/class/hwmon/hwmon0/pwm1_enable
where the result should be "1" (manual control enabled)
but if the result is "0" then manual control is disabled, and the bios still has control.

Now that you're in manual mode, do this to set a fan speed -

Code: Select all

echo x > /sys/class/hwmon/hwmon0/pwm1
where x is a value between 0 (fan off) to 255 (full speed, 12V).

Of course, you need to keep an eye on temperature! I haven't been able to Google the exact information, but could users please look in /sys/class/hwmon/hwmon0 and you should see some file relating to temperature.
EDIT: I think it's "temp1_input". If true, you would do this to check temperature

Code: Select all

cat /sys/class/hwmon/hwmon0/temp1_input
EDIT: I was just advised by PM of the correct location of the fan/temp state files.
I have edited the information above.
tempestuous,

Now, I understand 'jakfish' is using a Celeron... (from main post), so, I will test the appropriate commands and report.

mawebb88,

Perhaps I should have written in the 'tool tip' to wait 5 seconds. If you wait 5 seconds does it work?

Cheers
Puppy Linux Blog - contact me for access

mawebb88
Posts: 246
Joined: Sun 13 Jul 2008, 09:54
Location: France nr Lyon

Fan tests

#23 Post by mawebb88 »

tempestuous wrote:Now moving on to the fan.
I have already compiled the third-party "eee" kernel module for this purpose, and jakfish reports that it works OK, but it would probably be better to use the fan control functions of the new "eeepc-laptop" module now that Puppy 4.3 contains this module.

Some testing is needed -
normally the fan speed is controlled by bios. Running this command should set the fan control to manual -

Code: Select all

echo 1 > /sys/class/hwmon/hwmon0/pwm1_enable
To check success, run this command -

Code: Select all

cat /sys/class/hwmon/hwmon0/pwm1_enable
where the result should be "1" (manual control enabled)
but if the result is "0" then manual control is disabled, and the bios still has control.

Mike: I get 1

Now that you're in manual mode, do this to set a fan speed -

Code: Select all

echo x > /sys/class/hwmon/hwmon0/pwm1
where x is a value between 0 (fan off) to 255 (full speed, 12V).

Mike: echo 255 > /sys/class/hwmon/hwmon0/pwm1 works. I can hear the fan roar! Tried 0 and yes the fan stops. Tried intermediate values 100 and 150 and both give the corresponding fan roar.

Of course, you need to keep an eye on temperature! I haven't been able to Google the exact information, but could users please look in /sys/class/hwmon/hwmon0 and you should see some file relating to temperature.
EDIT: I think it's "temp1_input". If true, you would do this to check temperature

Code: Select all

cat /sys/class/hwmon/hwmon0/temp1_input
Mike: This returns "no such file or drectory" for me. ls

BTW /sys/class/hwmon/hwmon0 is a syslink to /sys/devices/virtual/hwmon/hwmon0/

In there is:

fan1_input
name
power (a directory)
pwm1
pwm1_enable
subsystem (a syslink)
uevent

I tried to Pfind temp1_input but it did not find any files




EDIT: I was just advised by PM of the correct location of the fan/temp state files.
I have edited the information above.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#24 Post by 01micko »

Hello tempestuous and all else.

The fan commands all work as expected for me on the 701sd. However, the temperature command does not work for me, I get the same result as Mike above.

I normally use conky/Pwidgets to monitor temperature but there is another command I found that returns the correct temperature.

Code: Select all

#cat /proc/acpi/thermal_zone/TZ00/temperature
You will get output in the form:

Code: Select all

temperature:              50 C
(um, no more gui building until this is complete!)

Cheers
Puppy Linux Blog - contact me for access

downsouth
Posts: 41
Joined: Wed 10 Aug 2005, 04:14
Location: S.E. Australia (from 1/1/10 to become 'ozsouth')

Tests eeepc

#25 Post by downsouth »

Sorry to be late - watching Geelong win again.
pup430-small 2.6.30.5 eeepc901 (atom 1.6):
changed mode from performance to normal; temp 51C using 01micko method; fan matching cpu mode automatically sounds good.
also changed fan to manual - speed 123 then 167 then 123 - could hear speed changes, but no temp change (51C).

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#26 Post by tempestuous »

Thanks for the results. For the eeepc-laptop module to read temperature it appears that the "lm-sensors" utilities might be needed ... or maybe the i2c-dev kernel module ... but it's getting too difficult.
Dougal's fan control script is based on the "eee" kernel module, so it makes sense to use that module, even though it needs to be installed separately.
I should have a package available shortly.

aarf

#27 Post by aarf »

Code: Select all

# cat /sys/class/hwmon/hwmon0/temp1_input
cat: /sys/class/hwmon/hwmon0/temp1_input: No such file or directory
# 
Attachments
no fans.jpg
(4.97 KiB) Downloaded 1580 times

User avatar
rhadon
Posts: 1292
Joined: Thu 27 Mar 2008, 11:05
Location: Germany

#28 Post by rhadon »

Hi,

with EeePc900 (Celeron, 900Mhz), frugal, booting from sd-card:

fan works as expected, temperature depending from fan speed during test 49C -56C.

No luck with cpu speed.
Everytime the answer is 512, no matter the question was :) (sorry meaning no matter I use 0, 1 or 2 from console or the GUI from 01micko. If I use GUI and choose "Normal", cursor freezes, can't kill X and must poweroff.

Although the thread is titled "Eee Atom CPU control - testing" I hope this is of interest.

~ Rolf
Edit: For displaying temperature I use the command from 01micko

Code: Select all

cat /proc/acpi/thermal_zone/TZ00/temperature
Ich verwende "frugal", und das ist gut so. :wink:
Raspberry Pi without Puppy? No, thanks.

aarf

#29 Post by aarf »

Code: Select all

# cat /proc/acpi/thermal_zone/TZ00/temperature
temperature:             57 C
# 

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#30 Post by tempestuous »

Here is a rough gtkdialog gui for CPU/fan control. I intend that it will be launched by the Fn+F6 hotkey combination.
For testing purposes you can launch it from the terminal -

Code: Select all

eeecontrol
Don't try the fan control button. It's not finished.

I'm not good at bash and gtkdialog. The gui correctly displays the CPU mode when launched, but I don't know how to refresh the gui when the mode is changed. It would be great if someone could refine the script - /usr/bin/eeecontrol
Attachments
eee-atom-1.jpg
(17.87 KiB) Downloaded 1497 times
eeecontrol-test01.pet
(987 Bytes) Downloaded 458 times

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#31 Post by tempestuous »

Better still, the CPU settings should be with radiobuttons.
But I don't know how to script the backend for this.
Attachments
eee-atom-2.jpg
(16.2 KiB) Downloaded 1063 times

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#32 Post by 01micko »

Hi tempestuous

Nice gui. (ATM I am the only download and I did that before work around 5.30am this morning)

I'll take a look. 'zigbert' is my tutor so all should be how you want it to look.

Cheers

[Side note: I compiled the driver for the rtl8187se for k2.6.30.5 and posted (with appropriate warnings) in this ("Users (For the regulars)") forum. Just want to make sure it looks fine to you. For me, almost 24 hrs running on my 701sd and no dropouts.]
Puppy Linux Blog - contact me for access

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#33 Post by 01micko »

Well I had a crack at an improved gui. It works.

I replaced the 3 scripts (calling the fsb changes) with a functions script ala zigbert and added a calling script. That is necessary (for me) to refresh the gui with the new status.

The fan scripts are included and the call to them is from the functions script too. There is a delay while the gui refreshes (caused by the system changes) so I added a splash screen informing the user.

The dotpet retains the original pinstall.sh script

Here it is...

NOTE: for testing.

Cheers
Attachments
eee-gui.jpg
(21.04 KiB) Downloaded 982 times
eee-test-Atom-CPU.pet
(11.62 KiB) Downloaded 421 times
Puppy Linux Blog - contact me for access

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#34 Post by tempestuous »

Hey that's great that you made a gui. Before I intgrate it into the Eee hotkeys package, just a note -
with radiobuttons, the "Current Mode of Atom CPU: xxx" text becomes redundant, because the radiobuttons not only allow you to change mode, they're also an indicator of the current mode.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#35 Post by 01micko »

tempestuous wrote:Hey that's great that you made a gui. Before I intgrate it into the Eee hotkeys package, just a note -
with radiobuttons, the "Current Mode of Atom CPU: xxx" text becomes redundant, because the radiobuttons not only allow you to change mode, they're also an indicator of the current mode.
No problem. Will do it this evening. Only thing, when the gui is started the radio button at the top is checked by default, so when you start there is no indication of what mode you used last. Do you think there is a need for a "current mode" button?

Cheers
Puppy Linux Blog - contact me for access

Post Reply