Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

PC Based Computer music servers, crossovers, and equalization

Ubuntu Server 18.04 on Raspberry Pi 3B+
Ubuntu Server 18.04 on Raspberry Pi 3B+
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 14th February 2019, 03:31 PM   #1
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Default Ubuntu Server 18.04 on Raspberry Pi 3B+

I use Gstreamer as my DSP processing platform under Linux. Raspbian has been lagging badly behind in terms of keeping software in the OS current. Under Raspbian Gstreamer is version 1.10x while 1.14x is the most current stable version and has been out for months.

I recently picked up the latest Raspberry Pi hardware, the 3B+, so I thought I would see if I could install a more mainstream linux distro. I usually use the Pi headless (no monitor) so I don't need a GUI or desktop, etc. I discovered that the latest LTS release of Ubuntu, 18.04, is available in a "server" version that is headless and comes as a precompiled image for the Pi 3. This means, just like Raspbian, you can download it, put it on a SIM card, and you are up and running in minutes. Wow, that is great, and now I have Gstreamer 1.14.1 at my disposal. I thought I would share this news here, since I know some of you may be interested.

You can get Ubuntu Server 18.04 for the Pi 2 and 3 here:
Ubuntu-18.04.2 LTS (Bionic Beaver)
It's listed under the section called "Preinstalled server image" near the top of the page.


You will need to unzip the xz file first. I used WinZip on my Windows machine. Then I used a disk imager (Win32DiskImager) to load it on a 16GB class 10 sim card via a USB-->SimCard adapter.

For the first boot, username and password are both "ubuntu" and you should be prompted to change the password. This is an administrator account, and sudo-ing does not require you to re-enter the password. Connect the Pi via an ethernet cable and so some updating. You should run
Code:
sudo apt update
sudo apt upgrade
Remember, this is a command line only server version of Ubuntu. It doesn't even include ALSA at boot up, so you need to install that if you want to do anything audio related. Try:
Code:
sudo apt install alsa alsa-tools alsa-utils
I'm currently using a USB ADAT adapter plus an ADAT AD/DA unit to simultaneously run 8channels of 24bit audio at 48kHz in and out of the Pi using Gstreamer. HTOP shows that the Gstreamer CPU utilization is only about 1-2% for each of 4 threads. I can add on top of this LADSPA processing and implement a multi-way DSP crossover with plenty of CPU horsepower to spare.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins

Last edited by CharlieLaub; 15th February 2019 at 03:25 PM.
  Reply With Quote
Old 14th February 2019, 04:07 PM   #2
Davey is offline Davey  United States
diyAudio Member
 
Join Date: Dec 2001
Location: Bremerton, WA.
Very good. Thank you.

Dave.
  Reply With Quote
Old 14th February 2019, 05:56 PM   #3
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Still poking around the install...

The GPIO pins seem to be accessible using the techniques described on this web page:
https://www.kernel.org/doc/Documentation/gpio/sysfs.txt

I was able to export and unexport a pin, but have not tried it e.g. by toggling an LED, etc. I had to do it as root. I encountered the same issue during a previous project on a Linux machine as reported HERE that:
Quote:
Originally Posted by CharlieLaub View Post
There was one problem: I needed to be superuser to toggle the GPIO pins. I realized that all the newly available GPIOs were owned by user "root". So I changed user to become root (via sudo su) and then changed the owner of each GPIO folder and the files within them to be owned by my regular user account. This eliminated the need to use sudo when toggling the value or changing the in/out pin mode.
It's likely just a matter of changing the ownership from root to my user account. I will try this. In any case, this is one way to access GPIO pins under Ubuntu.

I will report any other glitches or problems that I discover.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 15th February 2019, 01:08 AM   #4
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Here is some info on how to get wireless networking up and running under Ubuntu Server:

Install wpasupplicant:
Code:
sudo apt install wpasupplicant
Edit the netplan:
Find a file within the directory /etc/netplan with the extension "yaml". On my system this was called 50-cloud-init.yaml and contained the following text (prior to my edits):
Code:
# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    version: 2
    ethernets:
        eth0:
            optional: true
            dhcp4: true
            match:
                macaddress: 00:11:22:33:44:55
            set-name: eth0
The mac address will be the actual address of your board's ethernet interface.

I added the following section for WiFi:
Code:
    wifis:
        wlan0:
            optional: true
            dhcp4: true
            access-points:
                "my-network-name":
                    password: "network-password-as-plain-text"
YAML files follow strict indentation rules as part of the file structure. Make sure to indent lines as shown. Substitute your network name, and its password as plain text. Keep the double quotes around each.

Restart Networking:
Save the file and then run the command:
Code:
sudo netplan apply
sudo service network-manager restart
Your board should now connect via either/or/both WiFi and/or ethernet, as they are available.

Also, networking info that used to be obtained with ifconfig and other commands is now obtained using the ip command. Info here:
Linux ip Command Examples - nixCraft
ip(8) - Linux man page

For example:
Code:
ip a
shows the status and info for all interfaces
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins

Last edited by CharlieLaub; 15th February 2019 at 01:12 AM.
  Reply With Quote
Old 15th February 2019, 03:04 PM   #5
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Wow, things are moving fast! The web page I linked to for Ubuntu 18.04.1 server beta has already been taken down. You can now download precompiled Ubuntu server 18.04.2 images for the Rapsberry Pi here:
Ubuntu 18.04.2 LTS (Bionic Beaver)
It's listed under the section called "Preinstalled server image" near the top of the page. I checked and the beta version I started with has been updated to 18.04.2 via apt update/upgrade. I modified the opening post with this new download location.

So far the only glitch I found so far is that alsamixer only works if you call it with a card specified, like this:
Code:
alsamixer -c 1
Calling alsamixer without the -c argument causes it to return with "mixer not found".
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins

Last edited by CharlieLaub; 15th February 2019 at 03:26 PM.
  Reply With Quote
Old 15th February 2019, 04:16 PM   #6
phofman is online now phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Quote:
Originally Posted by CharlieLaub View Post
So far the only glitch I found so far is that alsamixer only works if you call it with a card specified, like this:
Code:
alsamixer -c 1
Calling alsamixer without the -c argument causes it to return with "mixer not found".
Default alsa device is the pulse plugin which offers no controls of type MIXER.
  Reply With Quote
Old 16th February 2019, 08:15 AM   #7
soundcheck is offline soundcheck  Germany
diyAudio Member
 
Join Date: Mar 2005
Location: DUS
What kernel is Ubuntu-Arm using?

I suppose Mainline + Ubuntu flavor.

That'd be an absolute NoGo (for the time being).


I'd say with all the patches and features Raspbian and ALARM are still
the OSes of choice for the Pi family.


Enjoy.
  Reply With Quote
Old 16th February 2019, 05:44 PM   #8
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Quote:
Originally Posted by soundcheck View Post
What kernel is Ubuntu-Arm using?
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-1031-raspi2 aarch64)
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 18th February 2019, 07:35 AM   #9
soundcheck is offline soundcheck  Germany
diyAudio Member
 
Join Date: Mar 2005
Location: DUS
The main issue with such a mainline kernel is the lack of the very specific RPI kernel device tree and patches.

Basically most of the nice HAT (audio) devices wouldn't work on a mainline kernel.
And it's that RPI kernel device tree what makes a RPI interesting in the first place.

And even as a SBC for USB audio devices a RPI would simply be the wrong choice.
There are much better suited SBCs out there.

Beside that there are several other device tree related parameters that can't be used anymore.

It's IMO just a fun project - Ubuntu-On-Pi.
I've been playing around with Manjaro (also comes with a 64bit mainline kernel) for a while - for a different purpose.
Working with it is awful!! Simply starting Firefox is a nightmare. You'll face dead-ends&bottlenecks at every corner.


Enjoy. I don't. Waste of time projects - IMO.

Last edited by soundcheck; 18th February 2019 at 07:39 AM.
  Reply With Quote
Old 18th February 2019, 01:33 PM   #10
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Quote:
Originally Posted by soundcheck View Post
The main issue with such a mainline kernel is the lack of the very specific RPI kernel device tree and patches.

Basically most of the nice HAT (audio) devices wouldn't work on a mainline kernel.
And it's that RPI kernel device tree what makes a RPI interesting in the first place.

And even as a SBC for USB audio devices a RPI would simply be the wrong choice.
There are much better suited SBCs out there.

Beside that there are several other device tree related parameters that can't be used anymore.

It's IMO just a fun project - Ubuntu-On-Pi.
I've been playing around with Manjaro (also comes with a 64bit mainline kernel) for a while - for a different purpose.
Working with it is awful!! Simply starting Firefox is a nightmare. You'll face dead-ends&bottlenecks at every corner.


Enjoy. I don't. Waste of time projects - IMO.
Thanks for pointing that out - that HATs will likely not work. I dunno, I don't use "HATs" I use USB audio only because I typically need more than 2 output channels and I also sometimes want audio input(s). This means I use either multiple USB stereo DACs or I use a multichannel USB pro audio interface.

About the only thing I use from the PIs pins are the GPIOs, so that I can for example trigger amps to turn on and off. This seems to be supported with the Ubuntu image.

Since I don't use the OS itself for playback I never use these canned audio-specific OSes like Volumio, etc. I only use the PI for DSP processing, and either stream audio to the unit over WiFi or I use the audio input from the USB soundcard. For DSP using IIR filters (via LADSPA) there is plenty of processing power on tap and the PI platform is cheap. I just have not liked how Raspbian has evolved lately, and was always hoping that mainline linux would be supported. I had tried Ubuntu+MATE images before but was not very satisfied, so the fact that there is now a current LTS Ubuntu image is perfect for my needs.

YMMV.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote

Reply


Ubuntu Server 18.04 on Raspberry Pi 3B+Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: Raspberry Pi as Music Server, DSP, and Crossover jrubins PC Based 75 6th January 2017 04:28 AM
Ubuntu Toram Mpd kurt10 PC Based 0 12th December 2012 06:46 PM
guitarix and ubuntu neebster Instruments and Amps 4 19th March 2012 03:37 PM
Using PC as server and storage-replacing NAS DNLA server birdyman PC Based 6 22nd June 2011 09:16 AM
Ubuntu Linux mpmarino Everything Else 21 6th February 2006 12:41 PM


New To Site? Need Help?

All times are GMT. The time now is 10:13 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Copyright ©1999-2019 diyAudio
Wiki