Saturday, March 28, 2009

Eee PCs and Brute Force Overclocking

Today I decided to really dig into the output of i2cdump and see just what I could get my Eee PC 1000HD to do. For those that don't know what's in it, it contains a Celeron ULV processor at 900MHz, 1GB of memory, and a 120GB hard drive. I am testing with a nearly fresh restore of Windows XP from the Eee PC restore media, and Ubuntu 8.10 running Eee PC ACPI Utilities version 1.0.24, and the force-hpet kernel option.

Before trying this at home, be warned that it could damage your Eee and invalidate your warranty. By continuing to read, you agree that I'm not responsible (heh).

I began by dumping the contents of memory space 0x69 with i2cdump:

'i2cdump -y 0 0x69 s'

0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 45 f1 a8 f2 f4 00 00 11 1f 1e 00 0f 1e fe 2f 8f E????..???.???/?
10: 68 00 30 05 0a 01 1e 00 68 13 56 04 08 c8 0d h.0????.h?V????
(bolded since I can't get blogger to do 'code', 'fixed font' or 'pre'; if you get an error, load the i2c-dev kernel module)

If you look at registers 0x0B and 0x0C you will see that they are 15 30 in hex. My PLL registers as '30 15 1' when using the asus_eee kernel module.

Using i2cset I was able to brute force my FSB and PCIe multipliers in different directions, I stepped through each in both directions to see how far I could get them to go before hanging the computer. Before jumping into i2cset, I used i2cget to ensure I was going to write to the correct register.
'i2cget -y 0 0x69 0x0C w'
0x1e1f

'i2cget -y 0 0x69 0x0B w'
0x0f1f

Note the 1f at the end of the line, it is required that you add it when writing. No matter what register you read, it will always end with '1f'.
'i2cset -y 0 0x69 0x0C 0x1e1f w'
Value 0x1e1f written, readback matched

'i2cset -y 0 0x69 0x0B 0x0f1f w'
Value 0x0f1f written, readback matched

Once I had a good understanding of the boundries, I set out to find the ideal overclock combination, running geekbench after each test. Once I had completed testing I also ran each setting against powersave to see how much additional power would be consumed. I didn't record the watts, only battery time left. Just for kicks, I rebooted into my XP partition and executed the same test. In addition I tested XP in each mode for expected battery life. I did no additional tweaking to XP outside of the Eee PC Restore and setting "hybrid" modes. In even nearly every test, the Ubuntu Geekbench score was higher than XP. Notice though when the multiplier in Linux is set higher, the score dropped!

See the results below:
OS Clock Geekbench GlxGears Temp PF OD PS
Ubuntu 8.10 30/14 839 649 FPS 60 C



30/15 791 656 FPS 59 C 3.0 H 3.6 H 3.6 H

30/16 739 572 FPS 60 C



31/14 877 715 FPS 63 C 3.0 H 3.5 H 3.5 H

33/15 869 711 FPS 60 C


Windows XP Super HP 748 N/A N/A 2.5 H


HP 697 N/A N/A
2.43 H

PowerSave 488 N/A N/A

3.22 H


While stock is 30/15, the best bang for the buck is clearly 31/14.

Here is a link to the Spreadsheet - [ LINK ]

For those of you wishing to learn about how to overclock their Linux Eee, or those who are running on a PLL that is currently unsupported, maybe this can help you. In the future, I may release a force-clock tool as a part of Eee PC ACPI Utilities. Today for Eee PCs supported by asus_eee kernel module, and running EeePC ACPI Utilities; you can overclock your Eee by editing the OVERRIDE_FSB and OVERRIDE_MULTIPLIER options in /etc/default/eeepc-acpi and then disconnecting and reconnecting your power cable.

*UPDATE* When overclocked I discovered that the Eee PC wouldn't suspend. Version 1.0.25 (Available for testing: LINK ) re-works the CPU module, init script, and power management script to enable changing the FSB back to factory default before suspending so suspend now works when overclocked! No worries though, when you power back on it will restore your previous setting!

*UPDATE* I found more information on why I seem to be getting better performance from a PCIe underclock!

"At boot, both Asus and Abit manipulate the PCI Express frequency and set ratios that result in a lower PCIe frequency than would be expected at a given clock frequency. Since PCIe frequency and CPU clock frequency are derived from the same PLL, then a Clock frequency of 258 (FSB of 1032), for example, would result in a PCIe frequency of 129. In fact, the Abit PCIe clock at 258 is 118, below the maximum of 120 for most nVidia PCIe cards." [ LINK ]

Why run EeePC ACPI Utilities on your Eee PC?

I've been answering a lot of questions this week about battery life on the Eee. One reason to consider using EeePC ACPI Utilities to manage ACPI on your Eee PC is that one of my goals is to squeeze as much battery life as possible from your Eee, while keeping your performance mode running as normal.

To do that, I spent a significant amount of time testing various kernel parameters and CPU states. Once I had data, I set out to build sufficient function into EeePC ACPI Utilities version 1.0.23.

As a result, with a Celeron ULV processor at 900MHZ it's possible to squeeze up to 4 hours of battery life out of a 4 Cell battery.

- Powertop with WIFI, Bluetooth, Touchpad disabled, in 'ondemand' mode:


- Powertop with WIFI, Bluetooth, Touchpad disabled, in 'performance' mode:


- Powertop with everything on in 'performance' mode:


Starting with the most recent versions of EeePC ACPI Utilities, I added a script execution feature to CPU states. This enables the tool to change kernel parameters as power to the Eee is added or removed.

You'll see a nice gain in performance and battery life by putting temp spaces in ramdisks. This can be done by editing fstab and adding the following lines:

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0

I recommend shutting down sysklogd, and flushing the contents of these directories and then running "mount -a" to mount them.

sudo /etc/init.d/sysklogd stop
sudo rm -rf /tmp/*
sudo rm -rf /var/log/*
sudo rm -rf /var/tmp/*
sudo mount -a
sudo /etc/init.d/sysklogd start

One last thing, be sure to add "force-hpet" to defoptions in /boot/grub/menu.lst and then run sudo update-grub.

I'm always looking for new ways to improve these tools while meeting my basic requirements of being light weight and fast. If you would like something added, let me know!

What kind of battery life are you getting from your Eee? Disconnect all USB devices, Open a terminal and type 'sudo powertop' (don't press enter yet), Disable WIFI, Bluetooth, Camera, and Touchpad. Pull your ethernet connection, and your power connection then press enter in your terminal. Wait a little while (minimum 20 seconds), what sort of battery life do you get with Eee PC ACPI? Please let me know the details of your machine in the comments like 1000HE / Atom / Hard drive or SSD / type of battery, etc.

Wednesday, March 18, 2009

Need your help - gathering Eee PC Model support data for Eeebuntu team

Folks, thank you all for using Eee PC ACPI Utilities. The folks over at Eeebuntu.org have recently asked me which models were fully supported, and quite frankly I don't really have a good answer other than it's downloaded an average of 30 times per day.

If you wouldn't mind, please post a comment in this thread, or bounce over to one of the Eee forums [ EeeUser ] [ EeeBuntu ]. Feel free to post anonymously, all we need is your model and how well it is working (100%, 75%, etc). Oh and if you have had any challenges or if something doesn't work within the context of these tools that information would help me correct it.

Saturday, March 7, 2009

Chizzle updated, lots of changes

Today I have released a new version of Chizzle the internet chat server for *nix. This version fixes a lot of old issues including a few race conditions, and output glitches. In addition, it adds a user editor for sysops to edit their user database. This can also be added as an external menu item for editing within the chat room interface.

I have also created a project on sourceforge for Chizzle [ LINK ] and I've put together a deb installer which will perform the complete installation for you. The package is called "chizzle" and it's hosted in the statux.org repository.

Be sure to [ apt-get install chizzle ]!

Friday, March 6, 2009

Tether your Verizon Blackberry over Bluetooth

I see a lot of posts online requesting help tethering their blackberries, especially the newer models. I have solved this problem, and I use my blackberry often when on business travel. As the first step before you tether, make sure that your cell plan includes the tethering option.

Once verified, pair the phone with your desktop and then edit the following files:

Note: You can use 'hcitool scan' after making your phone discoverable to get the phones MAC address.

/etc/bluetooth/rfcomm.conf - This is the virtual bluetooth modem interface configuration file.

Code:
rfcomm0 {
# Automatically bind the device at startup
bind yes;

# Bluetooth address of the device
device YOURPHONEMACADDR

# RFCOMM channel for the connection
channel 3;

# Description of the connection
comment "Blackberry";
}

For a Verizon phone, you'll want to configure chat, disconnect, then the pppd configuration file:


/etc/chatscripts/gprs-connect-chat - This is the modem dial script.

Code:
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO DIALTONE"
ABORT "NO CARRIER"
'' +++AT
'' ATZ
OK AT&F
OK ATE0V1
OK AT
OK ATS0=0
OK ATDT#777
CONNECT

/etc/chatscripts/gprs-disconnect-chat - This is the disconnect script (note, it doesn't always work, if not just turn bluetooth off and on to disconnect)

Code:
HANGUP ON
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO DIALTONE"
ABORT "NO CARRIER"

'' +++AT
OK ATH0

/etc/ppp/peers/gprs - This is the pppd configuration file to dial out through the blackberry. It uses the other files above.

Code:
lcp-echo-failure 0
lcp-echo-interval 0

#nodetach
#debug debug debug

show-password
connect "/usr/sbin/chat -f /etc/chatscripts/gprs-connect-chat"
disconnect "ifconfig ppp0 down; /usr/sbin/chat -f /etc/chatscripts/gprs-disconnect-chat"
/dev/rfcomm0
115200
crtscts
local
:10.0.0.1
noipdefault
ipcp-accept-local
defaultroute
usepeerdns
novj
nobsdcomp
novjccomp
nopcomp
noaccomp
noauth
user ""

Last, create a desktop or menu icon, I downloaded and use a generic blackberry image that I found in an images search. Make the command syntax look like the following:

Code:
xterm -T "Verizon GPRS Bluetooth Connect" -e "gksudo pppd call gprs"

When you click, it will ask your sudo password then dial. Firefox users may notice that even when dialed it claims they are offline, just click File -> Work Offline to clear the checkbox and Firefox should function normally.