Replacing the keyboard on my 2020 System76 Lemur Pro lemp9 laptop

I love my System76 Lemur Pro laptop and use it a lot. But the keyboard started dying recently. The F and R keys got really finicky, basically not registering most of the time. If I mashed them really hard sometimes they’d repeat like 15 times. It was not good. I started using an external keyboard just to get by.

I blew the keyboard out with air a few times and I thought it helped at first but the problem came right back.

From what I read online, the keyboard is not readily replaced. It’s integrated into the top case and requires the battery, speakers, and motherboard to all be swapped, with all connections/wires unhooked and then re-hooked. Well I’ve done stuff like that before so I figured I could do it. Better than getting a whole new laptop!

So I put in a ticket to see if they’d help me find the right top case.

My f and r keys are slowly failing on my keyboard. The keys themselves are fine, but pressing them doesn’t work for some periods of time. If I press them like 50 times, sometimes they’ll work. Then, seconds later, they wok o a little while but then they stop woking again (see they ae not woking ight now as I type this). I undestand it’s had to eplace the keyboad on a lemu but I am willing to ty. I have swapped out majo pats o laptops in the past and would eally like this compute to keep woking. Can you help me ind a eplacement keyboad unit o the lemu po 9 that I can install mysel? Thank you.

— Me to System76 support

They explained that they did not recommend I do the repair myself due to the complexity but I insisted. They got the part and shipped it to me for just under $200 shipped (again, better than a whole new laptop). It arrived two days later, which is today!

Before
During
After

I struggled with some of the connectors and ended up leaving the fan connections just on and taking the fan and main board off together. I also left the CMOS battery connected. I popped it all back together and…. it worked! Now it’s a beautiful new top case, feels brand new. I’m very happy with this, and it wasn’t even that bad to swap out. According to the photo timestamps, it took me from 7:09pm to 7:46pm, so 35 minutes.

My mom runs Linux

My mom has used Windows computers since the early 1990s. During a visit in October, 2021, I set her up with a Linux desktop computer as her daily driver, and so far she loves it.

My mom’s Linux desktop

My mom is by no means a computer power user, but she does do most of the basics that people do. Email, zoom, chat, read the news, check the weather, print and scan stuff, watch Youtube tutorials, go on Facebook, etc.

I put all the major programs she uses on the bottom bar using the Dash to Panel extension, including:

Continue reading My mom runs Linux

Making true random numbers with radioactive decay

I plugged my Geiger counter’s audio cable into my oscilloscope just for kicks the other day and saw ~9V pulses coming out when it occurred to me that I could easily read those into an Arduino or Raspberry Pi or ESP8266 microcontroller and respond to them. As a demo, I made a hardware random number generator (HRNG) out of a esp8266.

The project
Continue reading Making true random numbers with radioactive decay

A live polar sun path chart (plus Moon and some planets)

I happened upon a polar sun path chart a while back and really thought it was a great graphic. It shows where the sun goes each day as a function of the seasons. Behold:

The polar Sun path chart for Seattle, WA

For Seattle, you can see at the top that the sun rises in the SE, peaks at 20° above the horizon, and then sets at 4:30pm on the winter solstice. Ugh. But in the summer, it’s up from before 4am to after 8pm, and peaks above 60° . You can make one of these plots for your area over at the University of Oregon’s Solar Radiation Monitoring Lab.

I liked this plot so much that I wanted to take it to the next level and see where the sun is live. In my experience with Python, I’ve grown to expect there to be sweet libraries that can compute stuff like that. Sure enough, there are a few. First, I found pysolar, which is really straightforward, fast, and simple. A few lines of code and I was up and running.

My first polar solar plot, showing an analemma at different times of day from my location.
Continue reading A live polar sun path chart (plus Moon and some planets)

My book showcasing some open-source tools is now available

A teaching fellow at the University of Michigan once asked me if I could provide some career advice to her nuclear engineering students. I started off with basic industry knowledge but soon came upon computers. When hiring people onto a computational physics team, I always expect a certain level of computer-savvy. But it occurred to me that it’s probably challenging for a young student to catch up on all the classic computer goodies. So I wrote a book about them.

My book's cover, made with Inkscape
The book cover

Digital Superpowers hit the shelves of Amazon as an e-book tonight. It covers a bunch of open-source tools in an informal and broad tour, starting simple and building from there. It covers a few computer basics and introduces you to package managers before delving into short and sweet hands-on follow-alongs (and sometimes just drive-bys) with virtual machines, regular expressions, pdf toolkit, TOR, GnuPG encryption, LaTeX, Sphinx, pandoc, graphviz, Imagemagick, GIMP, Inkscape, darktable, Blender, Openshot, Audacity, LMMS, Hydrogen, Mixxx, git, Python, Django, Home Assistant, ESP8266s, Raspberry Pis, and self-hosting (among others).

Try it out and let me know what you think.

Authenticating and populating users in Django using a Windows Active Directory and SASL

I’ve been trying to get some Django stuff running that can securely authenticate users against Windows Active Directory and also populate some info (first/last name, email address, maybe groups etc.). There are lots of resources out there but nothing was fully complete or modern and it took me some figuring/hacking to get it done.

Resources I found include:

  • django-auth-ldap — the normal LDAP plugin. Problem: It does not natively support SASL and simple binds would send clear-text passwords. I think normal people would just activate TLS in this case but I didn’t want to do that
  • A relevant SO post — with an answer linking to a useful snippet that no longer works on recent django versions.
  • django-auth-ldap-ad — Someone’s entire different ldap plugin made specifically for this purpose. But it isn’t being maintained, is GPL-2, and doesn’t work directly in Python 3 or recent django.

Continue reading Authenticating and populating users in Django using a Windows Active Directory and SASL

Multi-room audio over Wi-Fi with PulseAudio and Raspberry Pi(s)

NOTE/UPDATE: After an update this kind of stopped working and I struggled with it a lot. Now I actually recommend using snapcast instead of this solution. It works better!

I moved to a new place and it has more than one room. Naturally, I hooked up the stereo in the living room and tested it like my dad taught me: by playing “Money For Nothing” really loudly. It worked. But wait a minute, there’s an upstairs now… how will I get it playing up there? I could always use the wifi network and raspberry pis to beam audio around. Yeah, let’s do that!

Continue reading Multi-room audio over Wi-Fi with PulseAudio and Raspberry Pi(s)

The Hero Jr. personal robot from HeathKit: a 1984 product way ahead of its time

One of my first memories is a vision of lying near my dad in the basement in the mid-1980s while he endlessly soldered away at some big project. Later, I spent a lot of my childhood messing around with the product he was assembling: a Hero Jr. robot. This was a educational personal robot, intended to be your “friend, companion, and security guard.” Here he is:

Hero Jr. from 3 sides
My family’s Hero Jr.

Hero Jr. has a sonar, infrared motion sensor, light sensor, sound sensor, radio-frequency remote, drive motor, obstruction sensor, and a RS-232 serial port. His out-of-the-box features included a security guard mode, alarm clock, poetry, singing, and (my favorite) the ability to explore around the house, often while singing America, Daisy Bell, or Little Miss Muffet.

Continue reading The Hero Jr. personal robot from HeathKit: a 1984 product way ahead of its time

Secure remote access to a camera DVR with VPN and VLANs on an OpenWRT router

If you have a digital video recorder (DVR) hooked up to some cameras and you want to access it remotely when something happens, you can set up remote access to review things from wherever. Here’s how to do it.

Continue reading Secure remote access to a camera DVR with VPN and VLANs on an OpenWRT router

Getting your Ubuntu 17.04 computer set up for the fast.ai deep learning courses

I’m becoming convinced that Jeremy Howard is right to predict that deep learning is going to be “more important and more transformational than the internet.” If you don’t know who Jeremy Howard is, he’s part of the duo behind fast.ai free and high-quality deep learning course series, which is dedicated to making deep learning accessible to everyone.

Deep learning takes advantage of certain graphics processors (GPUs) to be efficient. If you take the course, it’s recommended that you sign up for an Amazon Web Services machine with an appropriate GPU so you can just run the provided setup scripts and be on your way learning deep learning. But you may want to try to get everything set up on your own machine if you happen to have one. I just built a small server and added a modest GPU just for this purpose so I figured I’d give it a whirl. This is how I did it.

Continue reading Getting your Ubuntu 17.04 computer set up for the fast.ai deep learning courses

Building a NAS server/home server in 2017

I decided I wanted a network-attached storage (NAS) server because I needed some central and safe place to put all my big files. I’ve been using more and more hard drive space because I’ve been taking photos in RAW and collecting more digital video (camera, dashcam, digitized home videos from the 1990s, and drone). I also just enjoy fiddling with servers and stuff and thought I could use a home server for a variety of other things. My raspberry pi has been doing well for my home automation but a bigger server might make it faster. I’m trying to learn Blender and have been eyeing a Machine Learning course. Both of those require a nice modern GPU. Finally, I just enjoy learning things about computers.

Some parts
Some parts

Continue reading Building a NAS server/home server in 2017

Host your own contacts and calendars and share them across devices

I’m trying to learn ways to minimize my reliance upon large companies for handling my day-to-day personal data. So I figured calendar and contacts should be on my list of things to self-host. This post is about how I migrated all my Google calendars and phone contacts to my own server without losing any features I was using. I’m doing this mostly for fun.

My self-hosted calendar in the web client

My self-hosted calendar on the phone

Continue reading Host your own contacts and calendars and share them across devices

Downloading files from an Amcrest security camera with Python

UPDATE 2021: This was fun but nowadays I have to direct people to a more complete python solution here.

I got a few Amcrest Wifi security cameras for my mom’s house at her request. They’re pretty nice overall (My only complaint is that the web-interface doesn’t fully support Linux). I set one up to save a jpg snapshot to memory every minute and then flew across the country. When I wanted to access them, I couldn’t just put the SD-card in a computer or anything, and clicking all 14,000 of them seemed like a pain, so I decided to figure out how to get them with a Python script.

Continue reading Downloading files from an Amcrest security camera with Python

Reading data from a DXL360 digital level onto your computer

There are some digital levels on the market that are really nice tools to have for a variety of purposes. I grabbed a DXL360 and am really happy with it so far. When I wanted to do an angle vs. time calibration measurement of my Barn Door Startracker over 10s of minutes, I really wanted to get the data from the level into a computer so I could plot and process it a bit.

The level has a USB port but the manual suggests that an optional attachment is required to get it into a computer, at least for this model. However, the manual also states that data comes out of it in RS232 format. I bet I could read that data with some more generic equipment that I have sitting around. And it turned out to be easy. This post shows how I did it.

Continue reading Reading data from a DXL360 digital level onto your computer

Making a cheap and simple barn-door star tracker with software tangent correction for astrophotography

I like to mix hobbies, so naturally I’ve been eying astrophotography for a while. I’ve taken a time-lapse here and a moon picture there but, inspired by the folks over at /r/astrophotography,  I wanted to take it to the next level. Since the Earth is spinning, any long exposure of the night sky has star trails, so you have to make your camera counter-spin if you want clear shots. In this post, you can read about how I made a simple barn door sky tracker to do this.

Barn door sky trackers have been made at home by lots of people for a long time. There are a variety of designs with different levels of complexity and precision required. I thought I’d make the simplest-to-construct one, a Haig mount. To correct he tangent error, I decided to use a cheap microcontroller (MCU) and have it speed up appropriately via software. Fun!

With/without tracker

The Math

The math behind this is fun mostly because it’s straight out of high school and you finally at long last get to use it. Here’s the basic design:

Cartoon of barn door tracker

Continue reading Making a cheap and simple barn-door star tracker with software tangent correction for astrophotography

Spam statistics from my email server

I use SpamAssassin on my e-mail server to flag spam messages that come to my addresses. It uses a series of checks on each message and determines a Spam Score. If the Score is above a user-defined threshold, it adds a header that says that it is spam. Then dovecot files it away into a spam folder instead of my inbox. It does a pretty good job but requires tuning sometimes. I wanted to see if I could change my threshold from the default (5.0) without getting too many false positives or negatives. To do that, I’d have to collect some stats from my messages.

Continue reading Spam statistics from my email server

Adding multiple content filters to an email server with postfix and dovecot Pigeonhole/Sieve

A year ago, my friend Laura was wishing that email providers could do some tone filtering and reject messages that are too mean. Since I run my own email server, I thought it might be simple to set something like that up easily. Turns out, it’s not that hard, but it wasn’t exactly trivial to figure out.

My setup

I run have postfix running to receive messages from the internet. It passes them through SpamAssassin, which inspects the messages and adds a few headers that indicate whether or not it’s spam. Then it passes them on to dovecot , which stores the messages in mailboxes and then tells with my email client, Thunderbird, that I’ve got mail. I like this setup because I feel like I have a bit more control over my data. Besides, it’s fun!

The plan

The original request is here shown below. I figure, if I could just have the message go through a second filter after it goes through spamassassin, I could make it a custom script that counts swear words.

Continue reading Adding multiple content filters to an email server with postfix and dovecot Pigeonhole/Sieve

The Infopanel: a simple MQTT-connected display system for weather, traffic, pictures, animations…anything!

I got one of those RGB LED matrix things for my birthday and wasn’t sure what to do with it. Then I found this awesome library which has Python bindings and can control it nicely even from a Raspberry Pi. Conveniently I had a spare Raspberry Pi 1 B+  sitting around so I hooked it up. After playing around for a while, I got the demos working.

UPDATE: Full documentation of infopanel is now available.

But I needed to connect it to home-assistant to really make it valuable to myself. So I wrote a little program called Infopanel (available for free on github) that lets you do some things:

  • Get data directly from a MQTT broker for getting live data (e.g. travel times in traffic, weather conditions) and for command and control. This allows me to connect the screen to my home-assistant home automation system.
  • Assemble various built-in elements like giraffes, animated text, rainbow text, pictures, animated gifs into various scenes that rotate through on the screen to display the information in various fun and/or useful ways.
  • There are Temperature and Duration sprites that you can define high and low values of so they’re red when they’re bad and green when they’re good, and anywhere in between.

You can set the scenes to be just random or you can control them through MQTT.

It’s intended to be very configurable but since it’s brand new some extra development is needed to make everything perfect. Send in your ideas and requests and code changes!

A relatively complete example configuration file is in the repo. That demonstrates using MQTT, connecting MQTT topics to various sprites, building your own frames of animation by hand, and adding in gifs and images from file paths. Note that you have to set an environmental variable or two to get the fonts right and whatnot.

Jeep Cherokee Laredo 1991

Note: This is a thowback post, revitalized from the old partofthething.com where it was posted by me in like, 2004. I took out most last names.

My car:

My car is the ultimate car ever. It’s the greatest thing on Earth. No, really. It is. Sure, sure it’s old but that’s not what matters anymore. It’s the past that counts…and the stereo system. I grew up in this car. Yes sir I did. I always sat in the back right seat driving all over the place since I was seven years old. Usually Tom Petty was playing. you see, it used to be my mom’s car. When she got a new one, it became my sister’s car. And then, it became my car.

Continue reading Jeep Cherokee Laredo 1991