Adventures in Netbookery
I haven’t spoken much about the Samsung NC10 I bought to accompany me on the train. Out of all the netbooks, I chose this one because it was one of the thinner, lighter models, I adore the keyboard, and with the Amazon exclusive, came with a bigger battery and slightly enlarged trackpad. Of course, Samsung immediately announced two or three new netbooks, one of which replaces the NC10 and has basically the same enhancements as mine, plus a redesign. Ah well, with the way netbooks have gained recent popularity, this was bound to happen, and actually make me look forward to the next few years.
Now, the first thing I did was install Linux on this machine. This is not a trivial exercise! In fact, it’s as if the Linux community in general utterly despises them, or can not comprehend anyone desiring to utilize an underpowered device. Why? Most netbooks have no optical drive, and they’ve been out for at least a couple years now, yet not Debian, not Ubuntu, not any major distro I checked, actually supplies an image which can be copied onto a USB stick for installation! No, instead I had to follow an online guide to use syslinux, install a kernel on my USB drive, edit a configuration file, and then copy an install CD onto the memory stick. Not exactly difficult once I realized what I was supposed to be doing, but only after hitting several different and conflicting sets of instructions all over the internet. It’s unfortunate this is the case, but I see the increased popularity of netbooks changing this in time.
Once Ubuntu Linux was installed, it turns out the release I’d chosen, Intrepid Ibex (8.10, the latest stable release) didn’t support the wireless card. The Ubuntu community has a very good page specifically for the Samsung NC10 for fixing this problem, but of course doing so requires a network connection. I spent a couple hours in my loft with a cable snaking to my system, upgrading over 200 various packages. This brings me to a second question I have about Linux in general: why does it seem no distribution updates their installation CDs? If 200 packages have been upgraded in some manner, rolling those updates into the install disk seems only logical, as it would decrease the bandwidth from people downloading updates, and actually give some weight to the “stable” moniker; I can hardly label what I installed a stable release when I had to upgrade nearly half of the packages supplied by a CD I downloaded the same day.
Either way, the system, my wireless, and everything was eventually fully functional. I’d done some research, and while Gnome is OK, and XFCE is more mainstream, I decided to try LXDE instead, considering netbooks are rather notorious for their underpowered nature. Of course, to do this right meant ditching all the Gnome plugins I could. Well, first on the list was having a wireless manager so I wouldn’t have to constantly hack my network files when I changed wireless spots. WICD is a great alternative to the Ubuntu default–it’s much faster at detecting and switching networks, with the only drawback that I had to manually configure the VPN through VPNC, and I can’t just click a nifty icon to log into the VPN. I assume later versions of WICD will fix this, so I’m not concerned.
Next, came power management. At first, I used Gnome’s gnome-power-manager, but twice, this utility crashed, leaving my netbook powered on when I stowed it into my bag. Now, why can’t the utility simply edit the appropriate system files, so the computer isn’t dependent on it running constantly? Well, I was now forced with finding an alternative, except… there isn’t one. Sure, I could use KDE’s power manager, but that just replaces one buggy utility with another. LXDE will report battery status, but has no other abilities. That left manually altering Linux ACPI settings–not daunting, but inconvenient.
After a whole lof of Googling, I opened /etc/acpi/lid.sh, but apparently the folks at Ubuntu don’t think anyone would want their laptop to sleep on lid closure. Ok, then… how about /etc/acpi/events/lidbtn? Success! I just had to change one line:
#action=/etc/acpi/lid.sh action=/etc/acpi/sleep.sh %e
There! Now my netbook will sleep whenever I close the lid. And… when I open the lid. Damn! Sadly, the sleep.sh script is a toggle, and will now activate any time the “lid button” changes state. That won’t do at all! So, I then opened /etc/acpi/sleep.sh and added these lines to the top:
lid_open=$(grep open /proc/acpi/button/lid/LID0/state) if [ "$1" == "button/lid" ] && [[ "$lid_open" > "" ]]; then exit fi
In that code, I check the first parameter to ensure it was the lid button that activated the sleep toggle, and then exit if the lid is open. This way, the actual sleep and power-down buttons can still perform this action while the lid is open.
But I still had one problem… now when coming out of sleep, xscreensaver was started in lock mode, even when my .xscreensaver file clearly set locking to false. My next stop was /etc/default/acpi-support, in which I commented LOCK_SCREEN to disable this confusing behavior.
At this date, I’m still left with a few things I need to fix.
- I have to use xbacklight to set the screen brightness because it’s not remembering the last setting on wakeup. The screen is almost blinding at 100%, easily usable at 50%, and 30% is more than fine in a pinch. I’d like to have 50% as the overall system default at least.
- There’s either a bug in my BIOS or the kernel, as the system loses track of the bios-available CPU C-states, going from “C1 C2 C4” to “C1 C2” to “C1” until finally, the CPU is always in an active state. This seems somehow linked to plugging in the AC cable, but I’m not certain.
- The last kernel update broke sound, and attempting to load the Ubuntu provided snd-hda-intel driver resulted in kernel errors, forcing me to manually install the latest ALSA drivers. The second I did this, the powertop utility reported my system using 2W more than before (from 8.4 to 10.4 average). Huh?!
- I want to disable bluetooth, but apparently turning off the service is not sufficient. I have a script that unloads the btusb module, but I’d rather it wasn’t loaded in the first place; I’ll have to look into disabling this.
- I’ve added “options usbcore autosuspend=1” to my /etc/modprobe.d/options file, but autosuspend is still not working right, meaning my webcam uses power even when not enabled. I’d previously attempted adding usbcore.autosuspend=1 to my kernel line in Grub, but got an unrecognized option error, meaning usbcore is indeed loaded as a module.
- Finally, the battery reports its last full charge was 5600 mAH, when the battery reports its max capacity is 5900 mAH (/proc/acpi/battery/BAT1/info). I’ll have to fully shut down and charge from the AC to see if this changes. If not, maybe I’ll contact Samsung and ask if this is normal behavior.
Even with all this, I get 7 hours of battery-life. So, you can imagine I’m still pretty happy with my new lappy. Now all that remains are a couple repairs to my Asus G1, and I’ll sell it for far less than I paid, but probably more than the cost of the NC10. Everyone wins!