Why is my MacBook Pro 5,1 getting so hot under Linux?

I’m running ArchLinux for some time on my MacBook Pro, but since I’ve installed ArchLinux, my MacBook Pro keeps getting hotter than under Mac OS X. Today I’ve installed the proprietary driver from NVidia. And now? My MacBook Pro is almost as cool as running Mac OS X. Except if I’m doing a lot of stuff using OpenGL.

But why? I think it has to do with power management inside Nvidia driver. If you run nvidia-settings, there is an entry “Thermal Monitor”. You can see the current core temperature of your GPU. Now run glxgears and you will see, that the temperature is getting hotter and hotter. Another entry is called “PowerMizer”. There you’ll see the GPU and memory clock. If you’re still running glxgears, it will be at the highest level (on my system 500 MHz GPU, 792 MHz memory). Try stopping glxgears and wait a few seconds. The temperature is going down from about 80°C to 65°C in about 15 seconds, the GPU and memory speed is at the lowest level (169 MHz and 100 MHz). Less performance, less heat, less battery usage. Isn’t it nice?

I think Mac OS X is using the same technology. And the best: on my MacBook Pro the hottest section was on the left between keyboard and display. Now it’s a lot cooler, not as cool as running Mac OS X, but Mac OS X is using the Nvidia 9400M GPU, which isn’t available running Linux (maybe you’re able to use both GPUs if you boot using EFI? I don’t know).

If nvidia driver is able to change the frequency of GPU and memory, can I set it from “Maximum Performance” to “Maximum Powersave” or something like that? Sure. Nvidia driver is changing the frequency as needed. But if you want to have maximum battery life, you can set an option in xorg.conf.

You’re able to set three different modes:

mode=1 – Maximum performance
mode=2 – Balanced
mode=3 – Maximum power saving

You can also set different modes for running on battery and AC:

1
0x[Battery source strategy][AC source strategy]

This will set the mode to powersaving on battery and adaptive on AC:

1
"PowerMizerEnable=0x1; PerfLevelSrc=0x2233; PowerMizerDefault=0x3"

To set this mode, add the following line to your device section in xorg.conf:

1
Option “RegistryDwords” “PowerMizerEnable=0x1; PerfLevelSrc=0x2233; PowerMizerDefault=0x3"

If you want, you can enable another option entry in nvidia-settings for choosing the frequency by adding another line to the Screen section of your xorg.conf:

1
Option “Coolbits” “1″

More information:
nVidia PowerMizer powersaving in Linux
enable nVidia CoolBits (frequency tuner)
NVIDIA™ driver for X.org: performance and power saving hints

Fix “Missing a temporary folder” in WordPress 2.7

As I was writing my article about the installation process of Openfire, I’ve tried to upload a file but got an error message instead of my file :(

Because I wasn’t able to upload a file, I’ve done a quick google search and found this blog entry
.

The problem was easy to fix: the upload_tmp_dir is not set in php.ini.

After adding

1
php_admin_value upload_tmp_dir /var/www/domain/php/upload

to my Apache Vhost-configuration and doing a reload, everything worked as expected.

Thanks, Dwight Jack!

Install Openfire on Debian Lenny

If you’re looking for a good jabber/XMPP server with LDAP/Active Directory integration. Have a look at Openfire. It’s working really great and you can push contacts to your clients. No need for adding every employee of your company on your users client.

I’ve installed Openfire on Debian Lenny. Here is a short description, of what you have to do.

1. Enable non-free sources.list
You have to add the non-free repository to your /etc/apt/sources.list, because you have to install sun-java6-jre
(You can also use sun-java5-jre, but on my freshly installed Lenny, sun-java6-jre has less dependencies).

Here is my /etc/apt/sources.list:

1
2
3
4
5
#
# lenny
#
deb     http://ftp-stud.fht-esslingen.de/debian/     lenny main contrib non-free
deb-src http://ftp-stud.fht-esslingen.de/debian/     lenny main contrib non-free
1
2
3
4
5
#
#  Security updates
#
deb     http://security.debian.org/ lenny/updates  main contrib non-free
deb-src http://security.debian.org/ lenny/updates  main contrib non-free

After adding the non-free repository, run apt-get update.

2. Install SUN Java 6 JRE

1
apt-get install sun-java6-jre

3. Download latest version of Openfire as .deb
You can find more information about versions here.

1
wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3.6.3_all.deb

4. Install Openfire

1
dpkg -i openfire_3.6.3_all.deb

5. Fixing missing LSB information (not required)
During installation of the Openfire packet, update-rc.d is reporting, that LSB information is missing from init-script.
As I don’t like such warnings, I’ve created a patch for adding the LSB information.

Note: You need the ‘patch’ program installed (apt-get install patch).

1
patch -p0 < openfire_3.6.3_fix_missing_LSB_information.patch

I will soon write an article about configuring Openfire for Active Directory connection.

Domain world card (Domain-Weltkarte) received

If you’ve read my article “Domain World Card for free?“, you’ll know, that united-domains is currently having a marketing campaign. If you blog about their campaign, you’ll get a domain world card for free. I’ve mine received yesterday. Now I have to find a nice spot to hang it up in my room.

The domain world card is laminated and looks really nice. I will let you know, if I’ve found a nice spot.

ArchLinux, encrypted root and a MacBook Pro

Ok, so I’ve installed ArchLinux on my MacBook Pro (it’s a 5,1) with encrypted root disk, and I’m not able to enter my passphrase. This is a really ‘nice’ bug, because the MacBook Pro is useless, if it’s not booting :(

But where is the problem? After searching some time, I’ve found it out. The keyboard on my MacBook Pro is connected through USB and needs a kernel module ‘hid_apple’ to work. If this module is not integrated in the initrd, you’re unable to enter the passphrase.

But there is a solution: modify the file “/etc/mkinitcpio.conf” and add the following modules to the MODULES line:

1
hid usbhid uhci_hcd ehci_hcd hid_apple

On my system, this line looks like this:

1
MODULES="hid usbhid uhci_hcd ehci_hcd hid_apple"

After changing mkinitcpio.conf rebuild the initrd with the following command:

1
mkinitcpio -v

Reboot your system, and now you should be able to enter your passphrase.

Domain World Card for free?

united-domains is currently making a nice online marketing campaign. They will give you a free Domain-Weltkarte (Domain World Card), if you write something about it (like I’m currently doing, as I want to have such a thing).

All you have to do: write about it and send the link of your article to an mail-address. You can find out more here.

It seem for me, as this is a good advertisement, as I’ve found this campaign on another blog :)

And now, I’ll have to write a mail :)

Web analytics made open source

You are searching for a web analytics software and don’t like to use google analytics?
Instead you really like to see an open source solution for your analytics needs that integrates nicely with your WordPress installation?

Have a look at Piwik.

Piwik is written in PHP and needs a MySQL database for storing the data.
The installation is done in a few minutes. After completing the installation, you’ll see a javascript code snippet which should be placed inside your pages. If you’re running WordPress, you can use this plugin.

It has a good looking dashboard, in which you can place widgets. Just what you need and want.
Everything is build as plugins, too. So you’re able to choose, which features are available and if you really need it.

And the most important thing: the data is on your system!

Have a look at the Piwik FAQ for more information.

Edit:
Sorry, I’ve missed to add the link for the WordPress plugin

What's going on?

Sure, I’ve promised to write more frequently, but life is keeping me busy (especially watching “The Big Bang Theory“).

A long time ago, I’ve used puppet to configure my systems. But different changes on my servers has made it useless for some time. Now I’m getting it running again, for making a bunch of things a lot easier than now.

If puppet is back up again, I will publish my configuration. Maybe it’s useful for anyone.