From http://sjoerd.luon.net/posts/2015/02/debian-jessie-on-rpi2/

Download images at https://images.collabora.co.uk/rpi2/

unpack gz and flash image to sd card: sudo dd if=/path/to/image.img of=/dev/sdX

(bmaptools seems cooler but doesn’t work on ubuntu 14.04)

Start the pi and login. User: root, pwd: debian

Create regular user and switch to it:

Expand image on sd card: http://raspberrypi.stackexchange.com/questions/499/how-can-i-resize-my-root-partition

Make audio work

Governor fix

Add Jessie repositories for contrib and non-free.

nano /etc/apt/sources.list
deb http://ftp.debian.org/debian jessie main contrib non-free
apt-get update

Identify your hardware:

apt-get install usbutils
lsusb

My wifi showed up as realtek RTL8188CUS

Install firmware:

apt-get install firmware-realtek

If not sure, use a sledgehammer to crack a nut:

apt-get install firmware*

Configure the network

apt-get install wicd-curses
wicd-curses

Highlight your ssid and tap right-arrow. Enable “automatically connect to this network”, enter the secret key and tap F10 to finish. Highlight wired networks and tap (uppercase) D to disconnect. Highlight your ssid again and tap Enter to connect. Tap Q to exit.

Check for a connection:

ping bbc.co.uk

Reboot to check persistence ie that interface comes up automatically.

You may wish to install ssh in order to run headless.

apt-get install ssh

the config for /boot/config.txt has been moved to /boot/firmware/config.txt

in now could manage to get the newest firmware and ACT led is working. For a quick solution I installes andrew Hessets udate script which is in Rasbian and can be started with “rpi-update” To install the script please type or copy this commands in a terminal

If not installed already install git :

root@jessie-rpi:~# apt-get install git

root@jessie-rpi:~# wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update

root@jessie-rpi:~# sudo rpi-update

Now the script has written the new files to ./boot directory but we need them under .boot/firmware

you have to move now all new files from ./boot to ./boot/firmware.

First you need the alsa-utils:

apt-get install alsa-utils

Configure the output to go to 3,5mm jack:

amixer cset numid=3 1

Than load modprobe:

modprobe snd_bcm2835

If all is done you should have sound on 3,5mm jack.

If you want sound on hdmi outut:

amixer cset numid=3 2

For (my) reference, I have been able to successfully run outofthebox omxplayer (omxplayer_0.3.6~git20150319~7c752d3_armhf.deb) after installing the following :

libraspberrypi0:armhf 1.20141219-1~nokernel1.co1+b3
libraspberrypi-bin:armhf 1.20141219-1~nokernel1.co1+b3
(and of course the omxplayer dependency)

gpu_mem=192

I wonder when the latest firmware that supports gpu_mem_1024 is going to be released on the repository ? Working great !

I had the same Problem, that overclocking did not work after installing debian jessie.

This can be fixed by setting:

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

echo ondemand > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

echo ondemand > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

in /etc/rc.local


We will follow the “Installation on low memory systems” guide.

Get a Minimal installation cd here:
https://help.ubuntu.com/community/Installation/MinimalCD
(I’m going to use 11.04 – natty)

Burn a cd or create a bootable usb disk. In the latter case, you will need unetbootin, since the usb disk creator shipped with ubuntu will not work with alternate install cd’s.

Perform a “command line” installation. I chose the expert mode, to keep trace of the possible choices. Remember that you’ll need internet connection to download the packages. The alternate installer seems to be able to recognize my wi-fi card, but not to use wpa encryption, so i used ethernet connection.

For the filesystem you can choose both ext3 or ext4, and check the “noatime” option. When asked, choose for no automatic updates. Don’t install any desktop environment and/or login manager. We will install only what’s strictly needed.

Natty’s command line installation is affected by a bug that will not let you see the terminal’s login prompt. I will try the method to fix this, but in the meanwhile you just have to press Alt+F1 to switch to the first tty and be able to login. Use “sudo loadkeys it” to change your keyboard layout (where “it” is my language). This is not persistent, but for now it’s ok.

Let’s install:

Xorg: sudo apt-get install xorg
Services manager: sudo apt-get install sysv-rc-conf
Window manager: sudo apt-get install openbox obconf openbox-themes
LXDE stuff: sudo apt-get install lxpanel pcmanfm lxappearance lxsession lxde-common lxmenu-data lxrandr lxshortcut
Base applications: sudo apt-get install leafpad epiphany-webkit synaptic lxterminal epdfview gpicview

Let’s start disabling some services, running “sudo sysv-rc-conf”. I disabled:
apparmor, dns-clean, pcmciautils, pppd-dns, rsync

for some services you should delete their “.conf” file in /etc/init. I just renamed them adding “.disable” to the file name, so it’s easy to revert back. I disabled: cron, atd, apport.

To start the X server, we will use lxsession. You can choose what to start editing the file /etc/xdg/lxsession/LXDE/autostart . I left only lxpanel and pcmanfm into mine, and added a command to set my keyboard layout:

@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
setkbmap -model evdev -layout it

And also removed all the .desktop files from /etc/xdg/autostart folder.

NB: you could also avoid using lxsession and just create a “.xinit” file in the home folder with the application you want to start. This file will overwrite any of the settings you made for lxsession. In this way you can start even less processes, but the method seems to me less “clean” (for example, i haven’t found a way to exit the x session cleanly yet).

If you want to get auto mount of usb disks and cd’s, you can use udev. Be sure udisks is installed, then create a new rules file. I have taken mine from the italian arch wiki. I installed pmount and created the file /etc/udev/rules.d/11-automount-with-pmount.rules and added these lines in it:

KERNEL!="sd[a-z]*", GOTO="media_by_label_auto_mount_end"
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="media_by_label_auto_mount_end"

# Individua l'etichetta
PROGRAM=="/sbin/blkid -o value -s LABEL %N", ENV{dir_name}="%c"
# utilizza basename per to gestire etichette come ../mnt/foo
PROGRAM=="/usr/bin/basename '%E{dir_name}'", ENV{dir_name}="%c"
ENV{dir_name}=="", ENV{dir_name}="usbhd-%k"

ACTION=="add", ENV{dir_name}!="", RUN+="/bin/su YOUR_USERNAME -c '/usr/bin/pmount %N %E{dir_name}'"
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/su YOUR_USERNAME -c '/usr/bin/pumount /media/%E{dir_name}'"
LABEL="media_by_label_auto_mount_end"

Remeber to replace YOUR_USERNAME with your usernameĀ šŸ™‚

After this, i removed al the packages related to gvfs, since they don’t seem to be really needed anymore.

Now you have a minimal but working operating system… with no audio at all! We’ll install all the audio related packages only after setting up the external repositories we need. We’ll see this in the next post.


Ok, i’m starting this memo/auto-tutorial on how to optimize ubuntu for a realtime audio experience. I will use ubuntu 11.04 natty narwhal on a HP compaq nx6110, with an Edirol FA-101 firewire soundcard. I will go through the following steps:

1) Installing a minimal operating system
2) Installing kernels and audio related software
3) Making JACK run with firewire soundcard
4) Tweaking the system for realtime optimization
5) Using RTirq for advanced tuning
6) Setup ladish studios to load and connect multiple applications
7) Making a list of useful audio apps

My references are the ubuntu and linuxmusicians forums, plus several web resources. Among them i remember:

Paper from LAC2011 by Jeremy Jongepier
Stefano Droghetti audio production tutorial [in italian]
Linux musicians wiki: system configuration
Ubuntu studio preparation tutorial