2007-10-27

Linux power consumption, touchpad features

I recently upgraded to Ubuntu 7.10 "Gutsy Gibbon," which includes the 2.6.22 version of the Linux kernel. This release features support for Intel's power consumption monitoring tool PowerTOP. This utility shows the following diagnostic outputs:
  • the percentage of time the CPU is spending in different frequencies (since modern CPUs can change frequency on the fly to save power when the extra speed isn't needed)
  • the current power consumption of the system in watts (this is only available when you're running on batteries)
  • the processes, drivers, and devices that are interrupting the system from sleep the most frequently
  • relevant tips on how to decrease power consumption for your system
Using that information, as well as the Linux laptop-mode daemon, I was able to reduce my laptop's power consumption noticeably. Unfortunately I didn't have the time to do objective benchmarks, but before, my laptop used to last around two hours on batteries; now it lasts for around two and a half.

I also tweaked my touchpad's settings using the synaptics driver for Xorg. The synaptics driver allows you to set features like two-fingered scrolling (similar to that of the Mac) and circular scrolling. Unfortunately, most touchpads — mine included — don't support multi-touch, so I couldn't get two-fingered scrolling. But I think circular scrolling is even better.

With normal touchpad scrolling, you move your finger up and down the right side of the touchpad to scroll. When you reach the bottom of the touchpad, you have to lift your finger and start over at the top. But with circular scrolling, you start your finger at a designated part of the touchpad (I chose the right edge) and then move your finger in a clockwise circle to scroll down, and counterclockwise to scroll up. Basically, the touchpad starts acting like an iPod scroll wheel. To stop scrolling, you lift your finger from the touchpad, and it returns to normal.

This allows you to scroll through a long document just as easily as a short document, since you don't have to keep lifting your finger. And since scrolling is measured in radians instead of inches your finger has moved, you can scroll slowly and precisely by making big circles, or quickly by making small circles. It's much more comfortable than even using a mouse scroll wheel.

2007-10-07

DNS with BIND9

So I set up a DNS server in our house, on the server downstairs that also runs a web server (along with various other network services like Subversion, Samba, SSH, and Squid (believe it or not, the alliteration is just a coincidence)). I used BIND9 and the domain name "davenet.local". It works pretty well, except for a few problems.

First of all, for the machines on the network to use that server as their DNS server, the router running the DHCP service needs to be configured to tell them to do so. This would normally not be a problem, if we had a decently configurable router at the edge of the LAN. But we have a Linksys WCG200 (that's a wireless router with a built-in cable modem). It's minimally configurable, not even including the ability to change the DNS servers from the ISP-allocated ones. We also do have a Linksys WRT54G with DD-WRT that acts as a repeater (I highly recommended the WRT54G by the way, and I'm planning on buying a few more because they're so versatile with third-party firmware). DD-WRT does give the ability to set custom DNS servers, but this only takes effect for clients connected to the repeater, not to all clients in the network. To clarify this, here's an ASCII diagram of our network:


_[wireless: laptops]
/_[wired: DNS/WWW/SMB/SVN/SSH/Squid server]
/_[wired: printer]
/_[wired: VoIP modem]
/
[WAN] --- [WCG200 gateway]
\ _[wired: TiVo, Xbox 360]
\ /
\_ [wireless: WRT54G repeater]
\_[wireless: laptops]


(that took a while to make) So the DNS propagates from the repeater to the repeater's clients, but not from the gateway to the gateway's clients.

The second problem is that, for some reason, accessing the SMB server using its DNS name (files.davenet.local) is much, much slower than using its IP address directly. I've only tried this on Windows Vista though, so I don't know if the problem is client-related. Has anyone else seen this problem?

But overall, having a DNS server is good: it's not only easier for me to tell people to access the network printer using printer.davenet.local than 192.168.1.10, but it's also just a cool thing to do.