ah interesting audio group is there… and we is part of it.

so your just missing the rt permissions for audio group, either do the edit I had above,
or I think you can copy


into
/etc/security/limits (?)

I really should go get my rPI as see how its setup :wink:
… but any of the things ive said above should work.

1 Like

I’ve used
sudo vi /etc/security/limits.conf

@audio - rtprio 95
@audio - memlock unlimited

sudo adduser we audio 

Even twice, so we@norns : ~ $ sudo adduser we audio

The user we' is already a member ofaudio’.

Now the export JACK_NO_AUDIO_RESERVATION=1
**we@norns** : **~ $** jackd -R -P 95 -d alsa -d hw:iConnectMIDI2 -r 48000 -n 3 -p 256 -S -s

seems to work.

The in norns-jack-service I’ve replaced hw:0 by the name of the soundcard ExecStart=/usr/bin/jackd -R -P 95 -d alsa -d hw:iConnectMIDI2 -r 48000 -n 3 -p 256 -S -s

And the audio engine error seems to be gone…

1 Like

Oh I see. Well everything seems to be OK now. Of course I will have to test the audio and midi etc, maybe I’ll find other permissions errors with Maiden (’?) but yes I think it’s fine :smiley: Thank you very much for your help !

1 Like

nah, maiden is fairly straightforward to run…

what id recommend with maiden though, is don’t bother building it…
its a whole load of tools, so unless your planning on actually changing its not worth the hassle (imo)

just download the latest norns update, unpack it , and copy the maiden directory in the update to ~/maiden

anyway, good luck with it, hope you enjoy it - and posts some video/music when its all working :slight_smile:

EDIT:
btw, perhaps have a chat with @okyeron about any extra steps or bits that were unclear in the instructions, perhaps together you can improve them.
for my part, I’ll try to remember to add the udev rule file to my push2 fork, and some ‘extra setup’ instructions for that part.

would be great if we can continue to improve, so for every new user its a bit easier…

(though perhaps I should just take the hit, and create an image that others can just dump on to an sdcard :wink: )

2 Likes

Yes, of course I’d be pleased to help ! :slight_smile:

I’m testing the audio now, everything is OK, I’m really glad the IconnectMidi2+ works with Norns on RPI
(I should use a larger buffer than 256, there are some occasional glitches) Thanks again :slight_smile:

1 Like

when its running, check that the scaling governor is set to performance.
it should be, but if for some reason its not, this will cause lots of glitches.

> cat cpu0/cpufreq/scaling_governor

should say performance, not ondemand!
see

I thought the glitches were caused by the audio interface ( a problem with the clock or something…) but …

**we@norns** : **~/norns $** cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

ondemand 

Maybe I did something wrong when I recompiled the kernel ? That’s weird because I remember that I did the following :

cd linux
KERNEL=kernel7
make bcm2709_defconfig 
configure

make menuconfig
update the following

Kernel Features —> Timer Frequenecy —> 1000hz
Kernel Features —> Preemption Model (Preemptible Kernel (Low-Latency Desktop))
CPU Power Management —> CPU Frequency scaling —> Default CPUFreq governor (performance)

08

But it goes back to Ondemand when I reboot even if I use

systemctl disable raspi-config (as mentioned in the link you posted)

i didn’t do it this way :slight_smile:
(as there may be settings you still want active from the raspi config )

I change ~/init.sh to have this at the bottom

echo -n performance >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

bare in mind I was the first to get norns working on rPI3, so somethings were not as clear at that time,
also, I was more interested in the development of the push2 for norns, than an exact replica image of the norns hardware :wink:


talking of which , Ive just noticed that the norns-init service has it

hmm, my norns-init service actually calls ~/init.sh,
probably goes back to me messing about with it in early days :wink:
(and i didn’t want all these redundant, for me, i2cset , as they are no relevant for non-norns hardware)

1 Like

I’ve tried to put
echo -n performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
in init.sh but I think the script is ignored.
Other thing I’ve tried

sudo apt-get install cpufrequtils
sudo cpufreq-set -r -g performance

It’s weird that it’s also ignored if it’s in norns-init.service :thinking: I should try to do the setup of norns-image again

yeah, unfortunately if you look back in this topic, you’ll see I had noticed the same…

in fact my hack was to do the following.

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

so that whatever was resetting it finished running before norns-init completed.

i was told rasps-config was setting it but norns-init was changing it back, but that didn’t quite make sense, since it appears rasps-config was running after norns-init, or possibly in parallel
probably the correct solution is to put a dependancy on norns-init to raspi-config, so the order is guaranteed.

btw: (more for others) I did publish, some crib notes on all of this: (again in this topic)

1 Like

ok, I fixed it properly now :wink:

so i changed
/etc/systemd/system/norns-init.service

so the top few lines read:

[Unit]
Description=norns-init
After=raspi-config.service

this means the norns-init service is only run AFTER raspi-config is run, and so when it sets the performance scaler it doesnt get overridden again :wink:

I don’t know why this isn’t needed on the norns hardware, perhaps they ditched the raspi-config service, I don’t know without seeing an image.

I’ve re-enabled raspi-config and I’ve made the modification in /etc/systemd/system/norns-init.service

[Unit]
Description=norns-init
After=raspi-config.service

But it’s always Ondemand :sweat: Do you think it could be a permission issue once again ? How do I know if this norns-init.service is called or executed ?

try
sudo systemctl daemon-reload
and then reboot…

whats running? - use systemctl

(btw: just added some extra notes to my crib sheet about using systemctl for logs etc)

journalctl -u norns-init.service -b
will tell you if it ran

Im a bit confused where your at really,
Id put back the original norns-init.service, get rid of all the i2cset commands, and add the AFTER clause as above. , then it should be ok.
EDIT: ok, this is what ive just done, so that my image is closer to the norns image, and it works fine :slight_smile:


that said, … what confuses me though, is disabling raspi-config should have also worked… unless something else is setting it ?!

Yes, that’s strange indeed.

Here’s the result of systctl , norns-init.service failed to load

There’s a problem with the Mixer. I’m gonna comment out this line too, I don’t think I did…

Norns-init.service is loaded without error now, but as soon as I add

it is not loaded anymore

yeah, I comment this out it’s not needed,

it might be its quitting after that, before getting to the final line :slight_smile:

btw: you wont see norns-init.service in systemctl if its works, as its just a dependency
you’ll to use
systemctl -a

and you’ll see it show us as loaded/inactive/dead - this is correct since its starts, and then quits

1 Like

Exact, it’s here in systctl -a loaded/inactive/dead and
norns-init.target is not-found inactive dead I don’t know if that’ s normal

The scaling governor is still set to ondemand

what do you get if you type
systemctl status norns-init.service

you should get something like



● norns-init.service - norns-init

Loaded: loaded (/etc/systemd/system/norns-init.service; enabled; vendor preset: enabled)

Active: inactive (dead) since Sat 2018-11-17 18:06:00 CET; 13s ago

Process: 415 ExecStart=/bin/sh -c /bin/echo -n performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor (code=exited, status=0/SUCCESS)

Process: 413 ExecStart=/bin/chown we.we /home/we/status.wifi (code=exited, status=0/SUCCESS)

Process: 409 ExecStart=/bin/echo stopped > /home/we/status.wifi (code=exited, status=0/SUCCESS)

Main PID: 415 (code=exited, status=0/SUCCESS)

Nov 17 18:06:00 norns systemd[1]: Starting norns-init...

Nov 17 18:06:00 norns echo[409]: stopped > /home/we/status.wifi

Nov 17 18:06:00 norns systemd[1]: Started norns-init.

here you can see things executing, and that they were done successfully

Yes I get the same thing

Oh wait, no it’s not the same

Loaded: loaded (/etc/systemd/system/norns-init.service; disabled; vendor preset: enabled)

And it’s hard to tell if raspi-config has been executed before

unfortunately its not required… I just tested, its automatically started because the other norns services.
it works if its disabled.

but Ive just double checked, if I remove the AFTER clause, mine goes back to ondemand, so for me, this is definitely fixing it.

are you using
sudo systemctl daemon-reload

after you change things, as i think systemd caches things

Yes I used sudo systemctl daemon-reload and just to be sure , I I’ve checked again