home Sonstiges Linux OpenBSD Links

small hints for the Raspberry Pi

Following hints are for use under the Raspbian operating system. Please keep in mind that you must use sudo to edit system config files. The default Raspbian user is pi with the password raspberry.

Enable IPv6

Edit /etc/modules Add ipv6. After next reboot IPv6 is enabled.

Change video resolution

Sometimes it is necessary to set a fixed video resolution. You can do this via the file /boot/config.txt For setting the resolution to 1024x768 60 Hz add hdmi_group=2 and hdmi_mode=16. For a complete overview of all modes see here and here.

Add MPEG-2 and VC-1 codecs

After purchasing the licenses (via Raspberry Pi Shop: MPEG-2 and VC-1), you have to edit /boot/config.txt Add following two lines and replace 0000000000 with your license keys:
Reboot the Pi

Verify MPEG2 and VC-1 license status

Use the vcgencmd command to check:
pi@raspberry ~ $ vcgencmd codec_enabled MPG2
pi@raspberry ~ $ vcgencmd codec_enabled WVC1

Disable swap

Execute sudo update-rc.d dphys-swapfile remove After the next reboot there is no swap anymore.

Update firmware

Execute sudo rpi-update and reboot.

Update Raspbian

Execute first sudo apt-get update and then sudo apt-get upgrade

Install software via apt-get

sudo apt-get install SOFTWARENAME
good to have: mlocate, joe
for DVB: vlc, mplayer, dvp-apps, w-scan

Search for software

apt-cache search TEXT

Overview of installed software

apt --installed list

Check CPU temperature

pi@raspberry ~ $ vcgencmd measure_temp

Install Hifiberry DAC+

Edit /boot/config.txt Add:
Remove the onboard sound card by commenting (add a #) snd-bcm2835 in /etc/modules
If you have a newer Raspbian, you must disable the onboard sound card already in /boot/config.txt (comment the line dtparam=audio=on):
Create the ALSA config file /etc/asound.conf and insert the following lines:
pcm.!default  {
 type hw card 0
ctl.!default {
 type hw card 0
The official Hifiberry install guide says that you should blacklist i2c-bcm2708 in raspi-blacklist.conf. When I did this, the Hifiberry never worked. So I ignored that part of the official install guide.


Get Hifiberry and DVB-C usb stick Hauppauge 930C working together

Both devices run in a conflict. To avoid this, create a modprobe rule. Create the file /etc/modprobe.d/sound-cards-order with the following content:
options snd_soc_hifiberry_dacplus index=0
options em28xx index=1
This tells modprobe to load first the driver for the Hifiberry DAC+ and then the DVB-C stick driver. After the next reboot you should see the Hifiberry DAC+ as active sound card. To verify:
pi@raspberry ~ $ cat /proc/asound/cards
 0 [sndrpihifiberry]: snd_rpi_hifiber - snd_rpi_hifiberry_dacplus
 1 [Em28xxAudio    ]: Em28xx-Audio - Em28xx Audio
                      Empia Em28xx Audio
pi@raspberry ~ $ aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: sndrpihifiberry [snd_rpi_hifiberry_dacplus], Gerät 0: HiFiBerry DAC+ HiFi pcm512x-hifi-0 []
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0

Navolabs PoE hat

The Navolabs PoE hat is an alternative PoE hat for the Raspberry Pi 3 Model B+. Here are some pictures:

zurück zu Sonstiges
Letzte Aktualisierung dieser Seite: 23. März 2019