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
eightysixed
Sep 23, 2004

I always tell the truth. Even when I lie.

Whybird posted:

I'm very new into this - I have a Pi in my living room that I'm using as a media/retro games PC, and I have what feels like a very silly question.

It looks like Retropie is the most popular emulator, but also like the intended usage is to flash it completely onto an SD card. Is the idea that you have one SD card with Retropie and another SD card with Raspberry OS (for things like web browsing, office, media) and you just switch them in and out of your Pi? Or is there some smarter way to do it?

BerryBoot or PINN will give you what you want (multiple OS's on one SD card) and is the smarter way :cheers:

e: use one of those as opposed to swapping out SD cards, it will make your life and the life of your SD card easier :)

e2: Be aware, you'll have to start from scratch to implement this, but once it's done, it's done, and you can boot into whatever you want from there on out.

eightysixed fucked around with this message at 13:46 on May 9, 2024

Adbot
ADBOT LOVES YOU

Klyith
Aug 3, 2007

GBS Pledge Week
The real smarter way to do things is to know that retropie is just an application, and a linux desktop is just an application, and you can have both installed on the same OS at the same time. That way you don't have to reboot to switch.

Easy: you can install the PIXEL desktop inside of Retropie

Harder: you can install Retropie on a standard RaspPi OS, but this will require learning some linux to make it work nicely. Launching retropie requires shutting down the normal desktop first, and vice versa. So some nice user-friendly icons to switch between them need to be some simple scripts to take care of that.


(Either way, the more investment you put into a customized Pi setup the more you want to back it up to avoid SD card loss.)

eightysixed
Sep 23, 2004

I always tell the truth. Even when I lie.
Well that's fair, I didn't think about that.
But still a bootloader that allows him to boot into whatever, if he decides to expand into other things seems like a good decision too v:shobon:v

DR FRASIER KRANG
Feb 4, 2005

"Are you forgetting that just this afternoon I was punched in the face by a turtle now dead?
I found it made the Pi way more flexible for my uses to install EmulationStation via apt-get and then have it auto-launch on boot. That way if you want to use it for something else you still have RaspbianOS to fall back to.

E: post 2 slow

deong
Jun 13, 2001

I'll see you in heck!

Whybird posted:

I'm very new into this - I have a Pi in my living room that I'm using as a media/retro games PC, and I have what feels like a very silly question.

It looks like Retropie is the most popular emulator, but also like the intended usage is to flash it completely onto an SD card. Is the idea that you have one SD card with Retropie and another SD card with Raspberry OS (for things like web browsing, office, media) and you just switch them in and out of your Pi? Or is there some smarter way to do it?

The flashable image for RetroPie has the full os installed as well. You can install more applications on the RetroPie image. Are you looking to use it as a desktop?
You can also install RetroArch which is closer to a desktop environment with emulators already installed.

e;fb

cruft
Oct 25, 2007

Whybird posted:

I'm very new into this - I have a Pi in my living room that I'm using as a media/retro games PC, and I have what feels like a very silly question.

It looks like Retropie is the most popular emulator, but also like the intended usage is to flash it completely onto an SD card. Is the idea that you have one SD card with Retropie and another SD card with Raspberry OS (for things like web browsing, office, media) and you just switch them in and out of your Pi? Or is there some smarter way to do it?

What you outlined is how I would advise somebody starting out.

This being Linux, there are 58 other ways you could do it. But I don't think trying to set up that way is a good step 1.

Pham Nuwen
Oct 30, 2010



Klyith posted:

The real smarter way to do things is to know that retropie is just an application, and a linux desktop is just an application, and you can have both installed on the same OS at the same time. That way you don't have to reboot to switch.

I don't know, I was running Ubuntu on my laptop but I wanted to try KDE so I wiped the disk and installed Kubuntu, then I thought I'd try XFCE so I wiped the disk and installed Xubuntu...

Spazzle
Jul 5, 2003

Pham Nuwen posted:

I don't know, I was running Ubuntu on my laptop but I wanted to try KDE so I wiped the disk and installed Kubuntu, then I thought I'd try XFCE so I wiped the disk and installed Xubuntu...

Have you considered trying Lubuntu?

eightysixed
Sep 23, 2004

I always tell the truth. Even when I lie.
Or Debian?

Hasturtium
May 19, 2020

And that year, for his birthday, he got six pink ping pong balls in a little pink backpack.
Or installing your distributionís desktop meta package for the desktop environment youíre keen to try, then logging in to that with your display manager? A lot of us have more than one installed, itís not weird.

cruft
Oct 25, 2007

Just switch the SD cards, like you originally planned, OP.

Maybe make a third one where you can try the dozen+ suggestions you're getting from this thread. This way when you get in over your head, you can yank it out and put in one that still works.

Dicty Bojangles
Apr 14, 2001

Why bother, just buy more pi

namlosh
Feb 11, 2014

I name this haircut "The Sad Rhino".

Hasturtium posted:

Or installing your distributionís desktop meta package for the desktop environment youíre keen to try, then logging in to that with your display manager? A lot of us have more than one installed, itís not weird.

Not pi related, but Iíve tried this and it almost always ends up messing something up or breaking things. It seems like it should be seemless but I find itís not but maybe I just donít know how to janitor it correctly or something idk

eightysixed
Sep 23, 2004

I always tell the truth. Even when I lie.

cruft posted:

This way when you get in over your head, you can yank it out

There shall not be any yankiní itt

sb hermit
Dec 13, 2016





eightysixed posted:

There shall not be any yankiní itt

:mods:

Whybird
Aug 2, 2009

Phaiston have long avoided the tightly competetive defence sector, but the IRDA Act 2052 has given us the freedom we need to bring out something really special.

https://team-robostar.itch.io/robostar


Nap Ghost
That was really useful advice, thank you all! Retropie installed like a dream, and I'm just reading up on PIXEL now which sounds like what I'm after for desktop stuff.

Pham Nuwen
Oct 30, 2010



Hasturtium posted:

Or installing your distributionís desktop meta package for the desktop environment youíre keen to try, then logging in to that with your display manager? A lot of us have more than one installed, itís not weird.

I was joking about how often I see people talk about doing precisely that when their package manager already has all the poo poo they need.

I don't run KDE or GNOME but I usually end up with a good chunk of both suites installed just because I like to pick and choose tools

Laserface
Dec 24, 2004

Ive got a spare pi4.

I want to use it as a bare bones VLC player on my TV for those odd times my TV cant natively play back something via the plex app.

a quick google suggests that a pi 4 will struggle on 4k videos but I thought they had hardware decoding for h.264/5?

Klyith
Aug 3, 2007

GBS Pledge Week

Laserface posted:

a quick google suggests that a pi 4 will struggle on 4k videos but I thought they had hardware decoding for h.264/5?

The h264 decoder can only do 1080p60 (it's using the same block as the earlier pis). The h265 decoder can do 4k. And it doesn't have VP9 decode at all. The CPU just barely too slow to do 4k without acceleration on h264 and vp9.

So I guess it depends. I feel like a lot of :filez: in 4k are probably h265 encodes...

cruft
Oct 25, 2007

Not that anybody asks, but I spent a good 10 hours figuring out how to get a pi4 to do hardware h264 encoding, and I'm here to tell you that it's not worth it if you're doing Plex. Maybe for, like, trail cameras or something. But the quality is just all over the place, and by the time you dial it in to decent quality, you're not getting very good compression.

I gave up and just use the software mechanism in ffmpeg. But if you're interested, hit me up and I'll dig up the invocation to make HW encoding work on a modern kernel.

Laserface
Dec 24, 2004

cruft posted:

Not that anybody asks, but I spent a good 10 hours figuring out how to get a pi4 to do hardware h264 encoding, and I'm here to tell you that it's not worth it if you're doing Plex. Maybe for, like, trail cameras or something. But the quality is just all over the place, and by the time you dial it in to decent quality, you're not getting very good compression.

I gave up and just use the software mechanism in ffmpeg. But if you're interested, hit me up and I'll dig up the invocation to make HW encoding work on a modern kernel.

I was asking about playback rather than encoding. just want a really lightweight OS w/ VLC installed for playing back the odd file my TV cant handle natively via plex as my plex server is ancient and cant do transcoding.

TV handles 265 fine but some HDR videos the colors are all messed up on my TV but it plays fine on a PC.

coconono
Aug 11, 2004

KISS ME KRIS

My pi4 wouldnít do 4k reliably so I stuck the display at 1080p via the boot config. It did ok but I only tested it against full screen streaming sites from the default PiOS.

CatHorse
Jan 5, 2008

Laserface posted:

Ive got a spare pi4.

I want to use it as a bare bones VLC player on my TV for those odd times my TV cant natively play back something via the plex app.

a quick google suggests that a pi 4 will struggle on 4k videos but I thought they had hardware decoding for h.264/5?

The only way to test and use pi for video playback is to use https://libreelec.tv/.

eightysixed
Sep 23, 2004

I always tell the truth. Even when I lie.

Pham Nuwen posted:

I was joking about how often I see people talk about doing precisely that when their package manager already has all the poo poo they need.

I don't run KDE or GNOME but I usually end up with a good chunk of both suites installed just because I like to pick and choose tools

I tried pretty much everything, finally landed on Mint + Cinnamon and haven't looked back.

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.
https://www.londonstockexchange.com/news-article/market-news/expected-intention-to-float/16470316
their IPO announcement thing is up

eightysixed
Sep 23, 2004

I always tell the truth. Even when I lie.
Is this the beginning of the end, or is it a good thing?

It could go either way...

xzzy
Mar 5, 2009

Nothing good has ever come from going public except making rich people richer.

The pi itself will probably be fine for the forseeable future but they will absolutely have to start monetizing everything surrounding it.

mewse
May 2, 2006

eightysixed posted:

Is this the beginning of the end, or is it a good thing?

It could go either way...

I'm sure they'll be very successful and stray even further from their original mission to produce low cost devices for students and hobbyists

Cenodoxus
Mar 29, 2012

while [[ true ]] ; do
††††pour()
done


Raspberry Pi, a Broadcom company.

Thanks Ants
May 21, 2004

#essereFerrari


I cannot see what a primarily nonprofit education-oriented company has to gain from entering the world of shareholders wanting line to go up each quarter

xzzy
Mar 5, 2009

Thanks Ants posted:

I cannot see what a primarily nonprofit education-oriented company has to gain from entering the world of shareholders wanting line to go up each quarter

The people at the top are thinking about their retirement.

Klyith
Aug 3, 2007

GBS Pledge Week

Thanks Ants posted:

I cannot see what a primarily nonprofit education-oriented company has to gain from entering the world of shareholders wanting line to go up each quarter

Raspberry Pi Foundation is the nonprofit education-oriented charity, which owns most of Raspberry Pi Ltd. They got the profit made by Ltd to do charity stuff with.

Raspberry Pi Ltd, the company being IPO'd, is not a nonprofit education-oriented company. It's run like a business, it makes profit, and has no special mission. I listened to a podcast with Eben Upton as a guest once, and it made clear that these guys are suits who happened to create the Pi while working as university profs. It being tied to a charity was more circumstance than the founders being noble hippies.


Selling off Ltd is a good thing for the foundation, because:
1) they're selling high, the market is starved for IPOs right now
2) they can put that pile of money in diversified safe investments rather than being tied to the fate of a single company / product
3) I dunno how much of Ltd they're selling, but surely not all of it. So they'll still have plenty of upside.

sb hermit
Dec 13, 2016





Well, with the adoption of RISC V going higher and the continuing interest in using it in hobbyist situations, I think that there are enough small business and talented hobbyists that would be down to beef up a good implementation.

Until then, thereís enough profit in maintaining goodwill that I think raspberry pi will keep maintaining their current and legacy platforms.

Besides, due to how much demand there is, they are quite happy with churning out good product at the current prices. Makes for a good prototype board!

tuyop
Sep 15, 2006

Every second that we're not growing BASIL is a second wasted

Fun Shoe

sb hermit posted:

they are quite happy with churning out good product at the current prices. Makes for a good prototype board!

Canít wait for them to start doing thatÖ

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
I'm working on a very silly addition to my very silly RPI project that I think I've posted about here, if not the electronics thread, and I'm going to ask a rather open ended question.

Is there a good way to read a "value" over USB from an RPI, with the device on the other end being something like an Arduino or another RPI?

I'm trying to implement a very rudimentary keyboard for my silly little DasDeployer. My thoughts are using some rotary encoders that let you turn the knobs until you've selected a 5 character string, and then "send" that string to my program in some way. My first thoughts were to use an Arduino or RPI Zero to control that whole side of it, and then somehow that contraption would "send" the string and/or my raspberry pi would "read" it somehow, probably over USB?

A few thoughts I had. I could have the Arduino send the string as keyboard output, but I'm worried about my program (running as a service) being able to receive that keyboard input, and how that might interfere if I plug in a real keyboard and need to type on the actual computer. Another thought I just had was getting the secondary contraption to emulate a serial port and "write" the string to the serial port in such a way that my main RPI can "read" the string.

I'm not sure if there are other possibilities, especially when I'm writing the software on both ends. Bonus points of I can build my contraption with a Pi Zero because I'd much rather do everything in Python than figure out C or whatever the Arduino needs.

cruft
Oct 25, 2007

FISHMANPET posted:

I'm working on a very silly addition to my very silly RPI project that I think I've posted about here, if not the electronics thread, and I'm going to ask a rather open ended question.

Is there a good way to read a "value" over USB from an RPI, with the device on the other end being something like an Arduino or another RPI?

USB has a Serial and a Bulk mode that could do this. Serial is probably easiest.

Your arduino sketch needs to set up the serial port, then call ReadSerial() (I think). Depending on what the value is, you may need to call atoi() or some other parser.

e: I misread your question. But in either direction, if it's ASCII text, serial is surely the way to go.

cruft fucked around with this message at 22:43 on May 23, 2024

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
What firmware are the macropad crew doing?

Sounds like that's exactly what you're building, knobs and all

Adbot
ADBOT LOVES YOU

ryanrs
Jul 12, 2011

You should be able to setup the Arduino so a user on the RPi can type:

$ cat /dev/ttyserial999

And on the Arduino, you can see the connection open when (bool)Serial == true, then you printf your info and close the connection so cat gets EOF.

I think this involves stty on the RPi. Check out stty hupcl and eof. Hupcl is needed for the Arduino to know if someone has the device file open. And I think stty eof is how you tell the tty driver to treat ctrl-d as EOF and make read(2) return zero bytes. You can make any character the EOF char, like a null byte or whatever.

Make your 'protocol' text-based and line-oriented, then hand off all the open/close logic to the tty driver. There are thousands of weirdo terminals in the history of computing, and unix tty drivers have cruft for dealing with most of them. Beacuase of this, the tty drivers are very configurable.


One time, I used the tty driver to greatly improve the performance of a USB enviromental sensor thing. The old code was reading a char at a time, unbuffered with short timeouts, in hopes to read data and send replies inside some USB turn-around time. I don't remember the details, but it was something like needing to process it in the same 1 ms tick? Or else you'd miss your slot until some later time and latency and throughput go to poo poo? Something like that.

The trick was configuring the tty driver to 'understand' the protocol, which didn't require any changes to the text-based protocol at all. Just needed to set the right options with stty. And once the tty driver understood what character meant line end, and when to buffer, it was lightning fast. This is because the character processing and buffer logic was now running in the kernel, and userspace was presented the complete records, rather than loving around char-by-char. Running in the kernel, the tty driver hit the 1ms window every time.

tldr: Lean on stty and the tty driver. It is very flexible, and if you use it right, a lot of convenient UNIX-y details will work right.

ryanrs fucked around with this message at 04:47 on May 24, 2024

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