Author Archive

Installing Fonts

Posted by on Friday, 22 May, 2009

Best monospaced font ever is Consolas from Microsoft. It’s installed with the Office 2007/03 Compatibility Pack and with Office 2007. So you’ll need an instance of Windows with Office 2003/07 to get this font, it also comes with Visual Studio I think (as that is what this font was designed for, people looking at code all day)..

I also installed this font in Xubuntu for use as my terminal font. Doesnt look quite as nice on Linux/Xubuntu as it does on Windows, but it was still the one I liked the most for my terminal.

For TrueType fonts, make a directory and copy the .ttf files:

/usr/share/fonts/truetype/<font_name>

Rebuild the font cache thing:

fc-cache -f -v

CPU Frequency Scaling

Posted by on Friday, 22 May, 2009

CPU frequency management is one of the keys to power preservation. Ideal for boxes that sit idle a lot of the time, e.g. that file server out the back.

Results will vary with Desktop/GUI systems, I found the response on Xubuntu too slow to clock up when needed, so I would manually set it to performance when using the system and ondemand if I was going to leave it idle. I guess this could be automated, to switch to ondemand when the system has been idle for a while..

apt-get install cpufrequtils sysfsutils
modprobe p4_clockmod (see links at bottom for other CPU types)
modprobe cpufreq_ondemand
echo ondemand | tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Verify whats happening:

cpufreq-info

Save config/apply at startup:

echo p4_clockmod | tee -a /etc/modules
echo cpufreq_ondemand | tee -a /etc/modules
echo devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand | tee -a /etc/sysfs.conf

Reboot and run cpufreq-info again to verify:

cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
  driver: p4-clockmod
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 350 MHz - 2.80 GHz
  available frequency steps: 350 MHz, 700 MHz, 1.05 GHz, 1.40 GHz, 1.75 GHz, 2.10 GHz, 2.45 GHz, 2.80 GHz
  available cpufreq governors: ondemand, userspace, powersave, conservative, performance
  current policy: frequency should be within 350 MHz and 2.80 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 350 MHz (asserted by call to hardware).
  analyzing CPU 1:
  driver: p4-clockmod
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 350 MHz - 2.80 GHz
  available frequency steps: 350 MHz, 700 MHz, 1.05 GHz, 1.40 GHz, 1.75 GHz, 2.10 GHz, 2.45 GHz, 2.80 GHz
  available cpufreq governors: ondemand, userspace, powersave, conservative, performance
  current policy: frequency should be within 350 MHz and 2.80 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 350 MHz (asserted by call to hardware).

Debian HOW-TO : CPU power management

How to make use of Dynamic Frequency Scaling