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.

2007-09-27

Halo 3

So I got Halo 3 today (my dad bought it from the Microsoft company store :)). I just started the Halo 1 campaign a few weeks ago though, so I'm not going to try Halo 3 campaign until I finish 1 and 2.

Anyway, first impressions of it from playing multiplayer: the graphics are of course very good and the new weapons are really fun to play with. But — and I don't know if anyone else has experienced this — my eyes get really tired from trying to play Halo 3, and I'm much more confused and disoriented in battles than if I were playing Halo 1. I have the same problem with Halo 2. This could be because the FOV has decreased since Halo 1, or maybe because the graphics are more complex. Or it could be because I'm just generally tired today. Time will tell...

2007-09-13

Robotics

For the robot this year, we have to use the accelerometers, gyro, and gear tooth sensors, if only for the fun of using them. I was thinking maybe next meeting (2007-09-19) we could add them onto the existing robot experimentally and start programming it a bit.

For example, we could add the facility to run in a perfectly straight line at an exactly constant speed as long as a certain button on the joystick is pressed by using the gyro to check and compensate for rotational error, and using the gear tooth sensors to compensate for speed error.

Or maybe we could implement collision detection using the accelerometers (this would be pretty hard, since how do you tell what's a collision and what's a quick stop).

We could implement bounce detection on the joysticks so things wouldn't be so jerky.

Maybe an emergency stop button that uses the accelerometers to compensate for the robot's momentum by canceling it out with force on the motors in the other direction.

Maybe a button to do a perfect 90° in-place turn by constantly integrating the gyro data until 90° is reached, while simultaneously using the accelerometers to make sure the robot doesn't move around too much (this last part would probably not work, since the accelerometers would always return some acceleration even if the turn is perfectly stationary).

Maybe even something as simple as using the front panel lights as a speedometer (this would of course be collected by integrating the accelerometer data).

2007-09-08

GridMove

I've been using an application called GridMove for a few weeks, and it's pretty good. It's an application that lets you snap windows to a grid, so if you have a very high-resolution monitor like I do, you can have several windows visible at once without having to customize their positions manually. GridMove is really flexible because you can define your own grids. Here's a screenshot of one that I've defined, called "Main, 2 auxiliary":

2007-09-02

New Facebook account

So after a few friends recommended Facebook, I thought I'd give it a try. And now, 15 minutes after I've signed up, my Gmail inbox is filled with "Foo Bar wrote on your wall" and I'm overwhelmed by Facebook's information-rich world.

People who otherwise have no online presence are completely free on Facebook. Every action they have made on the site is public to all their friends. It's the sort of openness that I like, but taken to an extreme in one sense (all information is exposed to your friends) while very closed in another (nothing is shown to outsiders). This is exactly the kind of closed group–forming that I don't like...but now that I'm part of the closed group, will it matter so much to me?

It's also, unfortunately, even more distracting and time-consuming than IM. I find myself enjoying the slow, convenient nature of blogging. And now I will go to sleep.

2007-08-29

Summer homework

Now that work is over and there's less than a week left of summer vacation, I don't have much of an excuse for not having started on my summer homework. How many of you have done it?

<rant>By the way, why is it always English class that assigns summer homework? Do English teachers think they have a monopoly on students' time? (lol) In fact, I dispute the value of summer homework altogether, since almost everyone saves it until school is almost upon them anyway.</rant>

Update, 2007-08-31 03:15: I just finished A Hero of Our Time, and I'd already done Section 1 of the packet, so I'm at the same level as Milda! (Assuming she hasn't done anything since she posted that comment.) Also, to save everyone the trouble of looking for it, here's an online version of the book that, as far as I can tell, is the same translation as we have. You can't grep dead trees.

Update, 2007-08-31 04:07: Here is my copy of the book, with the entire thing on one page, as well as normal black-on-white colors. I suggest you save this page onto your own computer; our internet connection is rather flaky.

Update, 2007-08-31 04:44: Aha, staying up late has had its benefits: I'm now finished with Section 2 as well. Also, has anyone noticed that the packet has no Section 4? (That's good for me, as now I can claim I've done sections 1, 2, and 4).

2007-08-28

Last day at work

It's my last day at SchoolSoft (now DreamBox Learning). I've really enjoyed it and learned a lot about working in a development team too (as well as making almost $5000, unfortunately somewhat less because of income tax). They also gave me a great letter of recommendation for my next job (which will probably be at DreamBox again next summer).

Everyone who asks me about my job is always impressed by how much money I make, but honestly, to me that's just a bonus — working there was worth so much more to me than just money.

2007-08-21

Update

An update to my previous post: I did use nvidia-settings, but eventually I decided to eschew graphical tools for the power of manually editing the xorg.conf configuration file. So now my xorg.conf is clean and human-readable, with lots of comments, and I've resolved not to use nvidia-settings or dpkg-reconfigure xserver-xorg anymore.

2007-08-15

Dual booting, multiple monitors, desktop compositing

On my laptop, I'm dual booting between Windows Vista and Ubuntu 7.04. I've been using multiple monitors for about a month on Vista, where they've worked fine. Up till now, I hadn't tried setting up multiple monitors on Ubuntu, but I just did using the very convenient graphical tool nvidia-settings. The setup was painless: run gksudo nvidia-settings, right-click on the external monitor, and enable it.

Now that dual monitor setup works, my Ubuntu install has almost all the features that my Vista install does: wireless networking, hardware acceleration for graphics, fancy Aero-like effects with Beryl, and multiple monitors. An extra convenience for dual-booting is that, because of GRUB, I can hibernate both OSes at the same time, allowing me to switch between them very quickly.

I haven't tried setting up Bluetooth on Ubuntu yet, so that'll be my next challenge.