Steam Link

Steam Link

Memory (GPU) detection on Raspberry PI
Hello,

I've been testing the latest Steamlink version on both a Raspberry PI 3 (based on Raspbian Buster) and on a Pi4 (using RasPiOS Bullseye) and I noticed a couple of things related to the GPU memory detection, performed when Steamlink is started.

* On the Pi4 (using the native Mesa KMS/DRM driver), there's a warning (with a prompt) after starting steamlink telling the user that there's not enough GPU memory reserved. On systems with the new KMS/DRM driver, there is no need for the user to reserve any GPU memory in config.txt, the GPU memory is taken from the system's main RAM (see 1).

Maybe this check can be bypassed for systems where the KMS/DRM driver is used ? To check whether he KMS/DRM VC4 driver is loaded/active, the /proc filesystem can be used (see 4).


* On the Pi3 (on Buster,using the legacy Broadcom drivers), GPU memory check yields an error when config.txt contains multiple `gpu_mem` stanzas:

gpu_mem_256=128M gpu_mem_512=256M gpu_mem_1024=256M

The above is a valid configuration (see 2).

The current allocated GPU memory can be found using vcgencmd get_mem gpu, though I'll have to check if this works for a regular user and doesn't need sudo (see 3).

[1] https://github.com/raspberrypi/firmware/issues/1603#issuecomment-891251474
[2] https://www.raspberrypi.com/documentation/computers/config_txt.html#memory-options
[3] https://raspberrypi.stackexchange.com/questions/108993/what-exactly-does-vcgencmd-get-mem-arm-display
[4] https://github.com/RPi-Distro/raspi-config/blob/0319d1c7997396aca8596467a2f63329b967b188/raspi-config#L91
< >
Showing 1-4 of 4 comments
The author of this thread has indicated that this post answers the original topic.
Added for build 227, thanks!
Thanks you, just installed it today and the detection is better now (doesn't stumble on multiple gpu_mem occurences in 'config.txt').

On the Pi4 (RaspiOS 11/ 'bullseye', freshly installed), I still get the warning about insufficient GPU memory allocated. On this system, I don't have any gpu_mem configuration and I'm using the default (76M). I think this may be enough for H264 - it's the same amount reserved by LibreElec (which is a distro built around Kodi/XBMC) sets on their configuration [1].

[1] https://github.com/LibreELEC/LibreELEC.tv/blob/714206680278bad2357ee78c65c768bedbc8618b/packages/tools/bcm2835-bootloader/files/config.txt#L12
I've had performance problems with 76M and 1080p H.264 video. It's possible that Steam's decoding uses more buffers than LibreElec or that a higher amount of video memory is needed for the overlay. Does everything work well for you?
I don't use steamlink that much, and since my Pies use WiFi, I've used it at max 720p.

Considering that the Raspbian 'buster' doesn't use the VC4 KMS driver, it would still need the GPU memory reservation - so keeping the reservation makes sense.

Thank you for the changes, they're very welcomed.
< >
Showing 1-4 of 4 comments
Per page: 1530 50