Mar
26
2009
0

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

Mar
25
2009
2

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 :( wordpress/wp-content/2009/03/wordpress_27_missing_tmp_directory-300×124.png” alt=”wordpress_27_missing_tmp_directory” width=”300″ height=”124″ />

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!

Written by saz in: Apache2,Linux | Tags: , ,
Mar
25
2009
7

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.

Mar
24
2009
0

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.

Written by saz in: Self | Tags: ,
Mar
23
2009
1

Comments enabled without registration

For some time, I was wondering, why no one is writing a comment. One of my friends pointed out, that the registration process is the blocker. “Not another username and password to remember” :)

Now I have akismet enabled and the registration is disabled.

Written by saz in: Self | Tags: , ,
Mar
23
2009
2

Repair all MySQL databases

If you need to check and repair all MySQL databases you can use

1
mysqlcheck -u USER -p -Ar

If you also want to optimize them, use

1
mysqlcheck -u USER -p -Aor

-A: all databases
-o: optimize
-r: repair

Have a look at the man page of mysqlcheck for more information.

Written by saz in: MySQL | Tags: , , , ,
Mar
22
2009
0

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.

Mar
18
2009
0

Linux tips every geek should know

A friend sent me a more or less useful link: “Linux tips every geek should know“.

More or less useful for me, because most of the mentioned topics I know already, but the second part “More Linux tips every geek should know” has some nice things, I wasn’t aware of.

For all those KDE-Users out there, here is another one: 20 all-new tips for KDE 4.2

Written by saz in: Linux | Tags: , ,
Mar
18
2009
1

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 :)

Written by saz in: Self | Tags:
Mar
12
2009
0

Lock user account under Linux

Ever wanted to lock an user account under Linux, but don’t know how?

Well, today, I was in this situation, but don’t know, how to do it. Now I know :)

Lock user account:

1
root@host:~# passwd -l username

This will change the password to a value, which won’t match a possible encrypted value.

Unlock user account:

1
root@host:~# passwd -u username

This will change the password back to it’s original value.

If you want to know the status of an account (or all of them), you can use

1
2
# List all accounts
root@host:~# passwd -S -a|awk '($2 == "L")'
1
2
# List one account
root@host:~# passwd -S username

An “L” at the second position shows that an account is locked, a “P” marks a valid password, “NP” stands for “No Password”.
Have a look at man passwd to find out more. But be sure to read the english man page, as the german version is lacking some information (it took me quite some time to find out what ‘-a’ stands for).

Written by saz in: Linux | Tags: , ,

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com