Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Docker is great but just be aware with the Pi you're running on an ARM processor and docker images are platform specific. You'll find tons of awesome docker tutorials that work great on intel hardware but fail in confusing ways on ARM ('invalid image' and related errors). Things are getting better in the docker world with multiarch though so it's still worth trying. Personally I'd start on your main machine by installing docker and getting comfortable with running and using containers. Then once you know how to troubleshoot containers a bit, try getting it going on the pi.

Adbot
ADBOT LOVES YOU

Walh Hara
May 11, 2012
Thanks for the feedback! I've been taking care to specifically look for arm or rpi- containers on the web, there seem to be plenty. So far I haven't had to make an image myself, but I'm assuming it can't be much more difficult than trying to install everything on the raspberry pi itself.

Regarding transcoding not being possible: does this mean that in order to stream a video on the hd disk to a chromecast I won't be able to use the raspberry pi itself?

Warbird
May 23, 2012

America's Favorite Dumbass

No no, you can direct play more or less fine, but anything necessitating converting of the file isn’t going to play ball. So no subtitles that aren’t “burned” into the file and specific clients might not be viable. h264 encoding should be the most universal, but you’ll want to take that over to the Plex thread.

namlosh
Feb 11, 2014

I name this haircut "The Sad Rhino".
Pertinent to the discussion, I’ll also suggest going with Docker. It rules.
Look into PORTAINER.io while you’re at it. I like it.

Buuuut, I ran into an annoying problem that seems to be platform specific with the network driver.

For maximum separation, I wanted to run everything in containers using a MacVlan network, which works great until you try to add a second container to it. I looked all over for a solution to the problem but couldn’t find any.

The only way I was successful was to use an old laptop with full Ubuntu server on it. Then I was able to get multiple containers working on the same macvlan network. Maybe they’ll fix it soon, but I don’t have my hopes up. It’s broken on MacOS as well and has been for a while unless anybody has any suggestions.

Warbird
May 23, 2012

America's Favorite Dumbass

Are you doing it manually or with yaml? I would assume it would just me a matter of passing the network as the custom macvlan which ought to be easy enough via docker-compose.

namlosh
Feb 11, 2014

I name this haircut "The Sad Rhino".

Warbird posted:

Are you doing it manually or with yaml? I would assume it would just me a matter of passing the network as the custom macvlan which ought to be easy enough via docker-compose.

I have tried both... neither worked... docker-compose didn’t even work on the Ubuntu machine

I’m pretty sure I did it right, even though I’m not an expert. It gave me a weird kernel error, which I googled and it seemed to point to a bug in the network driver. Same for when I tried on macOS. Couldn’t even find any reference to people running multiple containers in a macvlan network on a pi. At least not where I looked... maybe my google-fu is failing me. I’d love to be proven wrong if someone says they have it working and can post the docker create commands.

That’s how I knew something was up. Phone posting so I can’t easily find it but there was an example of creating two alpine containers and having one ping the other and it just would not work on a pi OR macOS. Worked fine on Ubuntu

Warbird
May 23, 2012

America's Favorite Dumbass

I'd go ask in the home networking thread as they are both massive nerds and are extremely helpful. I need to integrate my media stack into a single network so once I sort that out I can at least tell you if you missed a line or something. Though I suspect you're on the money with some Pi weirdness.

Walh Hara posted:

Thanks for the feedback! I've been taking care to specifically look for arm or rpi- containers on the web, there seem to be plenty. So far I haven't had to make an image myself, but I'm assuming it can't be much more difficult than trying to install everything on the raspberry pi itself.

Regarding transcoding not being possible: does this mean that in order to stream a video on the hd disk to a chromecast I won't be able to use the raspberry pi itself?

Minor note, most of linuxserver.io's stuff has arm builds so I'd start there for your container needs.

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Something to consider too, if you're going down the rabbit hole of segmenting your docker containers into individual vlans, etc. you might just want to go full kubernetes. In the kubernetes world you get strict container network segmentation (well, reasonably strict.. it depends on your cluster), service discovery with DNS, and all kinds of other great stuff for free. With k3s, k3d, kind, minikube, etc. it's very straightforward to get a kubernetes cluster up and running even on a Pi (IMHO try k3s, it's a good balance of power and ease of use). These days I just use docker for simple single container or one-off things, and when stuff gets more complex I go straight to k8s.

namlosh
Feb 11, 2014

I name this haircut "The Sad Rhino".

mod sassinator posted:

Something to consider too, if you're going down the rabbit hole of segmenting your docker containers into individual vlans, etc. you might just want to go full kubernetes. In the kubernetes world you get strict container network segmentation (well, reasonably strict.. it depends on your cluster), service discovery with DNS, and all kinds of other great stuff for free. With k3s, k3d, kind, minikube, etc. it's very straightforward to get a kubernetes cluster up and running even on a Pi (IMHO try k3s, it's a good balance of power and ease of use). These days I just use docker for simple single container or one-off things, and when stuff gets more complex I go straight to k8s.

Is kubernetes applicable to something like a pihole or vpn server? If so, got any recommendations for tutorials?

Hadlock
Nov 9, 2004

Walh Hara posted:

Question: do you guys use docker on your raspberry? For what kind of things?

Last weekend I bought an external hard drive and so I'm looking into installing/configuring a number of things (raspberry pi 3b): samba, deluge, couchpotato, plex, ... It looks like there's a docker container for all of these things, does it make sense to always use these? Or are there some overhead costs (or other drawbacks) I should be aware of?

Yes; the industry term is "containers" though not docker

For literally anything

Yes, definitely use containers. Especially for plex. Not sure about samba but hey why not. The really nice thing about containers is that if you decide you don't like how you did X on your computer, you can just nuke the whole thing and then reinstall the docker compose file and run "docker compose up" and you're back where you were

There's no real overhead costs as docker uses built in kernel functions to accomplish what it needs to do, namely namespacing of all the resources. Might be a quarter of a percent but it's negligible.

If you want to be one of the really cool cats, use podman (by redhat) instead of docker: https://github.com/containers/libpod it removes the requirement of having to run docker as a daemon and is 100% docker/container compatible

And yeah I wholeheartedly approve of k3s, great way to get your feet wet with kubernetes, and learn a valuable job skill. True kubernetes (or k8s) is reeeally heavy to run on a raspberry pi, I would start with k3s and run with that until you run in to problems as it's much more simple to start, it's a single binary instead of multiple containers etc. All your deployment/service/ingresses will transfer over to full k8s if you ever need that level of complexity.

Hadlock fucked around with this message at 04:31 on Jul 7, 2020

Walh Hara
May 11, 2012
I don't understand the benefit of using kubernetes (besides learning something useful) when using just one pi. Isn't it just more overhead?

Warbird
May 23, 2012

America's Favorite Dumbass

It’s a bit debatable for a single node (computer), but the networking is pretty nice to have. Imo, I’d start with docker-compose and then move over to k3 if/when you want to expand some.

UncleGuito
May 8, 2005

www.ipadbackdrops.com daily wallpaper updates deserving of your iPad
Does anyone have any recommendations for speeding up nzbget (no docker fanciness) downloading and unpacking, transfer to another network drive? I'm running this setup on my 3B+ and it works fine but obviously much slower than my desktop (but yay for saving energy). The download completes and unpacks on the Pi, then moves over the network to an external drive on my Shield TV. On my 500/500 connection, downloads max out around 8mbps when connected over Ethernet.

I still plan to keep this setup because of convenience but thought I'd check if anyone had any luck getting better performance.

Krailor
Nov 2, 2001
I'm only pretending to care
Taco Defender

UncleGuito posted:

Does anyone have any recommendations for speeding up nzbget (no docker fanciness) downloading and unpacking, transfer to another network drive? I'm running this setup on my 3B+ and it works fine but obviously much slower than my desktop (but yay for saving energy). The download completes and unpacks on the Pi, then moves over the network to an external drive on my Shield TV. On my 500/500 connection, downloads max out around 8mbps when connected over Ethernet.

I still plan to keep this setup because of convenience but thought I'd check if anyone had any luck getting better performance.

The easiest way to speed this up would probably be to upgrade to a Pi4.

The 3b+ is limited by it's NIC, it's faster than the 100 Mbps that was on the 3 but maxes out around 300. The 4 allows for true gigabit.

Another thing to check is what does the load look like downloading and extracting? It could be that extracting is maxing out the processor, upgrading to a 4 would also help here as well.

Finally, what kind of drive are you using on the Pi to store the downloads/unpacked files? It could be that this is also a bottleneck.

wolrah
May 8, 2006
what?

UncleGuito posted:

Does anyone have any recommendations for speeding up nzbget (no docker fanciness) downloading and unpacking, transfer to another network drive? I'm running this setup on my 3B+ and it works fine but obviously much slower than my desktop (but yay for saving energy). The download completes and unpacks on the Pi, then moves over the network to an external drive on my Shield TV. On my 500/500 connection, downloads max out around 8mbps when connected over Ethernet.

I still plan to keep this setup because of convenience but thought I'd check if anyone had any luck getting better performance.

To expand on why any Pi models before the Pi 4 are pretty terrible choices for this role, the wired network adapter is part of the USB hub, so it shares a combined 480mbit/sec USB 2.0 link to the CPU with any other USB devices. This is why the "gigabit" network interface is good for mid-300s at best and that's only when it's the only thing using USB.

Presumably you're using a USB hard drive, so they'll be constantly fighting over the connection and killing each other's performance.

The Pi 4 finally abandons this design and has a network interface connected directly to the SoC and a PCIe-based USB 3.0 controller so it should be able to max out both interfaces simultaneously.

That said, if your goal is to land on the Shield eventually how about just running nzbget directly on it? There appears to be an Android version (https://nzbget.net/installation-on-android) and as far as I'm aware nVidia hasn't locked down sideloading on those things so I'd think it'll work.

UncleGuito
May 8, 2005

www.ipadbackdrops.com daily wallpaper updates deserving of your iPad

Krailor posted:

The easiest way to speed this up would probably be to upgrade to a Pi4.

The 3b+ is limited by it's NIC, it's faster than the 100 Mbps that was on the 3 but maxes out around 300. The 4 allows for true gigabit.

Another thing to check is what does the load look like downloading and extracting? It could be that extracting is maxing out the processor, upgrading to a 4 would also help here as well.

Finally, what kind of drive are you using on the Pi to store the downloads/unpacked files? It could be that this is also a bottleneck.
Thanks for the insight both!

I'm actually using a SD card as the only Pi storage - it's a pretty high quality card but I guess could be contributing to the bottleneck. Downloads are temporarily stored there until they're finished unpacking, after which they move to the non-SSD USB HDD on my other device that's network mounted on the Pi.

I haven't really been bothered by the speeds of unpacking and moving to the other drive, but more puzzled about the download speeds right now since it's set to unlimited and nothing else is plugged into the Pi.

wolrah posted:


That said, if your goal is to land on the Shield eventually how about just running nzbget directly on it? There appears to be an Android version (https://nzbget.net/installation-on-android) and as far as I'm aware nVidia hasn't locked down sideloading on those things so I'd think it'll work.
Hadn't realized it was on Android so will try sideloading it, but I'm also pretty reliant on sonarr & radarr to automate things.

Krailor
Nov 2, 2001
I'm only pretending to care
Taco Defender

UncleGuito posted:

Thanks for the insight both!

I'm actually using a SD card as the only Pi storage - it's a pretty high quality card but I guess could be contributing to the bottleneck. Downloads are temporarily stored there until they're finished unpacking, after which they move to the non-SSD USB HDD on my other device that's network mounted on the Pi.

The SD card is going to be your biggest bottleneck. That's pretty much the slowest storage you can get for your Pi.

If you can move nzbget to your Shield and then just run Sonarr/Radarr on the Pi that would be ideal. That will let you stop using the slow-rear end SD card as your temp storage and no longer need to move files across your network 2x.

Hadlock
Nov 9, 2004

Walh Hara posted:

I don't understand the benefit of using kubernetes (besides learning something useful) when using just one pi. Isn't it just more overhead?

The ability to use helm charts, especially nested helmb charts, is really nice. It's basically a package manager for containers

helm install postgres

Or whatever. Also it's interface will scale, if you ever need it to

Otherwise yeah you can just use docker compose, which is about all anyone ever really needs on a single node cluster

UncleGuito
May 8, 2005

www.ipadbackdrops.com daily wallpaper updates deserving of your iPad

Krailor posted:

The SD card is going to be your biggest bottleneck. That's pretty much the slowest storage you can get for your Pi.

If you can move nzbget to your Shield and then just run Sonarr/Radarr on the Pi that would be ideal. That will let you stop using the slow-rear end SD card as your temp storage and no longer need to move files across your network 2x.

Thanks - just tried it and nzbget definitely downloads faster from the Shield. Having issues getting Sonarr/Radarr to do their automation when mapped to that drive though (the shield drive is mounted over the network to the Pi as the actual download location for each file), but that seems more like a problem for another thread.

I might just end up getting the 2gb Pi 4 instead since it's a $5 difference from my 3B+. Can I just swap the SD card if I get a new model, or should I start with a fresh Raspbian install?

wolrah
May 8, 2006
what?

UncleGuito posted:

I might just end up getting the 2gb Pi 4 instead since it's a $5 difference from my 3B+. Can I just swap the SD card if I get a new model, or should I start with a fresh Raspbian install?
The Pi 4 needs a number of new drivers, so it needs to be a version of Raspbian that supports it, but as long as it's an up-to-date install it should work fine.

GeneralZod
May 28, 2003

Kneel before Zod!
Grimey Drawer
I took the SD card (with Raspbian Buster) out of my RPi3B+ and put it into my new RPi4 and it Just Worked(TM), except that I had to do the Change WLAN Country thing in raspi-config again in order to get the built-in wifi to work.

Walh Hara
May 11, 2012

Hadlock posted:

The ability to use helm charts, especially nested helmb charts, is really nice. It's basically a package manager for containers

helm install postgres

Or whatever. Also it's interface will scale, if you ever need it to

Otherwise yeah you can just use docker compose, which is about all anyone ever really needs on a single node cluster

Gotcha! I'm very new to this docker/kubernetes thing so I was wondering if I was missing something.

other people
Jun 27, 2004
Associate Christ
Man I just want to whine for a bit because I bought this neat Argon ONE case for a pi4 and while it works great as a case, it seems to change the power requirements of the system.

Previously I could power the pis from the USB port of my laptop (it's pretty much permanently docked) which saves having to use a precious power outlet. But when installed in this argon case it simply will not turn on unless plugged directly into the wall. Kinda lame.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Does it plug into the RPi in some way? How could it change the power requirements if it just surrounds it?

More likely you were borderline on power supply before as well and just got lucky, I think. What does your laptop let it draw from the USB port?

other people
Jun 27, 2004
Associate Christ

Subjunctive posted:

Does it plug into the RPi in some way? How could it change the power requirements if it just surrounds it?

More likely you were borderline on power supply before as well and just got lucky, I think. What does your laptop let it draw from the USB port?

Ah sorry yeah it has a little board that connects to the pi's GPIO pins. The board has a fan and its own usb C port which now powers the whole thing. One of the main features of the case is that it provides a "real" power button:

https://www.argon40.com/argon-one-raspberry-pi-4-case.html


So I guess it legitimately needs more power :/

Schadenboner
Aug 15, 2011

by Shine
The Argon ONE looks like a p.deece case but I'll bet it adds some power usage (note fan, adapter board for port replication):

https://www.pcmag.com/news/argon-one-case-moves-all-raspberry-pi-4-ports-to-the-back

Schadenboner fucked around with this message at 14:02 on Jul 23, 2020

other people
Jun 27, 2004
Associate Christ
Surely something like this would not work? https://www.delock.com/produkte/747_USB-2-0/65306/merkmale.html

GeorgieMordor
Jan 23, 2015
I set up a Raspbian-based Pi3 for a Spotify / AirPlay box and it's been working solid for about 2+ weeks outputting audio via HDMI.

I changed some of my setup now and want it to output via Headphone jack now, but for the life of me cannot get any of the services to recognize the analog. raspi-config is no help, and beyond that the command line declarations for amixer don't do anything either. All audio still outputs via HDMI.

I can explicitly tell the services to use Analog, but cannot get my Pi's global default to be Analog. It stays HDMI.

I'm using these:

- https://github.com/mikebrady/shairport-sync
- https://github.com/dtcooper/raspotify

klosterdev
Oct 10, 2006

Na na na na na na na na Batman!
Dude don't use the Raspberry Pi headphone jack for non-garbage audio quality, use a USB to aux adapter if you have to

Hadlock
Nov 9, 2004

If you want to go ludicrous mode you can get one of these bluetooth recievers. It is about $100 but if you're gonna spend $25 on a usb to aux adapter and spend hours rolling your own pi based music server, might as well go whole hawg :btroll:

https://www.sweetwater.com/store/detail/DN200BR--denon-dn-200br-stereo-bluetooth-audio-receiver

I have it plugged in to a pair of 8" powered studio monitors; works great. It's pure digital signal to the reciever so you don't need to worry about sub-consumer grade DAC chips futzing up your signal.

I didn't know you could control spotify from third party linux apps, maybe I can finally retire this android tablet I've been using. Spotify UI/UX is horrible but they have a big catalog and high quality mode if you go to the paid tier. Having a different UI would be a serious blessing

namlosh
Feb 11, 2014

I name this haircut "The Sad Rhino".
Did you mess with the config.txt at all? Aren’t most of the big display and sound options in there?

I want to use a pi as an alarm clock and the headphone jack is totally fine for that use. So if you figure it out, please post.

Anybody know any good headless alarm clock software For the pi? Maybe with a slick web interface?

trilobite terror
Oct 20, 2007
BUT MY LIVELIHOOD DEPENDS ON THE FORUMS!
ahahaha my low profile ICEtower arrived today and it’s glorious

trilobite terror
Oct 20, 2007
BUT MY LIVELIHOOD DEPENDS ON THE FORUMS!
when I can get my hands on an 8gb one I’ll put the bigblock-style one on it....

bolind
Jun 19, 2005



Pillbug
I'd just like to direct attention to the fact that Etcher now can write media directly from an URL which is loving amazeballs especially for rapid prototyping. Have script that builds image, copy it to web server, burn directly from there, done.

Warbird
May 23, 2012

America's Favorite Dumbass

Oh that’s pretty neat. I’ll have to see if I can get my plane tracker image set up that way.

By the by, what is the generally accepted method to create images off of a customized system, if any?

mystes
May 31, 2006

Hadlock posted:

If you want to go ludicrous mode you can get one of these bluetooth recievers. It is about $100 but if you're gonna spend $25 on a usb to aux adapter and spend hours rolling your own pi based music server, might as well go whole hawg :btroll:

https://www.sweetwater.com/store/detail/DN200BR--denon-dn-200br-stereo-bluetooth-audio-receiver

I have it plugged in to a pair of 8" powered studio monitors; works great. It's pure digital signal to the reciever so you don't need to worry about sub-consumer grade DAC chips futzing up your signal.

I didn't know you could control spotify from third party linux apps, maybe I can finally retire this android tablet I've been using. Spotify UI/UX is horrible but they have a big catalog and high quality mode if you go to the paid tier. Having a different UI would be a serious blessing
If you're concerned about audio quality why would you use bluetooth? You're going to be better off with any $5 usb audio adapter plugged into any amplifier/receiver. Bluetooth is a "pure digital signal" but it's a lovely lossy audio signal that's going to be lower quality that any supposed "sub-consumer grade DAC."

Hadlock
Nov 9, 2004

I think aptX over BT is CD quality? 384 kb/s @ 48khz fixed?

I think there is an older standard, SBC that is crappier, ever so slightly

SBC, AAC aptX are all lossy, I have trouble hearing the compression loss at 384kb/s personally. Spotify maxes out at 320kb/s @44.1 khz so it may be the bottleneck

mystes
May 31, 2006

Hadlock posted:

I think aptX over BT is CD quality? 384 kb/s @ 48khz fixed?

I think there is an older standard, SBC that is crappier, ever so slightly

SBC, AAC aptX are all lossy, I have trouble hearing the compression loss at 384kb/s personally. Spotify maxes out at 320kb/s @44.1 khz so it may be the bottleneck
Personally I'm not an audiophile and I can't hear the difference but it just doesn't make sense to me to tell people to use bluetooth because ADCs in usb sound cards might not be perfect when the differences in the ADCs is going to be a million times smaller than the effect of the lossy compression.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
I only use my PS1 for audio.

If you're streaming, then the quality is usually set by the source. Pandora/Google Music/Spotify are all in the ~350kbps range, iirc.

Adbot
ADBOT LOVES YOU

wolrah
May 8, 2006
what?
In theory you can run any arbitrary codec over A2DP, and this does get used from time to time for proprietary codecs, but for whatever reason no one seems to be willing to support just straight "uncompressed" PCM. There is plenty of bandwidth for a literally CD quality stereo stream.

I'm sure it'd have a negative impact on battery life so there's good reason to not default to it for headphone use, but for purposes of wirelessly linking audio between stationary devices or a phone in a car that can be plugged in it seems like it'd be the obvious choice. No new tech, no new licensing, etc.

I wonder how hard that'd be to test with BlueZ, just pumping audio over BT from one Linux box to another to prove the concept.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply