lanefu changed the topic of #armbian-rockchip to: Armbian - Linux for ARM development boards | Rockchip SoC | www.armbian.com | This channel is relayed to the equivalent Discord channel | this channel is logged
troglodito has quit [Read error: Connection reset by peer]
troglodito has joined #armbian-rockchip
<DC-IRC> <okeser06> Hi all. I have Rock pi S loaded armbian bullseye minimal, but when aplay -l, it says no sound card
<DC-IRC> <okeser06> Also when load armbian 23.02 bullseye, it doesn't boot up.
<DC-IRC> <gerrit> Does anyone have a way to get ffmpeg working on a RK3568. I tried a lot but i am not able to get a build of ffmpeg that would have hardware acceleration enabled.
<DC-IRC> <amazingfate> What kernel you're using?
<DC-IRC> <gerrit> Kernel 6.1 with latest armbian
<DC-IRC> <laserarma> Hello everyone, after several attempts here I am again looking for a solution to my problem for which I have been trying to solve it for months.
<DC-IRC> <laserarma> I bought 10 rock pi4 c+ with mali t860, I have to run obs-studio, but it is not possible in any way, or rather obs-studio works but with excessive CPU consumption even with very little flow, for example if I put an image the cpu splashes too high. Doing a lot of research for the solution, everyone recommends the Panfrost driver, I tried practically all the imgs found at this address: https://github.com/radxa-build/rock-4c-plus/relea
<DC-IRC> <laserarma> I'd like to make them work like the raspberry, also because I believe that the rock pi4 c+ are really excellent in terms of performance.
<DC-IRC> <laserarma> Thanks a lot to whoever wants to help me.
<DC-IRC> <laserarma> sorry for my english
<DC-IRC> <Tenkawa> @laserarma From what I am reading the RockPi 4C+ only supports OpenGLES however OBS-Studio needs full OpenGL 3.3
<DC-IRC> <Tenkawa> That will force software rendering
<DC-IRC> <Tenkawa> and it only supports OpenGL ES 1.1 /2.0 /3.0 /3.1 /3.2,
<DC-IRC> <Tenkawa> not even 3.3
<DC-IRC> <rpardini> isn't this about venv/vdec (h264?) and not any kind of 3D stuff... ?
<DC-IRC> <rpardini> eg Hantro, not Panfrost.
<DC-IRC> <laserarma> excuse my ignorance, what is hantro?
<DC-IRC> <c0rnelius> rockchip staging module I thought?
<DC-IRC> <Tenkawa> @rpardini of its about obs-studio it "requires" it
<DC-IRC> <Tenkawa> I am reading its requirements
<DC-IRC> <rpardini> yeah. some AMDGPU encoding stuff goes through `mesa` so I'm probably confused.
<DC-IRC> <Tenkawa> I was answering that part
<DC-IRC> <rpardini> maybe some hantro stuff goes through `panfrost` ?
<DC-IRC> <Tenkawa> It is not supported
<DC-IRC> <Tenkawa> Nothing of the rest
<DC-IRC> <Tenkawa> Without that.. the cpu utilization will be high
<DC-IRC> <rpardini> AFAIK, OBS does no 3d stuff, instead, does _a lot_ of video encoding, so...
<DC-IRC> <Tenkawa> doesn't matter... the graphics output to hardware is handled through opengl...
<DC-IRC> <Tenkawa> not opengles
<DC-IRC> <Tenkawa> for obs
<DC-IRC> <Tenkawa> so it is going to be software either way
<DC-IRC> <Tenkawa> on this sbc
<DC-IRC> <Tenkawa> and too new version for this sbc
<DC-IRC> <Tenkawa> according to the website
<DC-IRC> <Tenkawa> (if using currrent version of the software)
<DC-IRC> <laserarma> I tried OBS versions from 25 to 29 without getting good results, always the same or worse
<DC-IRC> <laserarma> some of these versions compiled directly by me directly on armbian
<DC-IRC> <NicoD> @laserarma
<DC-IRC> <NicoD> There is a ppa you could try. I use it on RK3588 with OBS-studio accelerated. Not sure if it works on RK3399. You can always try. You'll need a Jammy image for this. @amazingfate Might be able to give more info if it can work on RK3399.
<DC-IRC> <NicoD> `
<DC-IRC> <NicoD> sudo add-apt-repository ppa:liujianfeng1994/rockchip-multimedia
<DC-IRC> <NicoD> sudo apt update
<DC-IRC> <NicoD> sudo apt dist-upgrade
<DC-IRC> <NicoD> sudo apt install rockchip-multimedia-config gstreamer1.0-rockchip1 ffmpeg obs-gstreamer obs-studio `
<DC-IRC> <NicoD> Also check if panfrost is enabled with
<DC-IRC> <NicoD> `glxinfo -B`
<DC-IRC> <NicoD> If it mentions llvmpipe then it's not enabled. If it says panfrost then you're good.
<DC-IRC> <amazingfate> I'm doing a 4K streaming using rock5b: https://b23.tv/jMGA2Gu
<DC-IRC> <NicoD> He needs it on Rock4C+. Does it work on that too?
<DC-IRC> <amazingfate> He need a legacy kernel, and I recommend 5.10.
<DC-IRC> <amazingfate> And a jammy rootfs to add my ppa.
<DC-IRC> <MicroLinux (Salva)> I don't understand the new opi5
<DC-IRC> <MicroLinux (Salva)> They replaced x1 pci 2.0 for wifi? Wifi should run on SDIO just fine, 1x pci 2.o just for wifi is a waste of I/O.
<DC-IRC> <MicroLinux (Salva)> Dont worry, obs runs on rk3399 on mainline, just use PAN_MESA_DEBUG=gl3
<DC-IRC> <MicroLinux (Salva)> Export it globally on /etc/environment, on any blank line and reboot
<DC-IRC> <MicroLinux (Salva)> That being said, and while some hlguy at collabora mentioned that obs hw encoding (so, not just cpu enc) works on rk3399 on obs, I would like to see how difficult is to get that setup
<DC-IRC> <MicroLinux (Salva)> I texted him in order to get some info
<DC-IRC> <MicroLinux (Salva)> But obs work, just not vou accelerated out of the box
<DC-IRC> <amazingfate> I never heard that h264/h265 encoder is implemented on rk3399 mainline kernel.
<DC-IRC> <laserarma> can you suggest me some distros to try this? is armbian jammy (5.10) fine for this?
<DC-IRC> <laserarma> i might also try the official radxa jammy image instead..
<DC-IRC> <laserarma> @amazingfate ye i know this, but i actually don't need to encode h264 nor stream anything, i use it for basic CEF rendering and images (.jpg, .png)
<DC-IRC> <laserarma> i basically use it with full screen projector after i setup all the elements
<DC-IRC> <amazingfate> Then you don't need my ppa. You can just try armbian mainline image. Run a Wayland session and use pipewire plugin to capture the screen.
<DC-IRC> <laserarma> and as I said, neither the rpi4 has native h264 encoding nor opengl 3.3, but i still can use it with MESA_GL_OVERRIDE_VERSION=3.3
<DC-IRC> <laserarma> it just works fine with any obs version
<DC-IRC> <laserarma> mmm i don't need to capture my screen, but never tried wayland as it crashes. maybe i'm doing something wrong
<DC-IRC> <laserarma> mmm i don't need to capture my screen, but never tried wayland as it crashes on any distro, unluckily. maybe i'm doing something wrong
<DC-IRC> <laserarma> mmm i don't need to capture my screen, but never tried wayland as it crashes on any distro i tried, unluckily. maybe i'm doing something wrong
<DC-IRC> <amazingfate> I don't have a rk3399 board. The issue you've encountered seems to be gpu driver related.
<DC-IRC> <laserarma> indeed, but i actually didn't find any driver actually working for my use case, i tried any rockchip driver and kernel combination, i even compiled panfrost but with no luck
<DC-IRC> <amazingfate> Radxa built kde images. I don't know if that is the cause.
<DC-IRC> <rpardini> Even HVEC now with Hantro, supposedly
<DC-IRC> <rpardini> Even HEVC now with Hantro, supposedly
<DC-IRC> <laserarma> i tried them, even uninstalling kde and installing lxqt / gnome / xfce / lxde and so on, but nothing worked fine
<DC-IRC> <amazingfate> That's just decoder, not encoder.
<DC-IRC> <rpardini> oh -- I'm a fool
<DC-IRC> <rpardini> so wait -- do we have _any_ (say h264) encoding on mainline?
<DC-IRC> <laserarma> nope
<DC-IRC> <laserarma> at least not natively
<DC-IRC> <rpardini> damn. decoding's not bad at all recently. but for encoding I'm sticking to Phytium (amdgpu/aarch64) and Intel stuff. mainline simply just works.
<DC-IRC> <amazingfate> This dts patch doesn't have a gpu node.
<DC-IRC> <rpardini> heh, yeah. All I see is: "this patch does not have an mbox header" 😉
<DC-IRC> <rpardini> also, Igor's name on it, so -- I'm outta here
<DC-IRC> <rpardini> getting that rk 5.10 on those rk3399's might be an interesting learning opportunity though, is it viable?
<DC-IRC> <rpardini> (I lost my quartz64a to production, but my odroidm1 is also in line for rk5.10-ization)
<DC-IRC> <amazingfate> @laserarma you may try this overlay:
<DC-IRC> <amazingfate> ```
<DC-IRC> <amazingfate> /dts-v1/;
<DC-IRC> <amazingfate> /plugin/;
<DC-IRC> <amazingfate> / {
<DC-IRC> <amazingfate> fragment@0 {
<DC-IRC> <amazingfate> target = <&gpu>;
<DC-IRC> <amazingfate> __overlay__ {
<DC-IRC> <amazingfate> mali-supply = <&vdd_gpu>;
<DC-IRC> <amazingfate> status = "okay";
<DC-IRC> <amazingfate> };
<DC-IRC> <amazingfate> };
<DC-IRC> <amazingfate> };
<DC-IRC> <amazingfate> ```
<DC-IRC> <laserarma> sounds interesting
<DC-IRC> <laserarma> i'll try it this weekend and let you know
<DC-IRC> <laserarma> stupid (but not so stupid) question: where do i need to put it?
<DC-IRC> <laserarma> 😂
<DC-IRC> <amazingfate> Create a file like `enable-gpu.dts` with the contents above, and then use command `sudo armbian-add-overlay enable-gpu.dts`. Then reboot.
<DC-IRC> <laserarma> fantastic, thank you
<DC-IRC> <amazingfate> Radxa is doing it these days. They have many 3399 related commits on their 5.10 branch.
<DC-IRC> <rpardini> nice. just got my first 3588 so will be going "in there" for first time
<DC-IRC> <MicroLinux (Salva)> Yeah, probably he means hw decoding only
<DC-IRC> <MicroLinux (Salva)> But rockchip linux 5.10 will not give him panfrost. Panfork it's just an rk3588 thing afaik, no mesa, no obs since it needs gl 3.3
<DC-IRC> <Tenkawa> @MicroLinux (Salva) exactly what I said earlier
<DC-IRC> <Tenkawa> GLES3.2 is going to be a problem with that board
<DC-IRC> <Tenkawa> GLES3.2 is going to be a problem with that board (his)
<DC-IRC> <MicroLinux (Salva)> No, the problem is that mesa provides 3.3
<DC-IRC> <MicroLinux (Salva)> On mainline you jsut need PAN_MESA_DEBUG=gl3
<DC-IRC> <MicroLinux (Salva)> But, on mainline it seems thst we don't have vpu drivers for encoding, just decoding
<DC-IRC> <Tenkawa> That's my point.. there is no mainline support
<DC-IRC> <MicroLinux (Salva)> And then amazingfate seems to be recommending rockchip linux, that has the vpu blobs but no mesa
<DC-IRC> <Tenkawa> that pan_mesa_debug is just a hack
<DC-IRC> <MicroLinux (Salva)> So, the only way to obs as today it's on mainline but software encoding
<DC-IRC> <Tenkawa> as it is
<DC-IRC> <MicroLinux (Salva)> Yes, but it works fine
<DC-IRC> <MicroLinux (Salva)> In fsct
<DC-IRC> <MicroLinux (Salva)> The driver can do 3.3, but its not fully conformant
<DC-IRC> <MicroLinux (Salva)> So, they only limit it to 3.1
<DC-IRC> <MicroLinux (Salva)> I ran tons of 3.3 gl games on rk3399
<DC-IRC> <Tenkawa> I've personally stopped trusting those env hacks over the years because of "unforseen effects" at some point along the way
<DC-IRC> <MicroLinux (Salva)> It's not that much of a hack
<DC-IRC> <MicroLinux (Salva)> It just override the gl extensions
<DC-IRC> <rpardini> damn.
<DC-IRC> <MicroLinux (Salva)> Obs runs perfectly on mesa
<DC-IRC> <MicroLinux (Salva)> Panfrost
<DC-IRC> <rpardini> so yeah fix that gpu on mainline and run with soft encoding seems less-worse
<DC-IRC> <MicroLinux (Salva)> Yes
<DC-IRC> <MicroLinux (Salva)> Up to 720p 30fps will be okay-ish
<DC-IRC> <MicroLinux (Salva)> And the cpu will need cooling
<DC-IRC> <MicroLinux (Salva)> Witha bit of OC you can get 1080p 30
<DC-IRC> <MicroLinux (Salva)> Not a bit.. severe
<DC-IRC> <MicroLinux (Salva)> 2.0 ghz big cores/1.6 or more low power cores
<DC-IRC> <MicroLinux (Salva)> Not efficient tho ha
<DC-IRC> <laserarma> i use it exactly at 720p 30fps with heatsinks and fan cooling
<DC-IRC> <laserarma> but i don't get why on rpi4 works great which has very similar gpu specs as the rock 4c+
<DC-IRC> <rpardini> no idea how's the venc on broadcom
<DC-IRC> <Tenkawa> @laserarma no.. it has a very different "type" of gpu
<DC-IRC> <laserarma> well unless i'm missing something, the rpi4 gpu driver is limited at 3.1 too, right?
<DC-IRC> <Tenkawa> RPI4 It is made for video though.. the rockpi's aren't really
<DC-IRC> <Tenkawa> RPI4 is made for video though.. the rockpi's aren't really
<DC-IRC> <laserarma> yes but the clock is slower, the core count is less, gpu is limited too.. i think that on rockpi's is just a driver "issue"
<DC-IRC> <Tenkawa> Broadcom did a lot of work customizing the RPI4 videocore to make it work well
<DC-IRC> <laserarma> sure, but 720p30 shouldn't be that bad on _any_ sbc i think
<DC-IRC> <laserarma> no doubt there's an issue, spinning the cpu at 70-80% just displaying a static image is absolutely not normal