Arch dhcpcd and NetworkManager’s DNS conflict

I had a lot of name resolution issues after my initial install of Arch. Sometimes resolution worked, other times not. There were two main issues:

  1. Both dhcpcd and NetworkManager were editing /etc/resolv.conf (the DNS server list)
  2. NetworkManager configured name resolution through the wrong network connection: when connected to both wired and wireless, the name server for the wireless connection was being used.

Not much can be done about (2); the way our enterprise network is setup, name resolution requests from the wired network, to name servers on the wireless network, are denied. So, name resolution would take a long time because it would have to fail first before the right name server was used. The only way to fix this is for NetworkManager to prioritize the parameters of one connection over the other, and this feature does not exist yet.

Now, (1) really needs to be fixed; otherwise, name resolution will sometimes not work. The fix [1] is to add the following to the last section of /etc/dhcpcd.conf:

nohook resolv.conf

This will tell dhcpcd to stop editing /etc/resolv.conf and NetworkManager will be the only application modifying it.

[1] https://wiki.archlinux.org/index.php/Resolv.conf

laptop-mode-tools Linux 3.2 Debian Squeeze

To save power, install laptop-mode-tools in Debian. This should not be a problem unless you have kernel > 3.0 from backports. In which case, download and install laptop-mode-tools both from your repository first, and then from http://packages.debian.org/sid/all/laptop-mode-tools/download.

Once you have installed laptop-mode-tools on Debian Squeeze, you can edit /etc/laptop-mode/conf.d/cpufreq.conf for additional power savings. Simply change BATT_CPU_GOVERNOR=ondemand to BATT_CPU_GOVERNOR=powersave.

Debian Squeeze on an X220 with Realtek NIC

From http://forums.debian.net/viewtopic.php?f=5&t=64140 by oreng:

step by step, in case someone is interested:
add to sources.list: deb http://backports.debian.org/debian-backports squeeze-backports main
aptitude update
sudo aptitude -t squeeze-backports install linux-image-2.6.38-bpo.2-686
install this package: http://packages.debian.org/search?keywo … ection=all
get the first file: http://git.kernel.org/?p=linux/kernel/g … 35;hb=HEAD
add to driver:
mkdir -p /lib/firmware/rtlwifi
mv rtlwifi_rtl8192cfw.bin /lib/firmware/rtlwifi ** (correction below)
modprobe -r rtl18192ce; modprobe rtl18192ce; dmesg | tail -20

** Except must rename rtlwifi_rtl8192cfw.bin to rtl8192cfw.bin

I also got the latest kernel and xserver package by following instructions at http://www.thinkwiki.org/wiki/Installing_Debian_6.0_%28squeeze%29_on_a_ThinkPad_X220

Latex and Bibtex Paths

From http://www.insectnation.org/howto/tex:

TEXINPUTS is the search path for the kpathsea library used to carry out the TeX/LaTeX path resolution. Personally, I just have a standard texmf/tex/latex/ directory tree with subdirectories containing each non-standard class and package and I tell kpathsea to recursively search this directory by putting a double-slash (//) on the end of the search path. The same goes for the BIBINPUTS and BSTINPUTS variables, where the tree paths are typically texmf/bibtex/bib/ and texmf/bibtex/bst/ for BibTeX “*.bib” database files and “*.bst” style files respectively. The variable names match up to file types precisely as you’d expect!

export TEXINPUTS=".:/path/to/texinputs//"; export LATEXINPUTS=$TEXINPUTS; export BIBINPUTS=".:/path/to/bibinputs//"; export BSTINPUTS=".:/path/to/bstinputs//";

Power Management Tips in Fedora

Here are some tips on how to reduce power usage on a Fedora 16 or later.

1. Install cpufrequtils

yum install cpufrequtils

2. Install user space power tuning daemon

yum install tuned
service tuned start
chkconfig tuned on

3. Start the ‘cpupower’ service

service cpupower start
chkconfig cpupower on

4. Change cpu frequency governor set by the ‘cpupower’ service. Edit ‘/etc/sysconfig/cpupower’

# See 'cpupower help' and cpupower(1) for more info
CPUPOWER_START_OPTS="frequency-set -g conservative"

5. Restart the cpupower service

service cpupower restart

6. Confirm that the ‘conservative’ governor was set

cpupower frequency-info

Building BOINC 6.12 on Fedora 16 x86_64

Main issue was that the GUI wasn’t compiling. I realized that the ‘–enable-manager’ flag to configure fixed that.

1. Configure like so (in BOINC source code top-level directory)

./configure --disable-server --enable-manager

2. Configure will prompt you to install any missing ‘-devel’ versions of needed libraries.

3. Build the gui (for some reason this did not happen automatically for me)

cd clientgui/
make "CXXFLAGS=-lgtk-x11-2.0 -lgobject-2.0 -lglib-2.0 -lsqlite3 -lnotify"

4. Move the gui binary to the expected location (for making the final BOINC package)

cp boincmgr ../stage/usr/local/bin/

5. Go to the correct package directory

cd ../packages/generic/sea/ (self-extracting-archive)
make

6. Then run BOINC manager

cd BOINC
./boincmgr

You’ll get instructions to join a new project etc.