Norns on Raspberry Pi



Why not using a pi compatible usb soundcard?


seems that you could use a very small HDMI screen (since the plug and circuitry is there, why not use it?)

then you need 9 pins for encoders (2 per) and keys (1 per).

the key/encoder DT overlays are easy to modify (just change pin numbers) then you don’t need to write a driver.

yes, USB sound cards have to pipe audio through the USB subsystem which means latency. pisound and norns codec use I2S which put it much closer to the low level guts


is it only the norns-buttons-encoders.dtbo which manages the gpios for the encoders and keys?

or is there another place where the gpio pins get configured (HIGH/LOW IN/OUT)?


Okidoki. Its only this overlay.

To change the pins it’s necessary to convert dtbo in dts

Change that new file and compile to get dtbo again

Happy hacking


ok, finally Ive manage to get the performance I wanted…

this means -p 128 buffer -n 2, and no audio glitches if you use full polyphony on earthsea and flin!

the 3 issues that cause my pain were

  1. pisound was disabling preemption
    to fix, Ive now patched sound/soc/bcm/pisound.c to remove midi/spi (temp solution, but id do no use midi din)
  2. norns-init.service
    was only setting performance governor on cpu0 , so i needed to add cpu1-3
  3. performance governor was being reset back to ondemand, during initialisation.
    I think its another service, so there is an underlying dependancy missing,
    however, for now ive resolved it, by moving the norns-init into a shell script, which waits 1 second before setting the governors, now i can see the performance governor ‘sticks’ :slight_smile:

took a while to figure out, but now the whole thing is silky smooth…

to celebrate ive ordered a rPI3b+ to add a bit more processing power, which the pisound will go on.
(this rPI3 will not miss out, it gets the hifiberry dac+, and the poor old rpi2 gets retired)


would you mind to explain what you did?


created an init script called

echo stopped > /home/we/status.wifi
chown we.we /home/we/status.wifi

sleep 2
echo -n performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo -n performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo -n performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo -n performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

changed norns-init.service to:

we@norns:~ $ cat /etc/systemd/system/norns-init.service 


ExecStart=/bin/sh -c /home/we/ 


the pisound changes are bit involved to post, and as they are temporary im not sure its a good idea to distribute the change - also blokas have said they will take a look at underlying problem in a few weeks, so thats should be fine for most.
(I needed to hack it now, as I needed to ensure this was the cause of the performance issue I was facing)


Yeah - I think it’s this. The SPI pins are not available there, so an SPI OLED is not gonna work.

An i2c OLED would be doable, but you can’t get framebuffer spit out to i2c - so I think that would require a special driver to be written, or reworking the screen output in norns.


Pisound can pass through some GPIO pins.


This is not necessary. Setting governor on any core will change it on all governors.


Do you know which service (?) it was that’s resetting it back to ondemand , I asume this is not happening on the norms hardware


The default CPU governor is specified in kernel config (it’s powersave in stock kernel). It’s being switched to ondemand by the raspi-config service, which is also started on norns hardware but later overridden by norns-init.


hmm, for some reason on my setup raspi-config must be running later…
thanks I’ll look into it.


Anyone willing to upload a working Rpi norns image?


Norns on a hacked up Terminal Tedium (for it’s DAC) with buttons and encoders!


@TheTechnobear: how did you resize the norns display to work on the push display?

Did you rewrite the whole menu?

edit: just saw your previous post about scaling…searched for size and not for scale…lost in translation :flushed:


Anyone an idea why LEVELS does not show up in the menu?



Go to the menu, press key 2 (back)

(Then key3 to exit which always stumps me :wink: )

Btw, my demo video is rendering/uploading so you can see what I’ve been up to


nope that doesn’t work for me :frowning: I just end up with the screen for the script.


when I’m in the menu and press key 2 I get following message in the matron window in maiden:

/home/we/norns/lua/screen.lua:161: bad argument #1 to 's_extents' (string expected, got nil)

here is the part form screen.lua (starting with line 160):

s_text_right = function(str)
  local x, y = s_extents(str)
  s_move_rel(-x, 0)


Ah, that’s caused by not having the battery hardware.
I updated the script to check for nil when no battery is present.