Coming soon: Affordable LED lighting

Affordable is relative, of course. LED lights are a long way from costing less than CFLs, and of course, the old-fashioned incandescents are still cheaper. But the Ecosmart LED bulb that Home Depot is about to start selling for $20 costs half as much as competing offerings from GE and Philips.

They use 8-9 watts to provide equivalent light to a 40w incandescent, work in dimmers, are made in the USA, and have an estimated life expectancy of 17 years. So I think I could be persuaded to buy a couple.But speaking of CFLs, I’ve been buying them since at least 2003. They get a bit of a bad rap, but in my experience, not all CFLs are created equal. Some of the first CFLs that I installed 7-8 years ago are still working. I’ve had others only last a few months.

I can think of two possible reasons for this. I bought my first bulbs at Home Depot. Later, I switched to buying bulbs at Kmart. The bulbs I was buying at Kmart were considerably less reliable. A couple of years ago I switched to buying bulbs at Costco. Fed up with replacing CFLs, I started writing the date of purchase on the bulbs and saving my receipts at that point. But so far, none of my dated bulbs have burned out.

So I think changing brands can make a difference. If a bulb burns out before its time, buy a different brand next time. And write the installation date on your bulbs so you can be certain the bulb really did burn out before its time. Given the number of fixtures in most homes, it can be difficult to remember exactly when it was you changed a bulb.

The other thing to check is the fixture itself. The base of the bulb contacts a copper tab inside the fixture. Over time, this tab can get mashed down, causing poor contact, which causes arcing and damages the base of the bulb, leading to decreased bulb life. If you want to fix this, cut off power to the outlet from your breaker box or fuse box, remove the bulb, and bend the tab to about a 20-degree angle. Turn the power back on, turn on the light switch, then start twisting the bulb into the socket. Stop turning just as soon as the bulb lights.

Your CFLs won’t kill you

Much has been said about the mercury content in CFLs. I finally found a rebuttal, courtesy of Australian ex-Amiga journalist Dan Rutter. If you don’t want to read the article: The mercury is in gaseous form, so it will dissipate on its own within a matter of hours, at most. Breaking a CFL won’t turn your house into an EPA Superfund site.

Read more

Save energy and money with smart power strips

I stumbled across this money-saving tip today. A company called Bits Limited sells “smart” power strips. Here’s how they work: You plug a device into one of the plugs, and when you turn that device on, it switches power on to other outlets. The strip also figures out how much energy the device uses when it’s off, so when it senses you’ve turned that device off, it cuts power to those other outlets.

Here’s an obvious use: Plug your TV into the master outlet, then plug your VCR, DVD player, cable box (or powered antenna if you’re a cable-hating tightwad like me) into the autoswitching outlets.The reason these strips work is because most home appliances use power even when they’re switched off. A powered-off TV uses power because part of it has to stay on all the time waiting for you to hit the power button on your remote. The same thing is true of your DVD player, VCR, and anything else that has a remote. Any device that uses a plug-in “wall wart” transformer is also consuming power. The transformer chews up a watt or two even if the device it powers is turned off.

So if you can bring yourself to walk over to the TV to turn it on rather than using the remote, you can buy the cheapest $31 model for each TV in your house and plug your stuff into that. (To save more money, check for refurbs.)

The manufacturer states one of these devices can save you $11.55 a month, on average, when used with a computer.

The savings won’t be as high with other devices like TVs, but you can expect to save a few dollars and in the summer, you’ll save slightly more because those devices won’t be generating excess heat that your air conditioner has to dissipate. Each strip you buy should pay for itself in less than a year.

Plus, those wall warts will last longer if power is cut to them when they aren’t in use. I’ve come across numerous “broken” old-school video game machines whose only problem was a burned-out wall wart. Replacements can be pricey ($10-$20), so if these power strips save you from having to replace two of those over the lifetime of the unit, they pay for themselves right there.

The company also sells beefier units with more outlets and more protection intended for computers. The idea there is you can plug the computer in, and when you turn your computer off, it will automatically shut off your monitor, printer, and any other peripherals you have in order to save power.

I have mixed feelings on using these with computers. From an energy consumption standpoint, having a computer powered on all the time is comparable to having the lights on in the room all the time–and we’re talking old-fashioned incandescents here, not CFLs. So plugging your computer into one of these devices and turning it off when you’re not using it would save a lot of power. While computer monitors should be turned off when not in use, there’s nothing worse for the computer itself than turning it off and on repeatedly. I leave my computers on all the time, and in the last 10 years, I’ve had two hardware failures. One was a hard drive crash in a laptop (very difficult to avoid), and the other was a dead power supply in an HP Pavillion desktop after a power failure. As underpowered as that power supply was, that failure probably was inevitable too. Two failures in 10 years is a pretty good record.

Electricity is expensive, but computer failures are expensive too. I prefer to leave my computers on, save power where I can (I own several computers but they all only print to one printer, for example), and maximize my computers’ life expectancy.

I’m thinking very seriously about at least ordering one of these for the living-room television. It won’t pay for itself as quickly as the programmable thermostat did, but they only cost about $5-$10 more than a traditional power strip with comparable protection ratings. If I look at them as a $10 investment instead of a $30 investment, they’ll pay for themselves pretty fast.

I did go looking for other manufacturers. It appears that Fellowes made these in the past but has discontinued them. For now, it appears Bits Ltd’s offerings are the easiest ones to find. It would be nice if that changed.

A crude way to get some of the benefit of these is to use an electrical outlet timer. Plug the timer into the wall, plug your power strip into the timer (assuming the timer has a grounded outlet), then set the timer to cut the power off at night. The savings won’t be as dramatic, but if you happen to have a timer or two around the house to control Christmas lights, you might as well put them to use saving you some money during the other 10 months of the year.

More on building under a small Linux environment

Well, I’ve been playing a little bit with Erik Anderson’s uClibc-based development environment mentioned in the previous two posts.
When I compile, I issue the command export CFLAGS='-Os -s -mcpu=i386 -march=i386' to create small-as-possible binaries. Using the default flags, the Links web browser balloons to nearly 2.6 megs on my dual Celeron, mostly due to the debug symbols. It drops to around 760K with those options. Specifying i386 binaries shrinks them down at the expense of some speed on some CPUs (especially 486s and first-generation Pentiums), so you have to set your priorities. It doesn’t matter nearly as much on newer CPUs. But I’m pretty sure if you’re interested in uClibc you’re not just running it on Pentium 4s.

For the record, Links compiles without warnings without doing anything special to its configuration and seems to run without incident (I immediately used it to locate and download more source code to compile). Samba’s more difficult, giving some warnings in various places. It may or may not require some special configuration in order to actually run (I didn’t have time tonight to test it), and of course that could result in some reduced functionality. The binaries total 9.3 meg, which isn’t bad considering it implements a complete Windows NT-compatible file server as well as some simple client utilities for connecting to NT shares on a network. The files themselves are about 20% smaller than on a stock Debian system.

Erik Anderson says the majority of Unix software will compile under uClibc, which is probably true. I generally see compiler warnings occasionally even when using a completely mainstream system.

This is a so-you-know-I’m-alive post

I don’t expect my daily doings to be interesting to anyone. I mean, c’mon. Who wants to read ordinary? But since I haven’t posted in forever, I’ll post what I’ve got, which is this.I’m getting a lawnmower today. That’s good because I can’t get anyone to mow my itsy-bitsy yard for less than $25. For that kind of money, I’ll do it myself.

A friend is coming over this afternoon to help me install a programmable thermostat. That’s good because my utility bills are out of control. If I’d done it in December, I’d be about $400 richer right now. I’m also looking at some other creative ways to knock utility costs down, like compact fluorescent light bulbs, which use about 1/5 the wattage of a standard bulb and have about 10 times the life expectancy. They claim to save you about $30 in energy costs over their life expectancy. Multiply that by the 20 or so bulbs around the house that they’d be suitable replacements for, and you’re talking some real money.

My DSL connection has been sporadic the last couple of days. It seems to finally be stable. I’d get better reliability by upgrading to a static IP, but that won’t happen before summer. I’m still dealing with those unexpected expenses that creep up on new homeowners, and, well, I’m young. I don’t have the kind of resources someone 10 years older than me would have.

If I can find a steady writing gig, that’ll help.

I’ve got a couple of tape backup issues to look at for work. And that’s pretty much my day.

I wrote what I thought was a decent piece on bleeding-edge hardware. But somehow I managed not to save it. I may get time to rewrite it tomorrow, depending on how productive I am today.

Oh, and, tee hee hee, my Royals are 8-0. The last team that started the season 8-0 won the World Series. It was the 1990 Cincinnati Reds, who beat an awfully good Oakland Athletics team. And there’s reason for hope: The Royals have been doing it without Carlos Beltran (leg injury), and yesterday they won in spite of half the team battling the flu. Beltran and Mike Sweeney are the Royals’ only star players.

But the 1990 Reds only had two bona fide stars too, in Eric Davis and Barry Larkin.

Do I really think my Royals will win the World Series? Not yet. But I think this is going to be a fun year.

Why I run Debian, and some Debian tricks

After Dan Bowman pointed out another blogger’s recent difficulties installing Evolution on Mandrake 8.1, I had little comment other than, “That wouldn’t be an issue if you’re running Debian.” Well, I think I said a few other things because I tend to be wordy, but that was the only important thing I had to say.Debian is one of the more difficult Linux distributions to install (you have to know what hardware is in your machine–it doesn’t nicely autodetect everything like Mandrake), but it’s far and away the easiest distribution to maintain. We’ll get back to that in a minute.

Released versions of Debian tend to be ultra-conservative. The current version, Debian 2.2r5, still uses the 2.2.19 kernel, for one thing (and that’s a fairly recent change). The current 2.2 kernel is either 2.2.39 or 2.2.40. All packages (at least all the ones anyone uses anymore) are constantly checked and maintained and patched. In theory, the current stable Debian release ought to be the most bullet-proof Linux available.

Besides Debian Stable, there’s also Debian Testing and Debian Unstable. Debian Unstable is pretty cutting-edge, but I’ve had no problems running it. I just keep up with the current patches and the system runs fine. I know people who run production servers on Testing and Unstable and get away with it.

If you want the latest and greatest stuff, after you install Debian, edit the file /etc/apt/sources.list and uncomment the ftp and http lines. Next, copy and paste those lines, then edit the “stable” to read “unstable.” (Or if you’re more conservative, edit it to read “testing.”) Be aware that occasionally you’ll run into problems running packages from unstable under stable. I ran Evolution, Galeon, Dillo, Sylpheed, and a multitude of other packages from unstable just fine, but when I installed AbiWord (a really nice, lean, mean, superfast word processor, by the way) it failed to run right. I upgraded to unstable, and then it worked perfectly.

OK, let’s talk some tricks.

Want to upgrade your distribution after a new version comes out, or upgrade from stable to testing or unstable? Easy. Type this:

apt-get update ; apt-get dist-upgrade

Then Debian will go download the pieces it needs to upgrade itself.

Want to keep your system up to date with any little changes (security patches, whatever) that may have happened recently? Type this:

apt-get update ; apt-get upgrade

So Debian lets you keep a current and presumably secure installation very easily. If you run that line regularly, you can rest assured that if your system is insecure, it’s not Debian’s fault but rather a misconfiguration on your part.

Want to try out some new piece of software? Forget having to hunt down RPMs or keep track of your distribution CD. Check availability with this command sequence:

apt-get update ; apt-cache pkgnames [name of program]

Found it? Excellent. Install it with this command:

apt-get install [name of program]

And if it wasn’t as great as you heard, you can uninstall it with this command:

apt-get remove [name of program]

System acting goofy? This’ll cure much that ails you:

apt-get clean ; apt-get update ; apt-get check

So from a system administration standpoint, Debian is great. Debian developers often try to justify the difficulty of installation by saying you only have to run it once, and to a degree, they’re right.

Compiling a kernel under Debian

I found a nice document detailing customizing your kernel under Debian. The standard method works under Debian, of course, but it’s cleaner to do it within the confines of your package manager–then it doesn’t go stomping on files you modified. Plus it’s actually a little easier to let Debian handle some of the details.

Here are the notes I took while using the document.

With additions:
Use kernel-source-2.4.17

export CFLAGS=”-O3 -mcpu=i686 -march=i386 -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -malign-functions=4″
export CXXFLAGS=”-O3 -mcpu=i686 -march=i386 -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -malign-functions=4″

Using -march=i686 is known to cause instability and not improve performance by any noticeable amount. The kernel mostly ignores these settings but I set them anyway. You can alternatively set them in the file /etc/profile. If you ever find yourself compiling apps from source, you want these options set so they’ll perform optimally.

A correction:
Debian tar doesn’t seem to support the -I switch for bzip2. So I extracted the archive with the following:
bunzip2 -k -c kernel-source-2.4.17.tar.bz2 | tar -xf –

the -k switch tells bzip2 to keep the original file intact, while -c tells it to extract to stdout. The | redirects stdout to the specified program, in this case, tar. -xf tells it to extract the file.

I got an error on make xconfig:

make: wish: command not found.

So I headed off to www.debian.org/distrib/packages. At the bottom of the page, there’s a form where you can type a filename and it’ll tell you what package it comes from. Type in “wish,” hit enter, and I get a long list, including /usr/bin/wish8.3 in a package named libs/tk8.3. Sounds promising. So I do an apt-get install tk8.3 and I’m in business. Type make xconfig again, and we’re set. This page is also a really good way to hunt down packages if you don’t know exactly how Debian named it.

Options I chose for kernel compilation:

Code maturity level options: prompt for development and/or incomplete code/drivers. I answered Yes, so I’d get modern filesystem support.
Loadable module support: I answered yes to all. I’ve read that disabling modules and compiling everything directly into the kernel can improve performance but I’m wary of that. If the kernel’s too big, the system won’t boot. And the idea of modules is to keep only what you need in memory. So I suppose there are instances where a no-modules kernel could increase performance, but there are certainly instances where it would hurt. I chose to be conservative.
Processor type and features: I changed a couple of the defaults. Double-check the processor family option; in my experience it’s usually but not always correct. Enable MTRR support unless you’re using a 486, Pentium, or AMD K5 CPU. All other reasonably modern CPUs, including AMD, Cyrix, Intel, and WinChip, support MTRRs for increased GUI performance. Since the PC I’m using only has one CPU, I disable SMP support. Then I enable local APIC and IO-APIC support on uniprocessors.
General setup: I accepted the defaults, because aggressive use of APM makes me really nervous. Under Windows, APM always does me more harm than good.
MTD: Since I don’t use any flash memory devices, I accepted the defaults of No.
Parallel port support: Curiously, this was disabled by default. This PC has a parallel port but I only use network printers, so I left it disabled to save a little memory.
Plug and play configuration: I said no to ISA plug and play support, since this machine is a laptop and won’t have any ISA PnP cards. On modern PCs that have no ISA slots, say N.
Block devices: The defaults are usually sufficient, but some configurations need RAM disk support and initrd support turned on. If you’re going to mess around with ISO images, you’ll probably want to turn on loopback device support.
Multi-device support: I’ve never seen a laptop with RAID, so the default of disabling it all works great for me.
Networking options: The defaults are fine for most uses. If you’re going to make a router or firewall out of your PC, enable Netfilter.
Telephony support: I disabled it.
ATA/IDE/MFM/RLL support: Disable it if you have an all-SCSI system. I don’t. Turn on SCSI emulation support if you use a CD-R or CD-RW. Under IDE chipset support/bugfixes, disable the chipsets your PC doesn’t have. This laptop has an Intel chipset, so all I had enabled were Generic PCI IDE chipset support, Sharing PCI IDE Interrupts support, Generic PCI bus-master support, Use PCI DMA by default when available, Intel PIIXn chipset support, PIIXn tuning support.
SCSI support: I have an all-IDE system (unfortunately), so I disabled it. Note that SCSI emulation for a CD-R counts as a SCSI device, as does a parallel port Zip drive. Since I have neither, I’m safe disabling it to save some memory and speed up boot time slightly.
IEEE 1394 (Firewire support): I disabled it since I have no Firewire ports.
I2O device support: I disabled it.
Network device support: This can be tricky. I turned off SLIP and PPP since I don’t use them. You may need PPP. I turned off ARCnet support, which you’ll probably do as well since ARCnet is very rare. I have a 100-megabit 3Com 3c556 NIC in this laptop, so I went into Ethernet 10 or 100 Mbit, drilled down to 3COM cards, and said yes to 3c590/3c900 series, since that’s the driver the 3c556 uses. I turned off the others. I like to compile support for the machine’s NIC straight into the kernel when I can, since it speeds up network configuration at boot time. On servers, I’ve been known to compile support for every type of NIC I own into the kernel, so that if I ever have to change NICs, it’ll come back up automatically without any configuration from me. I turned off wireless, token-ring, PCMCIA, ATM, amateur radio, infrared, and ISDN support.
Old CD-ROM drivers: You can probably turn this off, unless you know you have an old proprietary 1X or 2X CD-ROM drive. These were the drives that generally plugged straight into an ISA sound card, and they were very common on 486s. I sold tons of these things in 1994; I’m pretty sure that by the time I was selling PCs again in the summer of 1995, everything I was selling had an IDE drive in it.
Input core support: I don’t use USB input devices, so I turned it off.
Character devices: Near the bottom, after Ftape support, there are options for specific chipsets. You can find out what chipset you have by typing the command lspci in a shell. (You have to be root to do this–use the su command if you’re logged in as yourself, as you should be.) This laptop has an Intel 440BX chipset, so I turned off the VIA, AMD, SiS and ALI support.
Multimedia devices: Disable video for Linux unless you have a capture card. Most will disable Radio adapters as well.
File systems: I enable Ext3 and ReiserFS, along with DOS FAT and VFAT (as modules), ISO 9660 and Joliet, NTFS read-only (as module). Under network file systems, I enable SMB since I (unfortunately) work in Windows environments. I disable NFS since we have no NFS servers.
Console drivers: The defaults work for me.
Sound: Since I have onboard sound, I enable sound support and pick my chipset, in this case, ESS Maestro3. I disable all others.
USB support: I have USB ports but don’t use them. I left it enabled just in case, but I’m not sure why.
Bluetooth: I don’t use it, so I disabled it.
Kernel Hacking: I disabled Kernel debugging, the default.
Whew! Hit Save and Exit. Exit X to save some system resources while compiling and installing.

The end result was an up-to-date kernel (2.4.17) that was about 200K smaller than the stock 2.2.19 kernel and boots to a login prompt in 18 seconds flat, as opposed to 45 seconds before. Much of the improvement is due to the 3c590 driver loading faster as part of the kernel rather than as a module, and the kernel no longer searching for phantom SCSI devices. But Charlie Sebold told me it’s his experience that recent 2.4.x kernels boot a lot faster than earlier kernels.

It’s not perfect–I don’t have sound completely working yet–but I found some clues. I’m not overly concerned about sound support though. The system beeps at me when I have mail, and for work purposes, that’s all the sound I need. I don’t see any point in turning my PC into a multimedia tribute to Billy Joel or Star Wars or Quake III.