Remote controlling an NAD C 320BEE amplifier #jukebox

🕞︎ - 2021-07-14

For my jukebox I'm using an old(ish) NAD C 320BEE amplifier, which works fine except for one thing: when it is powered on, it starts up in "sleep mode", with no input selected and buzzing speakers.

Quite annoying, because I would like the Raspberry Pi to turn on the amplifier and (active) speakers when the jukebox is unpaused and turn them off when the sound is paused, using one of those nifty usb relays.

I noticed that the amplifier has an "IR in"-socket, so I started wondering if that could be used to control it.

And it can!

After looking at Pete Shadbolt's configuration (thanks!), I did this:

  • Installed lirc on the Raspberry Pi: sudo apt install lirc.
  • Configured /boot/config.txt adding the line dtoverlay=gpio-ir-tx,gpio_pin=22 to enable the gpio-ir-tx module and select the relevant pin
  • Changed /etc/lirc/lirc_options.conf with driver = default
  • Added /etc/lirc/lircd.conf.d/nad_sr712.conf from lirc's list

I found an old audio cable with a 3.5 mm jack in one end, and soldered two jumper wires to it, and connected the center of the jack to pin 22 on the Raspberry Pi and the top of the jack to a GND pin.

After rebooting the Raspberry Pi, I can now run commands like this:

jukebox:~$ irsend SEND_ONCE NAD_SR712 Input-Aux
jukebox:~$ irsend SEND_ONCE NAD_SR712 KEY_VOLUMEDOWN
jukebox:~$ irsend SEND_ONCE NAD_SR712 KEY_VOLUMEUP
jukebox:~$ irsend SEND_ONCE NAD_SR712 KEY_MUTE
jukebox:~$ irsend SEND_ONCE NAD_SR712 KEY_SLEEP

and the amplifier reacts. At least it does if I don't send them in too close succession.

To wake up the amplifier when I turn on the power, I have added a file /etc/systemd/system/amplifier.service with this in it:

Description=Set up amplifier

ExecStop=/usr/bin/irsend SEND_ONCE NAD_SR712 Input-Phono


And in the setup_amp script, I have:


sleep 4s
sleep 4s
irsend SEND_ONCE NAD_SR712 Input-Aux
sleep 4s
irsend SEND_ONCE NAD_SR712 Input-Aux
sleep 8s
irsend SEND_ONCE NAD_SR712 Input-Aux

As you can see, some fiddling with timing (and retrying) is prudent. And it works!

Dragons of Spring Dawning (1985) ★★★☆☆ #books

🕤︎ - 2021-07-12

I finished volume 3 of the Dragon Lance Chronicles trilogy, Dragons of Spring Dawning, recently - after reading volume 2 some time ago.

The last book of the trilogy continues in the same style as the second - it reads like an epic AD&D-session. It's fun, varied and full of clichés, some of course aimed at your tear ducts - and it finishes the storyline in an appropriately grand way.


This one also says $3.50 on the cover - no Danish price sticker, and no notes from when I read it the first time on the pages.

Annoying tropes in computer terms #computers #language

🕘︎ - 2021-07-11

One of tropes in discussions about computer storage I think is the most annoying: "RAID is not backup". Stop saying it as if it is some profound, complicated insight you hold. It's not, it's plain as day. Of course redundancy is not the same as a separate, immutable copy. Come on.

Latest example: "Simplest is to understand RAID is not a backup" Seagate Barracuda Ramp Weakness on Hacker News.

The Ubuntu podcast #podcast

🕘︎ - 2021-07-10

I have been listening to the Ubuntu podcast for quite a while. Sometimes it has been hilarious - the first episodes where the Wing Commander appeared spring to mind - and sometimes "just" interesting talk.

In this weeks episode they shilled Microsoft VSCode and Microsoft Edge, and argued the advantages of the proprietary snap store by Canonical. I mean, diversity is fine and to each their own, but what is next? Advocating switching from Ubuntu to Microsoft Windows 11 and Microsoft Windows Subsystem for Linux?

Maybe it's just time for me, here in season 14, to take a break from the Ubuntu podcast.

$ hpodder disable $(hpodder lscasts | grep 'Ubuntu Podcast' | awk '{ print $1 }')
$ hpodder lscasts | grep 'Ubuntu Podcast'
65     0/272 [disabled] Ubuntu Podcast – Ogg

Dragons of Winter Night (1985) ★★★☆☆ #books

🕕︎ - 2021-06-28

As mentioned recently I switched to volume 2 of the Dragonlance Chronicles, after re-reading the Legends volume 1.

The story in this volume is more engaging and has the feel of an AD&D campaign, with the group of heroes splitting up and going on separate adventures. It has among other things an absentminded old wizard, a visit with the ingenious technically inclined gnomes, a battle with dragons, and a solemn funeral.


I was wondering previously why I didn't have volume 1, but I can see on the first page that I have written in pencil "Bog 3 (på dansk)" - book 3 (in Danish). So I probably read volume 1 as book 1 and 2 in Danish, and only then switched to the English ones. On page 206 I have pencilled "Bog 4 (på dansk)".

On the back of the book the price sticker reveals it was 45,50 DKK - the front says $3.50 - so 45¢ cheaper than the chronicles book!

Inside the book I also added translations of some of the words I didn't know at the time and looked up:

  • trial: prøve, undersøgelse, rettergang
  • tenous=tynd
  • coveted=eftertragted [sic]
  • insubordination=ulydighed
  • vacancy=tomhed, mangel
  • yuletide=juletid
  • stern=streng
  • pledge=pant, garanti, løfte
  • nostril=næsebor!


🕕︎ - 2021-06-19

When the temperature looks like this, as it does today:

It is time to mix up some apfelschorle and drop some ice cubes in there:

A good companion for the ZuriHac 2021 streams.

Switching off "discrete graphics" #computers #gpu

🕥︎ - 2021-06-13

Around a year and a half ago I treated myself to a Lenovo ThinkPad X1 Extreme Gen 2.

The screen looked alluring - OLED, 3840x2160 - and I was happy with my previous Lenovo ThinkPad X1 Carbon Gen 3, so why not?

They are quite different: the X1 Carbon is light and not much wider than the keyboard, while the X1 Extreme is larger and heavier. That's the way it has to be, going from 14" to 15".

One thing I did not consider was that the new laptop has a "hybrid graphics" setup - it has a "basic" integrated Intel 630 GT2 GPU for saving power and a more "powerful" Nvidia GeForce GTX 1650 Max-Q GPU for heavy lifting - and it is supposed to switch between them seamlessly.

When I got the machine I had some problems using the hybrid configuration, so what I ended up doing was to configure the laptop to use "discrete graphics" in the BIOS and installing the proprietary Nvidia drivers. This means that the Nvidia GPU is used all the time.

This also meant that battery life was quite bad - on the X1 Carbon it was good enough for me not to notice around the house, but with the GPU running full tilt on the X1 Extreme, it was between 2 and 3 hours. Not critically low, but not impressive either.

Another thing started to happen recently: the laptop got too hot to hold in a lap. Kind of annoying. I ran powertop --autotune and often used cpufreq.set --max to throttle the CPU to 0.8 GHz. That helped a little on the temperature, but the lack of speed was kind of annoying in some circumstances, especially in Emacs displaying a lot of pictures. Definitely noticable. I started looking at new laptops, but stopped when I realized how new this one is.

A couple of days ago I read a blogpost "Laptop review: ThinkPad X1 Extreme (Gen 2)" which mentioned using only the Intel GPU, and turning off the Nvidia GPU by telling the kernel to remove it from the PCI bus, saving power. Interesting!

At first I tried disabling the proprietary Nvidia driver, but I didn't manage to, so instead I purged the package altogether, thus using the Intel GPU only, and added the commands to remove the Nvidia GPU from the PCI bus to my startup script.

What a difference!

The problems that made me go discrete graphics only are gone (they must have been ironed out during the last 1½ year), and now I get 4-6 hour battery life instead. Best of all: the laptop doesn't get hot enough to scorch my legs any more. Yay!

Lille langebro


George Bernard Shaw (165).

Carl Gustav Jung (146).

FBI (113).


George Bradshaw (221).

Jesper Holm (44).


d-a-d.com (24).