I’ve mentioned before that I’m into solar power, and that there are a couple projects I’m getting into.  Well, I’ve been thinking about a couple things for a long time, but I’m just now starting to get into serious development.  There are two things: a maximum powerpoint tracking (MPPT) charge controller, and a sine wave inverter/charger.  The first of these is a good tool for extracting extra power out of solar panels, while the second is instrumental in interfacing the DC and AC sides of a power system.  That is, the inverter/charger will allow you to get clean AC from your batteries, or charge them from a source already available.  Think computer UPS, but designed for a slightly different purpose.

There are various homebrew projects like these floating around the Internet, and I hope to contribute something.  By posting about these here, I hope that I remain focused on them :).  This should be interesting, and maybe even useful to someone.  I’ll try to give an update here and there as I come up with more of a solid design for both.

Gentoo Network Interfaces Problem

I recently had an issue on my Gentoo desktop which was sort of frustrating, but which I’ve since gotten past.  I turned my machine on one day, only to find the mouse and keyboard not responding once the login screen came up.  Now, most of the time that’s just what can happen after an update, if you don’t reemerge xorg-server and the xf86-input-whatever packages.  Problem was, I couldn’t log in, and for some reason, eth0 hadn’t come up.  This meant no SSH, either.

First, a little about my setup.  I have two network cards in this machine.  One is the onboard gigabit one, which is my main nic (eth0).  The other is an extra PCI one (eth1) that I have statically configured for cases when I want to do a direct transfer between machines, or troubleshoot (like in this case).  The problem was, eth0 wasn’t coming up, and was instead doing a DHCP timeout (as if it weren’t connected at all).  I checked the cables, all looked good.

I ended up booting into the System Rescue CD (which I recommend having on hand if you do anything with computers) and checking a few things out.  I checked /var/log/messages and found these lines:

Mar 27 15:18:56 fishingcat kernel: [   13.847407] ADDRCONF(NETDEV_UP): eth0: link is not ready
Mar 27 15:18:57 fishingcat dhcpcd[2401]: eth0: waiting for carrier

This had me puzzled, but then I found this:

Mar 27 15:27:12 fishingcat /etc/init.d/udev-mount[7333]: Udev uses a devtmpfs mounted on /dev to manage devices.
Mar 27 15:27:12 fishingcat /etc/init.d/udev-mount[7335]: This means that CONFIG_DEVTMPFS=y is required
Mar 27 15:27:12 fishingcat /etc/init.d/udev-mount[7336]: in the kernel configuration.
Mar 27 15:27:12 fishingcat /etc/init.d/udev-mount[7324]: ERROR: udev-mount failed to start
Mar 27 15:27:12 fishingcat /etc/init.d/udev[7323]: ERROR: cannot start udev as udev-mount would not start

Bingo.  I had remembered from an encounter at work that udev likes to create persistent naming rules for hardware.  This is a new feature, and is generally a good thing: it keeps eth0 as eth0 for the next reboot, same for eth1.  But with udev not starting, no dice.  So, following the error message, I enabled the appropriate kernel option in make menuconfig.  (For me, this was under Device Drivers -> Generic Driver Options -> Maintain a devtmpfs filesystem to mount at /dev.)

I’m not really sure what caused that to become disabled in the first place, but it’s fixed now, so there you go.

Raspberry Pi

I should take my second post of the new year to mention that I love raspberries.  I’m not sure if they’re my favorite, but they’re damn close.  I’m not sure what else to say, other than try some in champagne, or other drinks.  Try them with cakes.  Candy bars containing raspberry are good as well.

This post, however, is not about the berry, but the Raspberry Pi, a tiny embedded Linux system that boasts enough power to be a full-featured desktop.  (If you came upon this post, you’re probably already somewhat familiar.)  There are two models, at $25 and $35.  The more expensive one has two USB ports as well as an Ethernet port.  (The lesser, I believe, only has one USB and no Ethernet.  But, you could get a hub.)  Both have a 700 MHz ARM-based CPU, and 256 MB of RAM.  They are surprisingly capable graphics-wise (check out the link for more details), and they are also low power.  This is what interests me.

I posted before about possibly configuring my Web server to run at least partly on solar power.  On that post, someone commented on the possibility of using the Pi for this.  And so, I have a model B on order – this board uses about 3.5 watts, so that’s a start.  I would use an external USB drive for much of the filesystem, which would bring this up some, but it should still be less than my current setup which consists of a Mini-ITX board (about 1 GHz, with 256 MB RAM and a 120 GB hard drive).

I have a model B on order (should come in May), and my plan is to throw Debian on there and test this out.  My current server does a decent amount, but it doesn’t seem to get overtaxed.  I’d be looking to run Web (Apache; yes I know there are smaller servers that might work, but I’d like to try this), PHP, MySQL, Email (Postfix/Courier), and LDAP (Email backend).  This should be interesting, and if I make careful use of the onboard SD card I think there’s a shot that this could turn out well.

As for power, part of the inefficiencies of my current setup (roughly 30-4o watts at the plug) are due to the power supply.  With a much smaller supply I should be able to bring this down.  As I also mentioned in the other post, I would like to come up with some sort of power sharing solution, where the primary power source for the Pi is solar, with the mains as a fallback and a battery backup in case of a power failure.  The idea would be to keep a normal system battery charged, rather than taxing it by cycling it each night to keep the server running.  Maybe someday I’ll end up with so much solar that the ~10 watts the whole setup should draw will be a drop in the bucket 24 hours a day (10 * 24 = 240 watt-hours/day), but for now I would take this approach.  (Also, a backup battery is good for other things, and I probably won’t care much about my Web server compared to, say, charging the cell phone or pumping out the basement.)

If the Pi isn’t up to this, I’ll probably try it with a media center-type application, and maybe look into a Sheevaplug for the server.  (It has USB also, so I could literally almost drop it in place.)  My server does get its fair share of hits, between this site, the Fever Dreams mirror, and when I host images on message boards like Fark.  But, I think that a small machine should be fine.

First Post (of the New Year)

Well, the first month and 7 days of 2012 have been alright for me, some ups and downs.  As for things I will discuss here, I will now offer the following list:

  • I have projects that I need to look at.
  • I am trying to brush up on Unix network programming.
  • Qt would also be good to know.
  • I was messing with my Web server a little, and due to permissions some images stopped showing up.  This should be fixed now.
  • The Raspberry Pi looks like an awesome idea, and at $25 or $35 each I recommend one for learning about Linux, programming, low-power computing, or just plain dicking around.  Also, buying it helps fund a good cause.
  • I need to start posting more stuff about music here.
  • Snow is nice in the winter (at least I think it is, in moderate amounts), but I’m fine with the current weather as long as the snow is not pushed up to May or June.

Well, if I think of more, you know where to find it.  Until then, enjoy the weather.

G530 Flicker Saga: The End?

Well, I hope everyone has had a great Solstice, and will continue having a wonderful holiday season with Christmas in a couple days.  Up here in NY it’s been pretty rainy and a little on the warm side, with little snow.  Hopefully we’ll have some for the 25th, as that would be fairly appropriate.  And hopefully when the inevitable lake effect comes we’ll all be safe.  If you’re reading this from somewhere out in the western US where they seem to be getting our winter weather, I wish you the best.

Anyway, as you may have seen me post here in the past, I’ve had some interesting issues with my Lenovo G530 laptop.  First, the screen became wobbly and shaky.  Then, it started to flicker.  The first of these was easy to fix, the second very annoying, and almost as easy to fix.  Well, I write now because the dreaded LCD flickering has returned.  Now, it’s been a while since I posted about it last, but in truth the fix lasted for maybe three weeks.  Figuring the cable had come loose, I repeated it, giving me another couple weeks.  Finally, a couple weeks ago I reseated the video cable only to have reliable operation for maybe a few hours before the flashing came back.  It seemed that the work around involved slapping the display repeatedly in certain locations along the sides, which served to jostle the wiring back into place, as well as relieve some of my frustration.  Then last week, after doing this for a while, I got fed up with this.  Here was the result:

Now, you might think that that was a little bit harsh.  But, I disassembled part of the screen and put it back together again.  I figured that somewhere in there something was in a bad position, and just needed to be tweaked a little.  And, it worked!  Since doing this I’ve had no flickering.  You might be wondering what, specifically was the problem.  Well, I still am too – all I did was take it apart and put it back together again, and it seems fine.

Now, given the popularity of previous posts a nice guide is in order.  However, there are a few things to keep in mind before going through this and attempting it yourself:

  • After taking pictures, I realized that I probably could have gotten some better ones for illustrative purposes.  So, I recommend that you take a look at Lenovo’s page with take-apart instructions for this unit.  Also, look over the entire graphic carefully before attempting anything, just to get a general idea.
  • You need to first follow the instructions for getting at the screen hinges, as well as reseating the video cables.  The first of these is more important.  Use it to get at the hinges; don’t tighten them as we’ll be unscrewing them.  The second is less necessary, but I recommend it to have easier access to the cables, and because you may as well reseat those while you’re tearing this thing apart.
  • There are a tone of small screws and such in this.  You probably already know this if you’ve taken it apart before, but it bears restating.  Find a clear, hard surface like a kitchen table to work on this, and keep track of your screws.  It should go without saying that an appropriate screwdriver set is a must (though you’re probably good if you’ve done this before).
  • Be careful when removing the screen bevel (after unscrewing the screws under the little rubber feet).  Use a small, flathead screwdriver and beware of power and data cables, as well as the camera up top.
  • This isn’t a bad time to clean the laptop screen while you’re at it.  I used a paper towel I dampened, and added a drop of dish detergent to it.  Try not to get and soap or water into the sides of the display.  Take another damp paper towel to rinse it.
  • Finally, this procedure is a bit more involved than ones before.  So, BE CAREFUL.  If you aren’t comfortable doing this, seek assistance.  And of course, do this at your own risk; I am not responsible for any damage to your laptop, yourself, or any other possession.

So, here it is:

Good luck.  This may help you, or it may not, but if the flickering has really been getting to you it’s worth a shot.  Overall, if you’re thinking of buying a G530, I’d recommend against it.  It’s pretty nice for a crappy machine, but it is a crappy machine.  But if you’re stuck with one, at least it’s not impossible to take apart.


Things have been a little strange for me for the past couple weeks, and honestly posting here has not been at the top of my mind.  For one thing, I lost one of my cats, Lilly, who has been with me for about seventeen years.  That was a difficult week for me.  For another, I just haven’t had much to say.  I have been working on some things, though, and soon would like to share them.  I plan to make a wiki, which only I will be able to edit, but which will be a better format for posting projects and the like.  One thing I am working on is a true sine wave inverter, a simple one at first.  If you’re not sure what this is, check back eventually :).

In the meantime, though, I had a great dinner last night with my family.  I am in the USA, but I wish you all the best on our Thanksgiving holiday, no matter where you are.  Life can suck sometimes, other times it can be amazing.  Many of us have a lot to be thankful for, so take the time to reflect while you’ve got it.

RIP Dennis Ritchie (and Steve Jobs)

This was originally going to be a post about Steve Jobs.  I had a draft going, but then I put it off.  And then just now I heard that Dennis Ritchie, one of the creators of UNIX, died today at age 70.

My original draft was going to be something along the lines of how Steve Jobs was sort of overrated in that he was more a marketing genius as opposed to a great technological innovator, but at the same time was a very important figure who helped to make technology more accessible to the masses and inspire people.  Well, Dennis Ritchie was certainly more the innovator.  UNIX and C are the foundation of so much in computing, from microcontrollers all the way up to super computers, and they likely will be for a long time.

So, long story short, there are many ways to have an impact, and it doesn’t just have to involve appearing in front of large crowds in jeans and a turtleneck.

Lenovo G530 Suspend Problem

It seems that my most popular posts here deal with fixing some common issues with the Lenovo G530 laptop, namely with the screen hinges, as well as the screen flickering.  Well, judging by the comments it seems that these have helped people (even though you will probably have to repeat the screen flickering one, as the cable can come lose repeatedly).  I am glad they are of use to people; the G530 isn’t the fanciest laptop, but if you can deal with some of these things it certainly gets the job done.

I am having a particular problem with this machine, though, that I have not been able to sort out.  It deals with suspending to RAM, or I should say, the inability to do so.  What is supposed to happen is that I activate suspend, and the machine almost completely shuts off save for a blinking, blue LED.  Opening the lid then resumes the machine almost instantly, bringing me back to where I was.  (Yes, I’m sure most of you know what suspending to RAM is, but I’m just trying to be complete.)  However, when I actually try to do this, the machine shuts off, instantly.  No flashing light, no shutdown sequence, it just turns off as if I removed power and/or battery.  Turning it on again makes it boot up as if I had opted to reboot.  After a while I got used to just turning the machine off when I didn’t need it, but this is kind of annoying, and I would like to fix it.

Now, first things first.  As you can probably tell from this site I am a GNU/Linux user, and do in fact run Ubuntu on this laptop.  In fact, overall it runs well.  I bring this up because of many suspend issues which have plagued many of the distros, however for about the first year of having this laptop suspend to RAM worked beautifully.  (Hibernate did and still does, but suspend is more convenient.)  But to verify this I tried installing Windows XP (along with the hardware-specific drivers supplied by Lenovo on their site), but encountered the same behavior.  Same with other distributions.

Next, I figured on a lark that maybe this would have something to do with the battery, which when I first noticed this behavior was on its last leg (ie, 20 minutes of power).  I replaced the battery, but this did not help anything.  I tired looking in the BIOS, but couldn’t find anything that suggested a problem.  I tried updating the BIOS, but this didn’t work either.  I even tried alternating the RAM sticks, as well as using only one at a time.  (It is suspend to RAM, so I figured there might be something there.)

So, how about it, anyone else seen this sort of thing before, shutting down cold instead of suspending?  Maybe not even with this particular laptop?  Any ideas, thoughts, something I may have overlooked?  I will try to make something of an effort to look into this again myself, probably starting with running memtest86 on the machine (something which I did not do, and may reveal something more about the memory).  But, I would appreciate any input.  And if I come to a solution, I will of course do my best to report it here, with a nice pictorial guide if applicable.