djwhitt.com/blog

Remapping Capslock

with 2 comments

Despite its uselessness Capslock takes up some pretty prime realestate on the keyboard. Control, on the other hand, though extremely useful, languishes in the corners. To help fight this injustice I remap Capslock to Control.

For the console on Gentoo I put the following in /usr/share/keymap/i386/include/nocaps.map (I also gzip the file but you don’t have to):

keycode 58 = Control

and add the following to /etc/conf.d/keymaps:

EXTENDED_KEYMAPS="nocaps"

For X I add the following to my ~/.Xmodmap (which I load using xmodmap in my .xinitrc):

remove Lock = Caps_Lock
remove Control = Control_L
keysym Caps_Lock = Control_L
add Control = Control_L

On Windows I use SysInternals excellent Ctrl2cap utility.

Written by djwhitt

July 18th, 2008 at 6:46 pm

Posted in Gentoo, Linux, Windows

Cable Deregulation

without comments

I’m not going to venture and opinion on the subject because I’m not terribly well informed about it, but I found this Ars Technica article on cable deregulation interesting.

Written by djwhitt

June 15th, 2008 at 4:50 am

Posted in Uncategorized

CPU Frequency Scaling

without comments

I just setup CPU frequency scaling in Gentoo on my Thinkpad T61p (Intel Core 2 Duo). These are the steps I followed:

  1. Enable relevant kernel modules/options:
    #
    # CPU Frequency scaling
    #
    CONFIG_CPU_FREQ=y
    CONFIG_CPU_FREQ_TABLE=m
    CONFIG_CPU_FREQ_DEBUG=y
    CONFIG_CPU_FREQ_STAT=m
    # CONFIG_CPU_FREQ_STAT_DETAILS is not set
    CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
    # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
    # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
    # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
    CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
    CONFIG_CPU_FREQ_GOV_POWERSAVE=m
    CONFIG_CPU_FREQ_GOV_USERSPACE=m
    CONFIG_CPU_FREQ_GOV_ONDEMAND=m
    CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m

    #
    # CPUFreq processor drivers
    #
    CONFIG_X86_ACPI_CPUFREQ=m
    # CONFIG_X86_POWERNOW_K8 is not set
    # CONFIG_X86_SPEEDSTEP_CENTRINO is not set
    # CONFIG_X86_P4_CLOCKMOD is not set

    Screenshot linux kernel CPU frequency scaling menuconfig on my T61p

  2. Add the appropriate modules to /etc/modules.autoload.d/kernel-2.6 so that they are loaded at boot time:
    # cpu frequency scaling
    acpi-cpufreq
    cpufreq_ondemand
  3. Install cpufrequtils:
    emerge cpufrequtils
  4. Set CPU frequency governor in /etc/conf.d/cpufrequtils:
    # /etc/conf.d/cpufrequtils: config file for /etc/init.d/cpufrequtils
    # Which governor to use. Must be one of the governors listed in:
    # cat /sys/devices/system/cpu/cpu?/cpufreq/scaling_available_governors
    #
    GOVERNOR="ondemand"
  5. Add cpufrequtils to boot runlevel:
    rc-update add cpufrequtils boot
  6. Reboot (or start the stuff by hand) and enjoy a more efficient system.

Written by djwhitt

June 3rd, 2008 at 11:44 pm

Posted in Gentoo, Linux, Meta, Ruby, T61p

Ruby 1.8.7

without comments

Hold off on that upgrade for now. Ruby 1.8.7 is not a minor release + it breaks things.

Written by djwhitt

June 3rd, 2008 at 8:31 pm

Posted in Ruby

Welcome to Wordpress (again)

with 2 comments

In the interest of actually writing something I’ve installed Wordpress and I’m going to try to stick with it. It’s not my favorite piece of software in the world, but then again the alternatives aren’t that much better and I might actually, you know, use this, so here goes.

Written by djwhitt

June 2nd, 2008 at 1:43 am

Posted in Meta