Tue 2019-12-31 20:57

  • Posted:
  • Edited:

I've used PulseAudio on many Linux laptops and workstations over the years, and it usually works so well, so consistently that I've never felt the need to dig around under the covers. It was basically this magical software that I installed and my computer had sound.

Over the holiday break, I had some spare time to tinker and I thought it might be nice to finally put together some kind of audio streaming solution for the apartment. Sort of a "whole house audio" system - without the wiring. I setup a music server running MPD on an older Intel NUC I had sitting in my parts drawer, and NFS-mounted my music library from the NAS. Then I enlisted a couple of old Raspberry Pi 2B's I had sitting around collecting dust, added a USB WiFi adapter to each, and made them my audio receivers to connect to speakers.

The question then was, how to get music from the MPD server to the RPis?

It turns out the answer was pretty simple and - as you've probably guessed already - it involved PulseAudio. Did you know that PulseAudio has a network transport? I didn't. It was time for me to learn some new stuff about an old tool.

First off, because no one would be logged into a desktop session on these devices I had to set PulseAudio on the music server and the RPis to run in system mode. Some tweaking was involved to accomplish this (see the linked docs) and all of the config lines I used below go in /etc/pulse/ rather than /etc/pulse/

For strangers to the innards of PulseAudio, first grasp the basic concept that PulseAudio defines inputs and outputs as "sources" and "sinks". My first step was to create a new fake sink (a "null" sink) to receive the system audio, and transport the audio sent to that null sink (captured by the "monitor" of that sink) via RTP stream to my RPis.

On the server:

load-module module-null-sink sink_name=rtp 
load-module module-rtp-send source=rtp.monitor mtu=1408 destination_ip=[remote IP 1] 
load-module module-rtp-send source=rtp.monitor mtu=1408 destination_ip=[remote IP 2]

On the RPis:

load-module module-rtp-recv sap_address=[local IP]

Well, that was actually pretty simple. I configured MPD to use PulseAudio as an output, restarted both PulseAudio and MPD, and started playing a song in MPD. BINGO! Synchronous streaming audio to the RPis and their connected speakers, and the apartment was filled with music in every room.

I played with this setup for a day or so: adding music playlists to MPD, setting up M.A.L.P. on my phone to remote control MPD, etc. Then I thought, wouldn't it be cool if I could take the output from my SiriusXM receiver and stream that audio to every room, also? It turns out that yes - it is cool. But it was a task not without some challenges to accomplish.

For starters, my NUC didn't have a stereo line-in port so I picked up a no-name $15 USB sound card that did. Then I thought it would be a simple matter of plugging in the stereo out from the SiriusXM receiver to the line-in on the USB card, but nothing is ever that simple. I had to go back to the PulseAudio docs and this time learn about the loopback module, which acts like a virtual mixer.

First, I had to create an additional null sink dedicated for MPD:

load-module module-null-sink sink_name=mpd_out

Next, I had to tell MPD to send its output to that sink (in /etc/mpd.conf):

audio_output {
    type    "pulse"
    name    "Pulse Output"
    sink    "mpd_out" 

Then I had to use pactl list sources to find the cryptic ass name PulseAudio had given to the USB sound card interface, which turned out to be:


Say that five times fast.

Finally, I had to mux the monitor of the MPD sink and the line-in source together by sending them both through the loopback module to the RTP stream sink:

load-module module-loopback source=mpd_out.monitor sink=rtp
load-module module-loopback source=alsa_input.usb-0d8c_USB_Sound_Device-00.analog-stereo sink=rtp

I turned on the SiriusXM receiver and... nothing. The USB sound card has both a mono mic port and a stereo line-in port, and for whatever reason the mic port has a higher default priority and the system preferred it as the capture device. I had to tell PulseAudio to prefer the line-in port instead. While I was at it, I set the volume on the line-in port to normalize it with the MPD output, and made sure the port was not muted:

set-source-port 1 analog-input-linein
set-source-volume 1 15000
set-source-mute 1 0

I restarted PulseAudio and the SiriusXM output started piping to all of the speakers in the house. So cool. Now I have a whole house audio system with a choice of either playlists from my music library or live SiriusXM satellite radio. I think my next project will be to setup an IR receiver/repeater system so I can change the radio station while sitting on the couch in the other room.

Mon 2019-09-23 06:51

In my younger years I remember reading in cyberpunk fiction about the concept of technoshock: a state where technology advances faster than the average person can incorporate it into their lives, causing a sort of psycho-social backlash effect. I figure we're about five minutes from that point because even technologies that are commonplace are apparently beyond the ability of some people to master. Case in point:

For the last six months or so, a woman who likely has a similar name to my own has been using an old Gmail address of mine to do such things as create accounts on clothing retailers' websites and buy plane tickets. Far beyond a one-time mistake, this person has used the wrong email address many, many times, and continues to do so on a regular basis. Setting aside that clearly many websites still don't do email confirmations for new accounts, I guess she should consider herself lucky that I am the recipient of this mistake. My personal code of ethics prevents me from resetting the passwords on her accounts, locking her out, potentially accessing her saved payment and address information, stealing her identity, or in the most recent case - claiming or cancelling her airline boarding pass. The only thing I've done thus far is unsubscribe my own address from those website mailing lists. You'd think by this point she'd start to wonder why she doesn't get the sales announcements, order confirmations, or airline notifications, and realize she had been using the wrong email address all this time. But you'd be wrong.

For another case, there is the gentleman in Charlotte, NC who is apparently confused about his own phone number and for the last few months has been giving out one of my private numbers to apparently every single person he ever meets (based on the volume of calls and texts I get looking for 'Mont'). My cellphone's caller block list now contains nearly a hundred 704 and 980 numbers belonging to people trying insistently and at all hours of the night to reach this fellow. To the point that I now set my phone to Do Not Disturb before going to bed, as it's the only way to prevent waking up to a midnight caller looking for this other person. When I have answered - knowing the call isn't for me - the callers have usually hung up immediately. If the call rolls to voicemail I often receive a succinct, cryptic message like "tryin' to gitcha, holla back quick." I won't conject as to the business 'Mont' engages in, but he certainly keeps odd hours and markets his contact information prolifically. I've considered using a call filter app to forward all calls received on that number from area codes 704 and 980 to 404-893-7000. Seems like there would be potential there for karmic lulz.

But really, phone numbers and email addresses are decades-old technologies, and some people apparently have a problem navigating them successfully. That doesn't bode well for these same folks in the fast-paced, AI-centric, automated, app-driven, technocratic future we're hurtling towards. These people probably already feel like their grasp of the technology upon which they rely is tenious at best. How are they going to feel in another 5-10 years when they (and probably most other people) will no longer have any idea how practically anything works?

Technoshock... incoming.

Wed 2019-08-28 00:12

Have you ever been in a discussion with someone, where they're telling you how to do something and you feel like they're kind of talking to you like you're an idiot. So you draft a lengthy email with screenshots and descriptive text explaining to them that you've tried doing what they said, and as you can see in the screenshots it isn't working. You click Send and recline in your chair with a sense of smug satisfaction at your own vindication that you are not the idiot - they are.

And then... you happen to look at your sent mail and notice in the very screenshot you took that one thing you've been missing and which was there all along but you failed to notice. That one thing that solves your problem. And then the revelation pours over you like a bucket of ice water... you are an idiot. And you just made a complete ass of yourself.

Have you ever had that happen to you? I have. Just now.

Sat 2019-08-24 23:26

Class B motorhomes are nimble and easy to drive, but one of the challenges with Class B's compared with the larger C and A rigs is the much reduced storage space. In particular, there is generally little to no exterior storage. Our Class B has an exterior box for storing the sewer hose (thank goodness), conveniently located under the driver side running board. But beyond that, there are no exterior storage compartments for things like sewer fittings, hoses, electrical cables, etc. And since the roof is covered with solar panels, there's no room for storage up there (and without a built in ladder it wouldn't be very convenient even if there were). So that means a lot of our interior storage space has been eaten up with things that in our previous rig would have gone in an exterior compartment.

Enter the Stowaway2 Max, a hitch-mounted cargo box with 16 cubic feet of space. It's got a locking, weather-resistant lid and the hitch mount is a two-piece unit with a swing away platform for the box. That lets me move the cargo box enough not to interfere with opening the rear doors (though sadly, not enough to let me swing the passenger-side rear door fully to the side locking position). We ordered our Stowaway2 Max last Sunday, it shipped the next day (via FedEx at no additional charge) and arrived on Thursday.

I had a chance this morning to get it installed on the Lula. I was really impressed with the overall construction, and the installation instructions were clear and easy to follow. The whole project took about 90 minutes (in the blazing Las Vegas sun) from unbox to light check. And a lot of that time was spent reading the instructions, and unboxing and unwrapping the carefully packed components. The actual installation took maybe 30 minutes. The only caveats I found would be:

  1. It's a two-person job. The box isn't terribly heavy but it's big and unwieldy. It also requires some careful positioning to line up bolt holes on the box and platform.
  2. Bring your big wrenches. There are some large (1 1/8") hinge bolts to tighten and the little adjustable wrench in the kitchen drawer isn't going to do it. I had to go to the BBT (the Big Boy Toolbox I keep in storage) and get out my large box wrenches and a large Crescent wrench. Everything else was 3/8" or 9/16" and standard sockets did the job.

The electrical was all pre-wired and the only thing I had to hook up was the lighted license plate holder (that's also the only part of the install that required drilling). The included straight-4 connector required an adapter for my 7-round tow outlet, but I knew that in advance and ordered one with the box. Connections were as simple as plugging in the adapter and zip tying the cable to keep it from dangling free.

All said and done, I'm pretty darn happy with the cargo box. It was a little pricey, but it's solidly built and I think it's worth the money. I'm definitely loving all the interior space that box has now freed up. I was able to fit our three utility tubs (one each for electrical components, water hoses and connections, and sewer fittings), two bags of Lynx levelers and a chock block, our 25 foot 30A extension cord, and two large camp chairs all inside the cargo box - with room to spare. The free space inside is great, but it will also be a lot easier doing setup and breakdown with everything in one easy-to-access location. I'm stoked thinking about our next weekender when the weather gets a little cooler.

Stowaway2 Max installed

Fri 2019-08-23 23:30


Microsoft Windows is an absolute ghetto of an operating system. I honestly don't know how people use it as a personal OS. In plainest terms, it just sucks.

I'm currently working a contract for a large multi-national, and like most large multi-nationals their desktop platform of choice is Windows (Windows 10 in this case). So I'm sort of forced by circumstance to be a Windows user for 40 hours per week.

Today, whilst endeavoring to get actual work done my Windows 10 laptop informed me (via the SCCM-controlled Software Center) that "important" updates were required to be installed on my system. I tried to defer the updates until "after business hours" (one of the available options), but Software Center informed me that the updates were overdue and could not be deferred.

Resigned to my situation, I clicked OK and let it begin the updates. I figured it would take a few minutes and I would go get a fresh cup of coffee, maybe an apple. I couldn't do much else, because these updates required practically all useful applications be closed while they were being installed.

FOUR HOURS LATER the updates finally finished and the system performed a couple of reboots. And at the end of the last one I was presented with this truly heart-warming message:

Windows failed to start. A recent hardware
or software change might be the cause.

Really... no shit.

The boot process skipped right over the full disk encryption login so I'm going to guess some OS update nuked the UEFI or boot config. And obviously since the disk doesn't get decrypted, Windows can't boot from it. Which leaves me (a remote contractor hundreds of miles from the closest corporate tech center) SOL.

But you know what? It's not my machine and I don't even have admin privileges on it, so there's not much I can do about the situation other than wait until Monday morning and call the support desk for assistance. Hopefully they have some trick to restore the UEFI/bootloader without having to re-image the machine. It's taken me weeks of wading through corporate bureaucracy to get it setup with the tools I need to do my job. The last thing I want is to have to start over. Losing half a day of productivity to updates was bad enough.

Here's the thing. This is Windows 10, the current shipping version of a 33 year old platform commercially produced by a multi-billion dollar corporation. Yet they can't figure out how to update a computer without breaking it so badly it won't boot?

My personal systems run openSUSE, a Linux distribution largely run by volunteers, comprised of Free Software largely written by volunteers. Not only do my Tumbleweed systems update hundreds (sometimes thousands!) of packages every week in 15-20 minutes -- if something goes wrong with the update it's dead simple to rollback the update to the previous working state.

I don't know exactly what Microsoft has been doing with their billions but I suspect the money is not being spent engineering better desktop computing environments.


Sat 2019-08-10 18:01

  • Posted:
  • Edited:

Looking over at my #FOSScan this morning, I saw it was almost overflowing. Time to count it up and make some FOSS donations!

The change collected amounted to US$47.52 (not bad for about 10 weeks worth!). I put two pennies back to seed the can, rounding to a nice US$47.50. Donations made today:

Do you have a #FOSScan of your own? If not, eat a can of soup (or beans, veggies.. whatever), make your own #FOSScan, and start collecting spare change for Free Software and related projects today! Together, we can make a difference in Free Software funding.

Sat 2019-08-10 16:16

There's an interesting piece on Scientific American about the effects of social media on society and our collective social connections. I thought this bit summed it up nicely:

This is the new norm. We’ve been fooled into believing we’re more connected, informed, productive, creative and happy. But in reality, this kind of social reciprocity eats away at our norms and values, and rebuilds them in harmful ways. As a former Facebook executive put it, “The short-term, dopamine-driven feedback loops that we have created are destroying how society works.”

Sun 2019-07-21 19:12

It's so nice to live in a technological age where we can have an 8-outlet powerstrip that can only accommodate the plugs of three devices.

Wed 2019-07-17 20:31

While really more of a hipster virtue signaling piece, this article about giving up TV for a month piqued my interest. Mainly because I did sort of the same thing over a decade ago and saw somewhat similar results. To be clear - I didn't "give up TV" as in I ceased to watch all video entertainment or educational content (which seems to me akin to neo-Luddism - let's just pretend it's 1920 and video isn't a thing).

What my wife and I did was to give up watching broadcast television, cancel our cable TV subscription, and stopped watching any streamed video content with advertising.

Now, I don't think that video content itself is necessarily unhealthy, although I would agree that video doesn't exercise the imagination in the same way that non-visual content can. Personally, I think the problem with TV is a combination of two elements:

  • Channel flipping and the proliferation of junk content. Back in the day of three major networks and maybe one or two local channels, your choice of TV content was much more limited. You cycled through four or five channels (maybe twice) and if there was "nothing on" you turned off the TV and did something else. Generally we look at choice as being a good thing - we want choices. But with tens of over-the-air channels available now in most areas and hundreds of channels available to cable subscribers, flipping through the dial can keep you busy for hours looking for something to watch. When you don't watch broadcast TV, viewing content becomes intentional. You are there to watch a particular show or shows, not whatever's on. Not to mention, with all of those channels there are still 24 hours in a day and the networks need to fill the air with something. Which means any old garbage finds a home in one timeslot or another and there is no shortage of mindless, cheap-to-produce junk food programming.
  • Pervasive, insidious, and manipulative advertising. When you take the slick packaging off of it, advertising is mind control. The purpose of advertising is to change your behavior: to make you buy something you would not have otherwise bought, go someplace you wouldn't have otherwise visited, or do something you wouldn't have otherwise done. If your reaction to that notion is "wait, that's not true..." consider for a moment: if you would have otherwise bought, visited, or done that thing anyway - why would some company pay to show you an ad? Doing so would be squandering their profits. The ad industry deliberately uses the term "conversion" to describe a person being convinced by an ad to do a thing. If you've been "converted" then by definition your mind has been changed - implicitly, against your will.

So I agree with the linked article's suggestion: quit watching TV for a month. Even if only to detox your brain from advertising and addictive programming. If you watch broadcast (or even non-premium cable) TV channels everyday, you're probably accustomed to the ads. You've become desensitized to it. Give up broadcast TV for 30 days and then come back and watch it again. The amount of ads, and their intrusive and offensive nature, will blow your mind. Having now become re-sensitized to it, you'll probably ask yourself "how on Earth did I ever sit through this crap before?"