Monthly Archives: November 2009

screenrc – easy way to improve screen usability

I’ve used a custom ~/.screenrc file for at least a year now. I find that this snippet helps improve the usability for me.

#Custom Stuff
caption always "%{= wb}$USER @ %H >> %-Lw%{= r}%50>%n* %t%{-}%+Lw%< %-=<< (%c.%s)"

activity "%c activity -> %n%f %t"
bell "%c bell -> %n%f %t^G"
vbell_msg " *beep* "

startup_message off

defscrollback 500

multiuser off
# Always start screen with utf8 enabled. (screen -U)
defutf8 on

Output (caption at bottom):
screenrc

Gentoo Prefix: How I survive work…

As Dan writes, I too survive work by using Gentoo Prefix.

%% uname -a
HP-UX localhost B.11.31 U 9000/800 HP-UX
%% gcc --version
gcc (GCC) 4.2.4 (Gentoo 4.2.4-r01.2 p1.1)
%% bash --version
GNU bash, version 4.0.35(1)-release (hppa2.0n-hp-hpux11.31)
%% ls --version                                          
ls (GNU coreutils) 8.1
Packaged by Gentoo (8.1 (p1))

Thanks to haubi for putting effort into the necessary upstream changes/patches for hppa-hpux support!

Buggy MTRR on Acer Aspire One ZG5

The problem:

$ dmesg |grep mtrr
mtrr: no more MTRRs available

I found on my ‘new-to-me’ AA1 that MTRR handling in the BIOS was messed up. Thanks to this bug report I figured out that I should compile the kernel with MTRR sanitizer enabled. That is:

$ zgrep -i MTRR /proc/config.gz 
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=1
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1

And output of /proc/mtrr is as follows. Before and after.

$ cat /proc/mtrr
reg00: base=0x0fffe0000 ( 4095MB), size=  128KB, count=1: write-protect
reg01: base=0x0fffc0000 ( 4095MB), size=  128KB, count=1: uncachable
reg02: base=0x000000000 (    0MB), size=  512MB, count=1: write-back
reg03: base=0x020000000 (  512MB), size=  512MB, count=1: write-back
reg04: base=0x03f800000 ( 1016MB), size=    8MB, count=1: uncachable
reg05: base=0x03f600000 ( 1014MB), size=    2MB, count=1: uncachable
reg06: base=0x03f500000 ( 1013MB), size=    1MB, count=1: uncachable
reg07: base=0x000000000 (    0MB), size=  128KB, count=1: uncachable
after kernel modification:
reg00: base=0x000000000 (    0MB), size= 1024MB, count=1: write-back
reg01: base=0x03f500000 ( 1013MB), size=    1MB, count=1: uncachable
reg02: base=0x03f600000 ( 1014MB), size=    2MB, count=1: uncachable
reg03: base=0x03f800000 ( 1016MB), size=    8MB, count=1: uncachable
reg04: base=0x040000000 ( 1024MB), size=  256MB, count=1: write-combining

This is needed for decent video playback with the on-board Intel 945 video. :)