#SteamLink

1 messages · Page 1 of 1 (latest)

gentle anchor
#

SteamLink - Linux Arm64

This SteamLink wrapper automatically checks for a SteamLink binary and, if one is found, it checks a version.txt file and compares the contents to the latest available. If there is no version.txt file or there is a new version, SteamLink is downloaded automatically with wget.

Don't have wget or curl? Go here: http://cdn.origin.steamstatic.com/steamlink/rpi/bookworm/arm64/public_build.txt and use the URL from that file to download the latest SteamLink binary. Extract the bin/shell file to steamlink/bin.

Disclaimers

This distribution is intended for Rocknix/Batocera for the Retroid Pocket 5 and Retroid Pocket Mini.

Thanks

A million thanks to Noxwell for their work on this, where the previous version of this wrapper was not functioning.

https://github.com/JeodC/Steamlink-Arm64

I used the ultra requirement for now but in theory any device on mainline (i.e. has x11) should work...I think. SteamLink uses about 833MB of ram.

austere sigil
#

what

#

did you figured it out?

gentle anchor
#

Not me

#

Noxwell

austere sigil
#

nice

gentle anchor
#

They're a rocknix server lurker

weary quartz
#

welp, I’ll have to try this tomorrow

gentle anchor
#

Oh it needs a wrapper library for different GPUs I think. To intercept the open and ioctl calls so they go to our actual DRM device instead of DMA_HEAP

dire brook
#

clearly this means I can install on my r36s..

#

slow turn to my device bursting into flames

weary quartz
#

Sorry, it seems it’s only for retroid stuff

dire brook
#

I know

#

That's the joke

weary quartz
#

yeah, I just saw that it is only for retroid so.. i was making fun of myself

gentle anchor
#

It's for anything with opengl, in theory.

austere sigil
#

and drm right?

gentle anchor
#

It might just need a library edit.

gentle anchor
austere sigil
#

"To intercept the open and ioctl calls so they go to our actual DRM device instead of DMA_HEAP"
How would it give it the calls to a drm device if it doesnt exist

gentle anchor
#

Everything has a direct rendering manager, right?

austere sigil
#

fbdev?

gentle anchor
#

That's our whole basis. "KMS/DRM it is" because we don't usually have a window system.

austere sigil
gentle anchor
#

...Ah. That would be a question for Noxwell then.

austere sigil
#

Just tried it on X55 Panfrost for fun, exact same results as earlier, boots into steam link ui but fails

#

btw you have a great taste in games lol

gentle anchor
austere sigil
gentle anchor
#

Did you replace the sh?

austere sigil
#

i thought i did

gentle anchor
#

Your log shouldn't have all those qt debug lines

austere sigil
#

Version is up to date. No need to download.
Running in UINPUT output mode.
Added controller with mapping 03009b4d4b4800000111000000010000,retrogame_joypad,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b8,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,crc:4d9b,
Connected to Remote Client service with session 3853463977145545286
Running in Fake Keyboard mode
Using ConfigFile steamlink.gptk
Joystick 0 has game controller name 'retrogame_joypad'

#

just replaced and now the app crashes too when it cant connect

gentle anchor
#

New log?

austere sigil
#

yeah thats it

#

oh wow it crashes too when i click on the settings icon

gentle anchor
#

if you know the ioctl call for its GPU I could add another library and probably swap between them using the portmaster launch script

#

I didn't mean to sign them up for all this so I'll try to learn 😄

#

@jagged granite Another thing to hack around with! 😄

gentle anchor
#

You tested the old one you said?

austere sigil
#

yeah

gentle anchor
#

Go to /storage/.config/Valve Corporation and delete the conf there

austere sigil
#

okay i just connected kbm as pressing a crashes it

#

okay it now goes black for like 20 seconds and i get the little bar at the bottom for a second that gives you a tip

#

do we handle that with ffmpeg?

gentle anchor
#

I wonder if your rocknix version has an older libavcodec?

#

Also what do you have in /dev/dma_heap?

austere sigil
gentle anchor
#

Named...?

austere sigil
#

system

gentle anchor
#

Welp

austere sigil
gentle anchor
#

RP has it as

#define DMA_HEAP_PATH "/dev/dma_heap/vidbuf_cached"
#define DRM_DEVICE_PATH "/dev/dri/renderD128"
#

So for your x55 the paths are wrong

#

I wonder if there's a good way to dynamically fetch the paths...

austere sigil
#

is the DMA_HEAP_PATH Important?

gentle anchor
#

Yeah we're intercepting the video stream where it wants to display at its own specific paths and substituting our own.

#

In /dev/dri/renderD128 do you have anything similar?

austere sigil
#

exactly the same

gentle anchor
#

Hm so your issue then is with ffmpeg

austere sigil
#

isnt that supplied by libavcodec.so.59

gentle anchor
#

Try a different game or two

austere sigil
#

?

gentle anchor
#

You crashed on trying to stream a game yes?

austere sigil
#

nope steam big picture

gentle anchor
#

I should ldd that thing

#

It'll probably ask for more stuff

austere sigil
#

still the same

#

RK3566_X55_Damian:~/roms/ports/steamlink/bin # ldd shell
linux-vdso.so.1 (0x0000007f9c5e7000)
libz.so.1 => /usr/lib/libz.so.1 (0x0000007f9b390000)
libSDL3.so.0 => not found
libSDL3_image.so.0 => not found
libSDL3_mixer.so.0 => not found
libSDL3_ttf.so.0 => not found
libavcodec.so.59 => not found
libavutil.so.57 => not found
libepoxy.so.0 => /usr/lib/libepoxy.so.0 (0x0000007f9b230000)
libwayland-client.so.0 => /usr/lib/libwayland-client.so.0 (0x0000007f9b1f0000)
libwayland-egl.so.1 => /usr/lib/libwayland-egl.so.1 (0x0000007f9b1c0000)
libdrm.so.2 => /usr/lib/libdrm.so.2 (0x0000007f9b180000)
libQt5Widgets.so.5 => not found
libQt5Gui.so.5 => not found
libQt5Network.so.5 => not found
libQt5Core.so.5 => not found
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0000007f9af20000)
libm.so.6 => /usr/lib/libm.so.6 (0x0000007f9ae70000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x0000007f9ae30000)
libc.so.6 => /usr/lib/libc.so.6 (0x0000007f9ac80000)
/lib/ld-linux-aarch64.so.1 => /usr/lib/ld-linux-aarch64.so.1 (0x0000007f9c5a0000)
RK3566_X55_Damian:~/roms/ports/steamlink/bin #

gentle anchor
#

Are you still using the old shell?

austere sigil
#

no i replaced the files like three times, atleast i hope i did

gentle anchor
#
Retroid_Pocket_Mini:/roms/ports/steamlink/bin # ldd shell
        linux-vdso.so.1 (0x0000ffffae26c000)
        libz.so.1 => /usr/lib/libz.so.1 (0x0000ffffad020000)
        libSDL3.so.0 => not found
        libSDL3_image.so.0 => not found
        libSDL3_mixer.so.0 => not found
        libSDL3_ttf.so.0 => not found
        libavcodec.so.59 => not found
        libavutil.so.57 => not found
        libepoxy.so.0 => /usr/lib/libepoxy.so.0 (0x0000ffffacec0000)
        libwayland-client.so.0 => /usr/lib/libwayland-client.so.0 (0x0000fffface80000)
        libwayland-egl.so.1 => /usr/lib/libwayland-egl.so.1 (0x0000fffface50000)
        libdrm.so.2 => /usr/lib/libdrm.so.2 (0x0000fffface10000)
        libQt5Widgets.so.5 => not found
        libQt5Gui.so.5 => not found
        libQt5Network.so.5 => not found
        libQt5Core.so.5 => not found
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0000ffffacbb0000)
        libm.so.6 => /usr/lib/libm.so.6 (0x0000ffffacb00000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x0000ffffacac0000)
        libc.so.6 => /usr/lib/libc.so.6 (0x0000ffffac910000)
        /lib/ld-linux-aarch64.so.1 => /usr/lib/ld-linux-aarch64.so.1 (0x0000ffffae230000)

Ok it's not me

#

avcodec is provided

#

You can't get to settings can you?

austere sigil
#

i can now with a kbm

gentle anchor
#

Your controller has no input?

austere sigil
#

oh wait just noticed b is a

gentle anchor
#

In settings try turning off hardware decoding

austere sigil
#

i just tried disabling video at all and that works

gentle anchor
#

lol

austere sigil
#

like it doesnt display video but input works

gentle anchor
#

Kinda misses the point

#

@subtle hazel Hey!

austere sigil
austere sigil
gentle anchor
#

I asked them to join a while ago.

#

They'd stepped away for a bit. Didn't wanna take credit for their work.

#

I did try this with westonpack but no surprise since it needs x11 it didn't work out the gate.

#

Maybe BinaryCounter will have an idea.

subtle hazel
#

Hello hello! So I took a quick look through the previous messages. Good news! I've hit that exact assertion issue before so I have some idea of what might be going wrong.

austere sigil
#

🍿

#

this is getting interesting

subtle hazel
#

I'm guessing it's the ioctl call in the wrapper being incorrectly targeted for whatever GPU is in your device, as Jeod hinted to earlier. Fill me in on what device you're using and, if you happen to know, what GPU driver you use for it? Currently the wrapper only targets MSM for Qualcomm GPUs

austere sigil
#

I mean the x55 it uses Panfrost on a Mali-G52

#

if that helps

gentle anchor
#

It's the x55

#

If you know a good method for gathering the info you need, we have tons of devices across our community

austere sigil
#

but it also supports libmali so it could be a mess

gentle anchor
#

x55 has so many hardware revisions it's probably the worst test candidate.

austere sigil
subtle hazel
#

I believe the Panfrost part is what I needed, give me moment to see if I can find the calls for it

#

Hmm. I should try to find a way to query the driver for a later revision, but yeah, one moment.

#

Is it okay If I just upload the .so straight into here for testing purposes?

#

I don't have an X55, so this is unfortunately going to be a remote debugging situation heh

subtle hazel
#

It ... shouuuuuld be okay.

austere sigil
#

okay idk if its my internet connection but it kinda works

subtle hazel
#

Is there a red or yellow antenna icon?

austere sigil
#

it works but its all funky but yes its there, im going to the router for a min

subtle hazel
#

That icon "usually" means it's a connection issue, but I'm not going to say I can't help at this point yet!

austere sigil
#

i currently dont have any other way to make a picture but colors are of and that green thing at the left/right side should not be there

#

but maybe thats a problem im getting from streaming from linux

#

ill boot into android and see if the errors are there too

subtle hazel
#

That seems like either an encode or decode error. Hm. Does the overlay have wrong colors too?

austere sigil
subtle hazel
#

Yeah, when you hold select

austere sigil
#

that looks correct

subtle hazel
#

Okay, so yes, it's not the GPU driver then, it's something about how the frames are being sent or received

austere sigil
#

hmm android looks right

subtle hazel
#

What GPU is in your machine you're streaming from?

austere sigil
#

uh thats a good question

#

do i even have one

subtle hazel
#

Oh.

austere sigil
#

yeah lol

subtle hazel
#

Can you pop the log.txt from steamlink on linux in here?

austere sigil
#

yeah wait a min its booting up again

subtle hazel
#

No worries

austere sigil
subtle hazel
#

Oh! Did you clear the configs after swapping the .so?

austere sigil
#

nope gonna try that

subtle hazel
#

Cause that looks like what happened when we tried it with old configs on the RP5

austere sigil
#

hmm still the exact same

#

okay it looks good now, the video was set to 420p wtf

subtle hazel
#

Ah I was about to say the resolution being set to
ffmpeg verbose: Reinit context to 864x480
was weird

dire brook
#

post pic

austere sigil
#

my webcam is a bit shitty

#

but it looks good beside my shitty internet

subtle hazel
#

Awesome! I'll stick around for a bit, and try to find a way to dynamically switch GPU drivers based on hardware in the mean time!

austere sigil
#

it currently looks like muOS is missing allot of libs after trying it thru westonpack

austere sigil
subtle hazel
#

If you're feeling adventurous and use weston as your compositor, you can try removing or commenting out the line
export SDL_VIDEO_DRIVER="x11" in the launch script to try using wayland directly

#

I know for a fact it doesn't work with sway right now though

#

If you see "No support for YU12 mod 0" it's not something that can be helped at the moment

#

Or if there's just no video lol

#

Or if you don't have either weston or x11(which can actually be xWayland but don't tell steamlink that) you can try to set SDL_VIDEO_DRIVER="kmsdrm" which should theroretically give better performance according to some code comments I've found.

gentle anchor
#

@untold scarab This may interest you with westonpack

untold scarab
#

I'm guessing the glibc version is too new for most distros, since it's based on bookworm...

gentle anchor
#

Correct, arkos is a no along with trimui and crossmix

subtle hazel
austere sigil
#

2.36 probably

subtle hazel
#

Yes, that's it

untold scarab
gentle anchor
#

I wonder how that performs

subtle hazel
#

So... question from someone still relatively new to all this. Can you run armhf binaries on aarch64? Or does it require some sort of kernel option? If so, I might be able to test that out too.

untold scarab
#

It requires the OS to ship armhf libraries and graphics drivers. I think all but CrossMix do

gentle anchor
#

*The manufacturer, in that case trimui

subtle hazel
#

Okay, so I can probably test in on my RPMini running Rocknix?

gentle anchor
#

Yes

subtle hazel
#

Sweeeet, I'll give it a shot after I finish reading up on this ioctl call that queries DRM drivers...

austere sigil
#

but you will probably need to replace all libs

gentle anchor
#

Oh yeah, armhf libs

subtle hazel
#

Ohh, yeah. Hm.

untold scarab
gentle anchor
#

libs.${DEVICE_ARCH} will find libs.aarch64 and libs.armhf

gentle anchor
untold scarab
gentle anchor
#

I tried it on rp and muos 40xx. It might actually be a sway thing.

subtle hazel
#

The shipped Qt5.14.1 doesn't have a wayland plugin, but it does seem to talk well with xwayland

untold scarab
#

One thing I noticed with Sway on libmali rocknix is that it will open a X11 display and listen on that socket, but Xwayland will immediately crash when an app opens a connection because it links to libGL.so, which is missing. Weird misconfiguration.

austere sigil
untold scarab
#

Well they can't really. That's the desktop GL part that you don't have on libmali.

subtle hazel
#

So from the supported devices list on the portmaster websie, It seems like I'll need to have support for libmali, panfrost, and msm since that covers what looks like all of those devices? Any oddball gpus I'm missing off the top of the head?

gentle anchor
#

@pearl heath This is the one that hates get_controls if that’s a must-have for some reason.

subtle hazel
#

Not considering the steam deck since... it's a steamdeck

pearl heath
#

Did you figure out the issue?

gentle anchor
#

Nope

pearl heath
#

Neat 😄

subtle hazel
#

Hmm. libmali might be off the table since it doesn't seem to have a standard DRM_IOCTL call for GEM handles. panfrost and msm for now then.

subtle hazel
subtle hazel
#

Seems like the current input implementation causes the dpad to double up on presses on the RP Mini (that I’ve noticed, maybe other inputs too)

subtle hazel
#

Might be because I remapped the controller when trying to fix the sticks earlier. I'll try clearing that

#

Cleared out storage/.lccal/share/Valve* but it's still happening for me... maybe I'm just cursed but it's most noticeable when tring to use the Big Picture menu to exit the stream rather than the overlay/

#

Commenting the GPTOKEYB line fixes it, so it's like it's reading both inputs?

#

OH

gentle anchor
#

I was considering not using gptokeyb to force a graceful exit anyway.

subtle hazel
#

I forgot to put the empty binding file in

gentle anchor
#

LOL

subtle hazel
#

So yes, it was reading both inputs lol

subtle hazel
#

Also here's the armhf version of the steamlink shell executable with RPi library dependencies haphazardly patchelf'd out and an armhf libgpucompat if anyone wants to try it? I couldn't get it to work on my RPMini becuase of an illegal instruction in shell, but if you have an ARMv7 thing you can try!

gentle anchor
#

That still needs the armhf libs we provide from the lib folder though.

#
    libavcodec.so.59
    libavutil.so.57
    libdouble-conversion.so.3
    libicudata.so.72
    libicui18n.so.72
    libicuuc.so.72
    libmd4c.so.0
    libSDL3.so.0
    libSDL3_image.so.0
    libSDL3_mixer.so.0
    libSDL3_ttf.so.0
#

These all need armhf versions if you want to use the armhf shell

subtle hazel
#

The ones it needs are in the zip from the Valve cdn. I can pop that in here if you want

gentle anchor
#

Oh let me do some sorting then

subtle hazel
#

The rest were provided via /usr/lib32 on rocknix, so hopefully?

#

No guarantees the patchelf'd version will work though. It might actually call something in the RPi libs

#

If it does I can pull those in too, but for now let's try without.

#

Oh, probably also need the Qt5.14.1 folder.

gentle anchor
#

ERROR: ld.so: object '/roms/ports/steamlink/libs.armhf/libgpucompat.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.

#

??

subtle hazel
#

Is it trying to preload into pm_helper?

#

file reports it as ARM right? Or did I upload the wrong one?

gentle anchor
#

I’ll check it later

gentle anchor
#

Ok, had to remove the preload.

#

Did you need ./bin/shell.armhf: error while loading shared libraries: libbcm_host.so: cannot open shared object file: No such file or directory?

#

I'm faking armhf on my Mini and it requests that

#

Oh you patch the rpi stuff out

#

I don't know if we can distribute it though

#

Hm

Retroid_Pocket_Mini:~/roms/ports/steamlink/bin # ldd shell.armhf
        not a dynamic executable
#

The repo linked in pin has been updated to support aarch64 and shows manual steps in readme if needed.

gentle anchor
#
No version.txt found. Downloading new package.
Downloading package from: https://media.steampowered.com/steamlink/rpi/bookworm/arm64/steamlink-rpi-bookworm-arm64-1.3.16.287.tar.gz
--1979-12-31 19:14:44--  https://media.steampowered.com/steamlink/rpi/bookworm/arm64/steamlink-rpi-bookworm-arm64-1.3.16.287.tar.gz
Resolving media.steampowered.com... 23.61.11.75, 23.61.11.60
Connecting to media.steampowered.com|23.61.11.75|:443... connected.
ERROR: The certificate of ‘media.steampowered.com’ is not trusted.
ERROR: The certificate of ‘media.steampowered.com’ is not yet activated.
The certificate has not yet been activated
Error: Download failed.

Tried it on trimui, this is new 😄

#

TrimUI is a perfect device for steamlink if we can get westonpack working with it.

#

Let's see...catching up. Westonpack needs xwayland?

gentle anchor
#

<@&1216123318122577972> Requires opengl (mainline) so far

#

X55 was tested once

#

SteamLink (requires x11 / xwayland)

subtle hazel
#

Sorry, had to pop away for a moment again. I think media.steampowered is actually http and not https for some reason?

gentle anchor
subtle hazel
#

Ah okay. I thought I saw a cert issue when I tried at one point but that might have been when I was trying random addresses to see if I can find a non 403/non rpi arm64 buiild

gentle anchor
#

They don't have one afaik

subtle hazel
gentle anchor
#

It may just work as-is, but it would need at least a few more libs like wayland-client.

#

libwayland-client.so.0 Oh nvm it's there

#

Did I set it up wrong...

subtle hazel
#

Oh, a secret thing! I feel like part of a club now.

gentle anchor
#

Well once this gets published you're gonna get the engineer role and see some of the backrooms

subtle hazel
#

Fun!

gentle anchor
#

Or you can just leave if you prefer not to stick around

#

Your choice

subtle hazel
#

I'll probably stay to lurk and see if another project trips the interest.

gentle anchor
#

There are always other projects 🙂

subtle hazel
#

So I don't remember if I mentioned it and I'm too lazy to search the thread right now, but I think shell does support using KMS/DRM directly for non compositor environments as long as it can grab the master role using SDL_VIDEO_DRIVER="kmsdrm"

#

I guess I could try by killing the sway service on the RPMini out of curiosity

gentle anchor
#

I'm 99% sure I tried that export and while the steamlink app booted up it would'nt grab the stream

#
Version is up to date. No need to download.
./bin/shell.aarch64: error while loading shared libraries: libwayland-client.so.0: cannot open shared object file: No such file or directory
Running in UINPUT output mode.
Running in Fake Keyboard mode
Using ConfigFile steamlink.gptk
Joystick 0 has game controller name 'TRIMUI Player1'

Yep

subtle hazel
#

Ah right, and even with QT_QPA_PLATFORM="eglfs" and QT_QPA_EGLFS_INTEGRATION="eglfs_kms" it still doesnt work right?

gentle anchor
#

Nope

subtle hazel
#

Darn, okay. Guess we have to stick with a compositor

gentle anchor
#

Unfortunately I don't remember what I did to get it to boot into the initial gui on muos. I remember getting it to do that on rg40xxh.

subtle hazel
#

Oh it needs libmtdev

#

for eglfs/kmsdrm

#

It starts rotated on t RPMini though so you need QT_QPA_EGLFS_ROTATION="something" too

#

90, -90, or 270

#

NOt sure which

gentle anchor
#

libmtdev?

subtle hazel
#

or symlink it, up to you

gentle anchor
#

I got it already but I still can't load it

subtle hazel
#

I don't think so? Here's the direct cmdline I'm running so it should be able to pick it up without the preload...
QT_QPA_PLATFORM="eglfs" QT_QPA_EGLFS_INTEGRATION="eglfs_kms" QT_QPA_EGLFS_ROTATION="-90" SDL_VIDEO_DRIVER="kmsdrm" LD_PRELOAD="/roms/ports/steamlink/lib/libgpucompat.so" LD_LIBRARY_PATH="/roms/ports/steamlink/Qt-5.14.1/lib:/roms/ports/steamlink/lib:/usr/lib/compat" /roms/ports/steamlink/bin/shell

#

But uh, if you rotate eglfs, the actual stream is rotated then

gentle anchor
#

I'm testing it with trimui and knulli, not rocknix

subtle hazel
#

But the menu isn't

#

OH

#

Pop ldd in the launch script real quick to see if it's missing any libs?

gentle anchor
#

Yeah it wants all these wayland libs

subtle hazel
#

...whyyyy though

#

It shouldn't even be TOUCHING wayland

#

You killed weston/sway right?

gentle anchor
#

I don't have weston on trimui/knulli

subtle hazel
#

hwat

gentle anchor
#

It's all drm

subtle hazel
#

So it's- yeah

gentle anchor
#

Like I said I was somehow able to get the app itself to boot on fbdev in muos two months ago but streaming would crash.

subtle hazel
#

You could try QT_QPA_PLATFORM="linuxfb" instead?

gentle anchor
#

Tried it

subtle hazel
#

I know your on the TrimUi, but

hell``` works (rotated) on RPMini
#

Huh, linuxfb DOES want libwayland-*... why?

#

Oh I think it's just baked into shell's dependencies?

#

Swapping the QT_QPA and doing ldd still shows libwayland- no matter what

gentle anchor
#

Yeah but I don't trust my WSL setup to not pull a bunch of unnecessary subdependencies.

subtle hazel
#

I think I have them already in my WSL, let me see...

gentle anchor
#

I'll just borrow them from my Mini

subtle hazel
#

Probably the better idea

gentle anchor
#

Now it wants libgssapi_krb5.so.2 but rocknix doesn't have that

subtle hazel
#

I mean... we could patchelf --remove-needed shell every time it updates :p

#

That's in /usr/lib/compat I think

#

libgssapi_krb5.so.2 => /usr/lib/compat/libgssapi_krb5.so.2

#

same with krb5support, k5crypto, and keyutils

gentle anchor
#

After all that

Version is up to date. No need to download.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
#

Still nothing

#

I have no idea why it tries to use xcb

#
# Exports post-setup
QT_VERSION=$(ls -d $GAMEDIR/Qt-* 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -n1)
export LD_LIBRARY_PATH="$GAMEDIR/libs.${DEVICE_ARCH}:$GAMEDIR/Qt-${QT_VERSION}/lib:${LIBARCH}compat:$LD_LIBRARY_PATH"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"

export LD_PRELOAD="$GAMEDIR/libs.${DEVICE_ARCH}/libgpucompat.so"
export QT_PLUGIN_PATH="$GAMEDIR/Qt-${QT_VERSION}/plugins"

export SDL_VIDEO_DRIVER="kmsdrm"
export QT_QPA_EGLFS_INTEGRATION="linuxfb"
subtle hazel
#

It's QT_QPA_PLATFORM="linuxfb"

#

No eglfs needed for that one

gentle anchor
#

Same thing unfortunately

subtle hazel
#

Still asking for xcb?

gentle anchor
#

No

#

qt.qpa.plugin: Could not load the Qt platform plugin "linuxfb" in "" even though it was found.

subtle hazel
#

HMMM

#

libevdev.so.2? I feel like that should be distro provided

#

The only major differences I see between xcb and linuxfb are:
xcb: (all the x11 stuff), libICE.so.6, libSM.so.s6
linuxfb: libdrm.so.2, libevdev.so.2, libinput.so.10, libmtdev.so.1

#

and libudev.so.1 for linuxfb

#

Weird suggestion, but maybe try without export QT_PLUGIN_PATH="$GAMEDIR/Qt-${QT_VERSION}/plugins"?

gentle anchor
#

I did some debug exports and was missing a few libs

#

New issue

#
Version is up to date. No need to download.
Running in UINPUT output mode.
QStandardPaths: wrong permissions on runtime directory /var/run, 7755 instead of 7700
xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
Failed to create xkb context
This plugin does not support createPlatformOpenGLContext!
Added controller with mapping 0300a3845e0400008e02000014010000,TRIMUI Player1,platform:Linux,b:b1,a:b0,dpdown:h0.4,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,dpleft:h0.8,rightshoulder:b5,leftshoulder:b4,righttrigger:a5,dpright:h0.2,back:b6,start:b7,dpup:h0.1,y:b3,x:b2,guide:b8,
Web request https://api.steampowered.com/ISteamApps/GetSDRConfig/v1?appid=353380 failed, CURL error SSL peer certificate or SSH remote key was not OK (60), HTTP error code 0
Web request https://api.steampowered.com/IRemoteClientService/CreateSession/v1 failed, CURL error SSL peer certificate or SSH remote key was not OK (60), HTTP error code 0
Couldn't connect to Remote Client service
Web request https://api.steampowered.com/IRemoteClientService/CreateSession/v1 failed, CURL error SSL peer certificate or SSH remote key was not OK (60), HTTP error code 0
Couldn't connect to Remote Client service
subtle hazel
#

I think it's trying to write to TrimUI's immutable file system parts

#

I saw a fix/workaround somewhere earlier

#

Wait is that right

#

No, sorry

#

No I'm just dumb

#

...maybe?

gentle anchor
#

That doesn't work here

subtle hazel
#

Ah sorry

#

Is it the cert thing again for some reason?

gentle anchor
#

Maybe? I tried disabling it with export CURL_CA_BUNDLE= but it doesn't do anything.

subtle hazel
#

Can you force CURL into http instead of https?

#

Or does it use the builtin request addresses?

gentle anchor
#
Web request https://api.steampowered.com/ISteamApps/GetSDRConfig/v1?appid=353380 failed, CURL error SSL peer certificate or SSH remote key was not OK (60), HTTP error code 0
Web request https://api.steampowered.com/IRemoteClientService/CreateSession/v1 failed, CURL error SSL peer certificate or SSH remote key was not OK (60), HTTP error code 0
Couldn't connect to Remote Client service
Web request https://api.steampowered.com/IRemoteClientService/CreateSession/v1 failed, CURL error SSL peer certificate or SSH remote key was not OK (60), HTTP error code 0
Couldn't connect to Remote Client service
Web request https://api.steampowered.com/IRemoteClientService/CreateSession/v1 failed, CURL error SSL peer certificate or SSH remote key was not OK (60), HTTP error code 0
Couldn't connect to Remote Client service
Web request https://api.steampowered.com/IRemoteClientService/CreateSession/v1 failed, CURL error SSL peer certificate or SSH remote key was not OK (60), HTTP error code 0
Couldn't connect to Remote Client service
Web request https://api.steampowered.com/IRemoteClientService/CreateSession/v1 failed, CURL error SSL peer certificate or SSH remote key was not OK (60), HTTP error code 0
Couldn't connect to Remote Client service
Web request https://api.steampowered.com/IRemoteClientService/CreateSession/v1 failed, CURL error SSL peer certificate or SSH remote key was not OK (60), HTTP error code 0
Couldn't connect to Remote Client service
Web request https://api.steampowered.com/IRemoteClientService/CreateSession/v1 failed, CURL error SSL peer certificate or SSH remote key was not OK (60), HTTP error code 0
Couldn't connect to Remote Client service
Web request https://api.steampowered.com/IRemoteClientService/CreateSession/v1 failed, CURL error SSL peer certificate or SSH remote key was not OK (60), HTTP error code 0
Couldn't connect to Remote Client service

I'm pretty sure it's stuck here.

#

Let me port this to my muos rq

#

It boots on muos but crashes at stream again

subtle hazel
#

Does the log say something about an unsupported gpu driver?

gentle anchor
#

Daughter wants a nap, will continue in a bit

subtle hazel
#

Sure thing

gentle anchor
# subtle hazel Sure thing
Version is up to date. No need to download.
QStandardPaths: wrong permissions on runtime directory /var/run, 7755 instead of 7700
xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
Failed to create xkb context
This plugin does not support createPlatformOpenGLContext!
[GPTK]: Running in UINPUT output mode.
Added controller with mapping 19004ca6010000000100000000010000,Deeplay-keys,a:b3,b:b4,x:b6,y:b5,leftshoulder:b7,rightshoulder:b8,lefttrigger:b13,righttrigger:b14,guide:b11,start:b10,back:b9,dpup:h0.1,dpleft:h0.8,dpright:h0.2,dpdown:h0.4,volumedown:b1,volumeup:b2,leftx:a0,lefty:a1,leftstick:b12,rightx:a2,righty:a3,rightstick:b15,platform:Linux,
Connected to Remote Client service with session 7393582391357445454
Starting Streaming
Received authorization proof request, responding with encrypted challenge
Received start streaming response k_ERemoteDeviceStreamingInProgress
Received start streaming response k_ERemoteDeviceStreamingSuccess
Initializing player
Couldn't initialize SDL: kmsdrm not available
QStandardPaths: wrong permissions on runtime directory /var/run, 7755 instead of 7700
xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
Failed to create xkb context
This plugin does not support createPlatformOpenGLContext!
Added controller with mapping 19004ca6010000000100000000010000,Deeplay-keys,a:b3,b:b4,x:b6,y:b5,leftshoulder:b7,rightshoulder:b8,lefttrigger:b13,righttrigger:b14,guide:b11,start:b10,back:b9,dpup:h0.1,dpleft:h0.8,dpright:h0.2,dpdown:h0.4,volumedown:b1,volumeup:b2,leftx:a0,lefty:a1,leftstick:b12,rightx:a2,righty:a3,rightstick:b15,platform:Linux,
Connected to Remote Client service with session 19904313966957188
[GPTK]: Running in Fake Keyboard mode
[GPTK]: Using ConfigFile steamlink.gptk
[GPTK]: Joystick 0 has game controller name 'Deeplay-keys'
[GPTK]: Killing: shell.aarch64
#

Muos uses fbdev

#

So...something not kmsdrm

subtle hazel
#

You could try SDL_VIDEO_DRIVER="directfb" or "fbcon"

gentle anchor
#

But all we can choose is wayland, x11, or kmsdrm

subtle hazel
#

oh true

#

It will try to use egl otherwise

#

Wait no, it uses egl for x11 anyway

gentle anchor
#

Lost cause unless we can use westonpack then?

subtle hazel
#

Give those two up there a shot for me, just to see

#

If they don't work, then yes

gentle anchor
#

Neither

subtle hazel
#

Also here's the cert extracted from api.steampowered if you want to try pointing curl to it on the TrimUI.
Extracted using curl -w %{certs} https://api.steampowered.com/IRemoteClientService/CreateSession/v1 > valvecacert.pem

gentle anchor
#

No point atm

subtle hazel
#

Ah okay

#

You could try SDL_DEBUG="1" and SDL_LOGGING="*=verbose" to see if it tells you why kmsdrm isn't working

gentle anchor
#

I got it to boot on my rg35xxsp, so will try the sdl logging

#

Nothing in logs

subtle hazel
#

Did you use both SDL_DEBUG and SDL_LOGGING at the same time? for some reason it needs both, sometimes

gentle anchor
#

Yes I did

subtle hazel
#

Alright, sorry. I figured but wanted to be safe

#

And they both use fbdev?

gentle anchor
#

Yeah

#

I finally ended up putting it in a conditional so I wouldn't have to keep editing.

subtle hazel
#

Does one happen to use a different /dev/fb*?

#

I doubt it but...

gentle anchor
#

No it's fb0

subtle hazel
#

The options that can follow linuxfb in a colon separated list are:
fb=/dev/fbN
size=<width>x<height>
mmsize=<width>x<height>
offset=<width>x<height>
nographicsmodeswitch
tty=/dev/ttyN
...but I don't really think any would help

#

But here's an example if you want to try:
QT_QPA_PLATFORM="linuxfb:nographicmodeswitch:tty=/dev/tty1"

gentle anchor
#

I wonder if I can use gl4es.

subtle hazel
#

...oh that might be it

gentle anchor
#

No dice unfortunately

subtle hazel
#

QT_QPA_PLATFORM linuxfb doesn't support opengl "This plugin does not support createPlatformOpenGLContext!" but SDL is probabyl trying to initialize it for the overlay surface

#

So might need to try QT_QPA_PLATFORM="eglfs" with QT_QPA_EGLFS_INTEGRATION="eglfs_kms" again unfortunately

#

...unless you were able to get into the stream with the SP?

gentle anchor
#

No stream

subtle hazel
#

Because the stream is when SDL tries to use kmsdrm

#

Doesn't touch it before hand

gentle anchor
#

LIBGL: Error while gathering supported extension (eglInitialize: EGL_BAD_DISPLAY), default to none

#

That's after attempting gl4es

subtle hazel
#

Ohhh.... I might need to swap the /dev/dri/ from renderD128 to card0 for those in libgpucompat then

#

WELP

gentle anchor
#

No because if I use gl4es I can't boot to the app even

subtle hazel
#

Oh okay

#

Wait, I have a 40xx h why am I not trying this?

gentle anchor
#

LOL

#

Ok I committed progress to the repo

#

App will boot but can't stream'

#

Works on rocknix

subtle hazel
#

Sorry uh, I should be able to just copy the Steam Link port folder into SD2/ports on muos and it should just detect it right?

gentle anchor
#

Yeah

#

The .sh needs to go in Roms/PORTS

subtle hazel
#

Oh okay. That's where I was messing up

subtle hazel
#

Should muos's tar have -z as an option? I might need to update...

#
Searching for 'shell' binary in the archive...
tar: invalid option -- 'z'
BusyBox v1.36.1 (2024-04-17 22:32:44 AEST) multi-call binary.

Usage: tar c|x|t [-ahvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [LONGOPT]... [FILE]...
Could not find shell binary in the archive!```
gentle anchor
#

I'm not sure.

#

Maybe I should include and use 7za

subtle hazel
#

I don't think muos' kernel is built to use mali as a DRM device so I'm not sure we'll be able to get it to work

#

Considering I don't see a /dev/dri/card0 or /dev/dri/renderD128

austere sigil
#

yeah muOS uses framebuffer so idk if you can apply the same changes you did here for fb

subtle hazel
#

The thing is that Steam Link itself REALLY wants to use DRM, so unless I/we can figure out another shim or wrapper library, H700 is probably a no

#

Actually... give me a minute

#

I feel like it should have opengles2 though...

Desktop mode: 1024x768@1x 60Hz
Effective refresh rate: 59.75
Couldn't create video display: opengles2 not available
Player failed to start video stream: width=1024, height=768```
subtle hazel
#

Hm. Is Crusty available outside of westonpack? A quick google doesn't seem to show me much.

austere sigil
subtle hazel
#

Oh I didn't know.

#

I'm just hoping the DRM stub part might be able to help

#

@untold scarab Sorry if an @ is inappropriate, just let me know if I shouldn't do that. But uh, any chance I could look at crusty or westonpack? Or am I still too new?

untold scarab
# subtle hazel <@147313153850474496> Sorry if an @ is inappropriate, just let me know if I shou...

The binaries are available at
https://github.com/PortsMaster/PortMaster-New/blob/main/runtimes/weston_pkg_0.2.aarch64.squashfs

Most of westonpack is open source software like Weston or Xwayland with some specific hacks applied to support some weird stuff (like headless mode while still capturing input devices).

Crusty is my compatibility layer that basically reroutes GLX and EGL (X11, Wayland and GBM extensions) into an SDL2 window, optionally through GL4ES. It also (poorly) emulates a DRM device just enough for most apps to believe they're interacting with a real one.

If you're looking for source code, sorry, I'm sadly not ready to publish it yet. It's a hot mess while I debug. Some devices are still in flux. The source will be released under MIT soon though.

GitHub

New PortMaster repo. Contribute to PortsMaster/PortMaster-New development by creating an account on GitHub.

austere sigil
#

Check the value of the fourth command line argument, GL Libs
case "$4" in
gl4es)
echo "Setting up GL4ES"
export gllib_aarch64="$weston_dir/lib_aarch64/graphics/gl4es_x11/"
export gllib_preload="$gllib_aarch64/libEGL.so.1:$gllib_aarch64/libGL.so.1"
export LIBGL_FB="${LIBGL_FB:=4}" #Puts GL4ES into GBM mode if not specified otherwise
;;
crusty_gbm)
echo "Setting up crusty_gbm"
export gllib_aarch64="$weston_dir/lib_aarch64/graphics/crusty_gbm$crustydebug/"
export gllib_preload="$gllib_aarch64/libcrusty.so"

That sounds like what you want or am i stupid?

#

what is that, that sounds painful ( sorry a bit offtopic)

else
    rm -rf /tmp/.X11-unix/X1

    # check if theres a valid (non-stale lockfile for the :0 x11 display socket)
    if [ -f "/tmp/.X0-lock" ]; then
        pid=$(cat "/tmp/.X0-lock")
        if kill -0 "$pid" 2>/dev/null; then
            echo "Valid lockfile on :0"
            xsock=":1"
            xfile="/tmp/.X11-unix/X1"
        else
            rm -rf /tmp/.X11-unix/X0
        fi
    else
        rm -rf /tmp/.X11-unix/X0
    fi
fi
subtle hazel
#

Ah thank you both! I'll take a look through and see if it's even what I'm hoping for. I'm really just needing to get past the /dev/dri/card0 init in SDL because I feel like the rest can be handled by fake memfd "DRM" buffers

#

All Steam Link really wants is somewhere to store the pixel data before trying to blit it to the EGL surface

#

But SDL insists it needs a DRM device for that

untold scarab
subtle hazel
#

I've tried mknod but it errno 6's me

#

Haven't done a full strace or anything yet

#

We're already using LD_PRELOAD for the DMA_HEAP -> DRM device buffer allocation which works for the X55 and RP5/Mini

#

So i'll probably add to that

#

Will just do a check somewhere "if the drm device doesn't respond right, do a memfd buffer instead"

untold scarab
#
#define _GNU_SOURCE
#include <dlfcn.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <string.h>
#include <sys/epoll.h>
#include <sys/stat.h>
#include "../../backends/backend.h"
#include "drm_io.h"
#include <drm_mode.h>


static int drm_fd[2];

#define    F_GETFD        1
#define F_GETFL        3
#define F_SETFL        4
#define O_RDONLY    00000000
#define O_WRONLY    00000001
#define O_NONBLOCK    00004000
#define AT_FDCWD                -100

__attribute__((constructor))
void init_drm_io()
{
        drm_fd[0] = _open64("/tmp/drmpipe", O_RDONLY | O_NONBLOCK, NULL);
        drm_fd[1] = _open64("/tmp/drmpipe", O_WRONLY | O_NONBLOCK, NULL);
}

int _open64(const char *pathname, int flags, mode_t mode)
{
    return syscall(SYS_openat, AT_FDCWD, pathname, flags, mode);
}

int open64(const char *pathname, int flags, mode_t mode) {
    if(strcmp(pathname,"/dev/dri/card0")==0)
        return drm_fd[0];
    return _open64(pathname, flags, mode);
}

int open(const char *pathname, int flags, mode_t mode) {
    return open64(pathname, flags, mode);
}

static int (*_ioctl)(int fd, unsigned long request, void *arg);

int ioctl(int fd, unsigned long request, void *arg) {
    if (!_ioctl) {
        _ioctl = dlsym(RTLD_NEXT, "ioctl");
    }
    if (fd==drm_fd[0]) {
        INFO("DRM Intercepted ioctl: fd=%d, request=0x%lx\n", fd, request);
        // Handle specific DRM ioctls here
        switch (request) {
            case 25630: //DRM_IOCTL_SET_MASTER
            return 0;

        case 25631: //DRM_IOCTL_DROP_MASTER
            return 0;

        case 0xc04064a0: //DRM_IOCTL_MODE_GETRESOURCES
            return 0;
        }
        return -1;
    }
    return _ioctl(fd, request, arg);
}

extern int fcntl(int fd, int op, ... /* arg */ );
void signal_drm_readable() {
    if (fcntl(drm_fd[1], F_GETFD) == -1) {
    perror("Invalid file descriptor");
    return;
}
    const char *msg = "d";
    if (write(drm_fd[1], msg, 1)==-1) {
        perror("write");
    }
}

void clear_drm_readable() {
    char buffer[1024];
    ssize_t bytes_read;
    while ((bytes_read = read(drm_fd[0], buffer, sizeof(buffer))) > 0) {
    }
}

Warning: Hot mess.

So this assumes you have created a fifo file at /tmp/drmpipe. It hooks into open() to redirect any request for /dev/dri/card0 to /tmp/drmpipe. It also answers a couple of DRM related ioctl requests. There's also two functions that are used by my libdrm stub to do some signalling acros process boundries.

#

Like i said it's awful and hacky. But it gets the job done 95% of the time. It's amazing what you can get away with.

austere sigil
#

wow even some comments

#

that isnt as bad as i thought

subtle hazel
#

I'll post my wrapper code if it might make you feel better!

untold scarab
austere sigil
#

that would take a day for me

#

im really shitty at coding

untold scarab
#

harness the power of the magic text box websites that do everything for you if you explain your situation well enough, and then spend 15 of those 20 minutes arguing with it why you can't just download better graphics drivers.

subtle hazel
untold scarab
#

That is a lot better code lol

subtle hazel
#

The eye of the beholder and all that

untold scarab
#

I do very little error checking. I figure if it's gonna crash, it's gonna crash in a way where a user of my library would be unable to debug it anyway. So i just heavily trace when my library is in debug mode and let it segfault naturally doggokek

subtle hazel
#

TRUE FACTS

#

I remember I tried to hook every single open() call at first with a strcmp

#

Didn't even get to the steam logo within 3 minutes

untold scarab
subtle hazel
#

It would if sway didn't like to open recursively to find stuff 🙃

#

I had to add path[0] == '/' to the first if and somehow that helps A LOT

#

But with WAYLAND_DEBUG=1, I saw sway do: open"dev", open"dev/dri", open"dev/dri/whatever", open"dev/yada/yada..." a LOT

#

Which seems REALLY inefficient to me but maybe I don't understand it

untold scarab
#

That doesn't seem correct, IO is super expensive...

subtle hazel
#

Let me see if I can find an old strace real quick

#

It just baffled me

untold scarab
#

also why would it need to open the drm card more than once?

subtle hazel
#

I DONT KNOW

#

Maybe it wasnt sway

#

It was something though

#

like...

#

SOMETHING is checking every possible directory until it matches or runs out of stuff somehow

untold scarab
#

That's pretty normal. But it should only search in dev and sys. I only had it slow down at startup by maybe a second or two.

subtle hazel
#

Oh. Hm. Maybe I just did something wrong initially

#

All I know is that path[0] check fixed it for reasons. I might not need it now

#

Anyway, I might go to bed here soon too. I'll pick it back up when I can tomorrow after this leftover cheesecake slice jumps down my throat.

#

Thank you though!

subtle hazel
#

Hum. So something about my libgpucompat.so wrapper seems to be what's messing with the controls.

#

I'm guessing I'm handling the open/ioctl calls slightly wrong enough

#

Because when I don't LD_PRELOAD it, controls work

subtle hazel
#

i hate

gentle anchor
#

Controls worked after we commented out get_controls or do you mean something else?

subtle hazel
#

After I removed LD_PRELOAD, i mean

gentle anchor
#

Wasn't preload needed for stream to work?

subtle hazel
#

But I think I've fixed it now? Followed the code example above for hooking open calls, but now I'm not sure if my muos is just outdated because ssh'ing says it's ANBERNIC-keys, but PortMaster control.txt seems to want Deeplay-keys

#

And yes

#

But now we shouldn't need to comment get_controls. I think

gentle anchor
#

Gotta dig up your repo and get the new lib and source...lol

#

Waaait you got it working in muos?

subtle hazel
#

I've got it... doing things.

#

Not correct things, but things

austere sigil
#

🍿 this is getting interesting now

subtle hazel
#

I'll post up the updates in my repo after I try updating muos and see if it's correct

#

Otherwise I may be talking out my butt atm

gentle anchor
#

I invited you to collab on the one I use in the OP (with the downloader).

#

I also linked to yours in the readme to keep original source intact.

subtle hazel
#

Off topic but what the crap when did I get 50 MB/s dl speeds?

austere sigil
#

or are you downloading a file?

subtle hazel
#

downlading

#

that sub 10 upload though

gentle anchor
#

Jelly

subtle hazel
#

I used to be at like 200. They must be trying to compete with the fiber coming in... ANYWAY

#

I guess I could try it on the RPMini while I wait for the reflash

#

Uncommented get_controls, removed export SDL_GAMECONTROLLERwhatever and GPTOKEYB, sticks still work

#

on the mini

#

But updated muos is still using X for A and reporting the device as Deeplay-keys

gentle anchor
#

My muos does that as well.

subtle hazel
#

RG40XX-H

#

oh okay

#

So it's no longer my fault!

gentle anchor
#

Don't think so

#

Maybe we don't want gptokeyb anyway to force graceful exits.

#

Otherwise the pc can get a bit messed up. Mine won't revert to native resolution for example.

subtle hazel
#

I'm cool with it

#

removing gptokeyb I mean

#

Uh. Is PortMaster supposed to throw a lua error on first run in muos?

#

It gets past it after a second but that was weird

gentle anchor
#

Lua? Something to do with the new splash screen.

subtle hazel
#

Yeah, it said .png was unsupported

#

I just updated it though so maybe that will fix it

#

Yeah no it's good now

#

Should we be using Deeplay-keys?

19000000010000000100000000010000,Deeplay-keys```
gentle anchor
#

Yeah that’s the name in controllerdb

subtle hazel
#

But the bindings are all... funky.

#

Unless it's just Steam Link

gentle anchor
#

Every other port uses it I think

subtle hazel
#

yeah 2048 is fine

#

Might need to pull the string from a non get_controls launch and override it for Steam Link then

austere sigil
#

cant you set the input in steamlink itself under settings?

subtle hazel
#

I tried, it won't even read A or B

austere sigil
#

hmm for me on rocknix it worked last time

subtle hazel
#

I'll try again now that my library should be fixed

#

Okay so you can, but selecting the config option automatically maps X to A for... reasons

#

You can map every other button/stick though

#

Okay so remap it in Steam Link. Trying to use muOS-Keys makes the rumble go off forever

subtle hazel
#

Gotta bounce for a short bit, but here's the updated source and library. Haven't set up the repo yet, but I can push it when I get back if you want. Still no stream on muos yet though

gentle anchor
#

Added in, thanks!

austere sigil
left island
#

Well I guess I'm just wondering when it's gonna be implemented

untold scarab
left island
#

You'll come out on top

subtle hazel
#

Huh. So... I'm trying to get SDL to use GL4ES by setting SDL_EGL_LIBRARY="<gl4es.so path>" but it only loads when I'm closing the app?

#

Which is probably not how it's supposed to be used anyway

subtle hazel
#

Oh that's why opengles2 isn't found on muos...

/usr/lib/libGLESv2.so: symbolic link to libmali.so```
gentle anchor
#

Wanna keep at it or just push it out as-is for panfrost requirement?

subtle hazel
#

Let me clean it up for panfrost/msm only and then we can push it out. I'm not sure if steam link even likes resoultions around 480p since when I try to change the settings in app, it likes to resize past the actual screen on the 40xx-h

subtle hazel
#

PR sent

#

Also I'm treating myself to late birthday gift with a TrimUI Smart Pro, so that might be my next target

gentle anchor
#

Neat! I think we don't need the shell libs if we aren't using kmsdrm...

subtle hazel
#

Oh, probably yes

#

I would move the krb5 related ones into the main libs.aarch64 though

#

Unless you would rather keep the /usr/libs/compat in the launch script instead

#

Because I removed that because we had them in the folder already. whoops

gentle anchor
#

It's alright

subtle hazel
#

It might just improve compatibility to keep them in the long run though

#

Valve could always add new dependencies anyway

gentle anchor
#

Nah I'll move krb5 to mainlib and keep shell folder for later if we end up getting ksmdrm to work

#

Will just skip shipping the unused libs for PM package

subtle hazel
#

Sounds good

gentle anchor
#

Next I'll see if I can wrap the download script into our PM patcher gui..

subtle hazel
#

That would decrease launch friction a bit yeah.

#

Wouldn't need to sit there with a black screen for a bit

#

Also it would keep it from breaking if new dependcies are added

gentle anchor
#

Ok, got it more user-friendly. Try wiping it entirely from your folder and start from scratch 🙂

subtle hazel
#

Just shell and Qt or like, the whole thing?

gentle anchor
#

The whole thing

subtle hazel
#

Oh wow okay, one moment

gentle anchor
#

Gotta make sure it'll work well for a new user.

subtle hazel
#

Pretty!

#

Do we need to chmod +x on download?

#

Or will PortMaster handle that?

#

Oh, I guess I also need the libs that aren't pulled from the tar, whoops!

#

Yeah, other than me forgetting the chmod and libs, it works! Got into the stream and launched Big Picture, inputs worked.

gentle anchor
#

PM only chmods what it downloads from github

#

We do need to chmod +x shell

#

Now I need to figure out a way to use the mouse...

subtle hazel
#

It doesn't show up when you plug one in? Or do you mean with a stick?

gentle anchor
#

With the stick

subtle hazel
#

Do you want it in Stream or just in general? In steam, open the overlay by holding select and there's a mouse mode

gentle anchor
#

No I got that but it's the software cursor ingame that seems broken

#

Hmm

subtle hazel
#

It's... there, just hidden

#

Huh

#

I wonder if it's the VirtualHere stuff they added recently

#

I swear I saw it once though

gentle anchor
#

Bummer, steinsgate is impossible to play without that.

#

Oh well, it works for most games.

subtle hazel
#

Could always use the touchscreen on devices with those :p

gentle anchor
#

Unfortunately it has a weird launcher and touchscreen doesn't work with it.

subtle hazel
#

Ah, darn

subtle hazel
#

what

Desktop mode: 640x480@1x 2e+06Hz
Effective refresh rate: 1999999.62```
#

It crashed after saying this but like... huh

austere sigil
gentle anchor
#

I was about to submit it for panfrost.

subtle hazel
#

Yeah, I am, but I'm likely not going to get anywhere useful for a bit

#

I would rather use panfrost if it's available over kmsdrm anyway

gentle anchor
#

Alrighty, will submit then.

#

Welcome to the engineers

subtle hazel
#

Whee

#

Oh, there's no SMS 2FA on Discord?

#

I know it's pretty lackluster but ughhh fine I'll download an app...

subtle hazel
#

So what's the recommended firmware for PortMaster on the TrimUI Smart Pro? Stock, CrossMix, or Knulli? I feel like Knulli will be the easiest to test on

subtle hazel
#

Maybe using something other than relying on the distro's tar would be best since I seem to be getting "tar: stdout: write error" on Knulli when trying to patch via the launch script. Weird part is that it extracts the shell part just fine, the rest errors out.

gentle anchor
subtle hazel
#

Ah, try stock then?

gentle anchor
#

Eh

#

You just need to Chmod the tar

#

Throw that in the download script, chmod 777 right after it downloads

subtle hazel
#

I'll pop that in the download script for now then yeah

#

Oh, upon actually looking at the files, it IS extracting them

#

They all just have NO permissions

#

except shell

#

so I'm going to do the stupid and add chmod -R 777 ./* to the launch script before the actual run

subtle hazel
#

In the latest edition of "What? Why is that like that???", it turns out that Steam Link checks for Linear pixel format modifiers but NOT wildcard pixel format modifiers. So it insists that wayland doesn't support YU12 Linear, when really it supports YU12 "anything"

#

Anyway my dog went back to sleep so I shall too

tiny elm
#

Hi there, I'm trying to run steamlink on EmuElec, but it doesn't start, the log.txt says:
./bin/shell.aarch64: error while loading shared libraries: libwayland-client.so.0: cannot open shared object file: No such file or directory
Any ideas? I know that EmuElec doesn't have x11, - and I'm not sure if xwayland is installed, too - is that the reason? Can I check that somehow?

subtle hazel
tiny elm
#

It's an amlogic s905x2

#

I know that you don't support Emuelec, but I just wanted to try if it works... so no problem if you say that's not your issue!

fierce blaze
#

Yes, as the title says, you need xwayland

#

Btw have you had any success with westonpack under emuelec? I have no clue if it works there

tiny elm
#

Yes, I got Superhexagon running, and this uses westonpack, right? That's why I thought that perhaps SteamLink will work, too...

subtle hazel
#

Also I’m not sure if even with xwayland that that GPU would be detected right at the moment.

#

And I have yet to implement westonpack heh

#

Been busy with updating the Half-Life port whoops

fierce blaze
#

Well that explains it ;D

tiny elm
#

Ah, I see... I think that I can also add user bins / libs to the system... which files would I need for that? Only the libway-client.so.0 or more?

subtle hazel
#

Let me take a look at what was shipped after I take my dog out for the morning.

tiny elm
#

Thank you, and as I said, it's completely up to you if you want to cope with that. But you would definitely make a lot of us EmuElec users really happy... so I will just stay tuned and check again. Thanks for your feedback!

subtle hazel
#

Oh I want to get this as far as I can!

tiny elm
#

That would be really great!

gentle anchor
tiny elm
subtle hazel
#

@untold scarab Moving up here to keep the other chat free

untold scarab
#

👌

subtle hazel
#

So Steam Link has like three render modes.

QT_QPA_PLATFORM=xcb SDL_VIDEO_DRIVER=wayland
QT_QPA_PLATFORM=linuxfb SDL_VIDEO_DRIVER=kmsdrm```
#

xcb is the default, so that can be omitted if you want

#

And I commented out my preload near the top, if you want to try using it feel free

#

I really do think we can get away without my preload IF we can get it to ignore dma_heap somehow

#

Because currently Steam Link is hardcoded to use dmabufs from /dev/dma_heap

untold scarab
subtle hazel
#

YUP

untold scarab
#

and crusty does not emulate them

subtle hazel
#

Or a lot of places really!

#

Mine wrapper just says "Haha yeah man, it exists... here's your FD!"

untold scarab
#

oh so a lot like my implementation of DRM 😅
You wanna open /dev/dri/card0? Sure here's your FD for /tmp/drmfifo

subtle hazel
#

Well I move it over to the actual DRM implementation, if I can

#

Otherwise it gets shm/memfd

untold scarab
#

You'd be surprised but before i used a fifo pipe to actually answer some DRM commands, i was just giving it a FD for /dev/null and that worked on half the apps

subtle hazel
#

YEAH

#

It just checks for it

#

ITS WEIRD

subtle hazel
#

OH

#

I HAVE WORK FOR YOu

#

The download script is silly on muos!

gentle anchor
#

It's what

subtle hazel
#

Because their tar doesn't have the -z option

#

SILLY

#

LIKE A BILLY

gentle anchor
#

@steep scaffold Add it to the Pixie list of shit 😄

subtle hazel
#

And I think Knulli on the TSP was weird too, but I need to check again

gentle anchor
#

Ok so yeah I remember suggesting to just include and use 7za instead of relying on a cfw built-in tar

subtle hazel
#

I'd be okay with that

untold scarab
#

@subtle hazel !!!!!!!!!!

subtle hazel
#

No that's normal

#

QT doesn't use the renderer

#

I know I was excited too

untold scarab
#

I can definitely connect and stuff.
This is in mode 3 with crusty GBM btw

subtle hazel
#

Wait wha

#

You have a screen

#

streaming????

untold scarab
#

Sadly not.....

subtle hazel
#

That's the part we're stuck on yeah

untold scarab
#

Big picture launches but the app hangs on the connect screen

subtle hazel
#

No useful log output I'm guessing?

untold scarab
#

Actually doesn't hang, fully exits. GDB just caught it

QFont::setPixelSize: Pixel size <= 0 (0)
Cannot create window: no screens available

Thread 1 "shell.aarch64" received signal SIGABRT, Aborted.
0x0000007fb252a0d0 in ?? () from /lib/libc.so.6
(gdb) 
subtle hazel
#

Hmmm

untold scarab
#

I'm gonna search for that string in the QT source code, see if something jumps out at me

subtle hazel
#

I think I know where to look at the Steam Link part.

#

But two heads are better than one

untold scarab
#

wait, so the UI i just saw where i set up my connection, is that QT or SDL?

subtle hazel
#

Qt

#

Qt5.14.1 to be precise

#

SDL does the stream rendering

#

I think the QFont is a red herring

untold scarab
#

and I'm guessing linuxfb means it draws the QT windows directly to /dev/fb0, no GPU stuffz?

subtle hazel
#

As far as I can tell yes

untold scarab
#

Ahh, i think that won't work anywhere but muOS anyway. I don't think we have fb0 on drmkms systems

subtle hazel
#

is there any lines about drmu or drmu_prime in your log?

untold scarab
#

looking (it's a lot of logs. QT iterates through the entire udev setup, every single command gets logged)

subtle hazel
#

No worries

#

SHould have a bunch of >>>>>> or <<<< or something

#

Hm hmmm

#
Desktop mode: 640x480@1x 2e+06Hz
Effective refresh rate: 1999999.62
../../src/external/testffmpeg_rpi/external/drmu/drmu/drmu.c:3506:drmu_env_new_fd2: Failed to set atomic cap
>>> drmprime_out_new_fd: FAIL
Couldn't create video display: Couldn't create display output
Player failed to start video stream: width=640, height=480```
#

That refresh rate is funny, but probably a side effect

untold scarab
#

Nope, nothing, just a log from crusty that it intercepts a drm device being opened

untold scarab
subtle hazel
#

AHA

#

It wants an actual response

untold scarab
#

what library do i need to LD_PRELOAD for your drm stuff to work?

subtle hazel
#
    if ((rv = env_set_client_cap(du, DRM_CLIENT_CAP_ATOMIC, 1)) != 0) {
        drmu_err(du, "Failed to set atomic cap");
        goto fail1;
    }
    // We want the primary plane for video
    if ((rv = env_set_client_cap(du, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1)) != 0)
        drmu_debug(du, "Failed to set universal planes cap");
    // We can understand AR info
    if ((rv = env_set_client_cap(du, DRM_CLIENT_CAP_ASPECT_RATIO, 1)) != 0)
        drmu_debug(du, "Failed to set AR cap");
    // We would like to see writeback connectors
    if ((rv = env_set_client_cap(du, DRM_CLIENT_CAP_WRITEBACK_CONNECTORS, 1)) != 0)
        drmu_debug(du, "Failed to set writeback cap");```
#

But it shouldn't help

#

...I think

#

Yeah because for this one it's redirecting to a shm

untold scarab
#

Well it doesn't crash or SIGABORT anymore so i guess that's progress? It just goes back to the menu

#

I'm getting Couldn't initialize SDL: kmsdrm not available. Are you sure that the SDL3 you shipped has that backend enabled?

subtle hazel
#

Yes, I've checked more times than I'm proud of

#

It's coded to say "$SDL_VIDEO_DRIVER not available" on almost every failure

#

Gimme a moment to see if I can just. lie to it some more

#

Well I'm lying correctly

#

But now crusty can't get in

#

Yaeh, it's a conflict between our two wrappers

untold scarab
#
[CRUSTY]T File /crusty/src/frontends/drmgbm/egl.c | Line 331 :: HOOK eglBindAPI
[CRUSTY]T File /crusty/src/backends/sdl2/sdl2.c | Line 325 :: SDL2 make_current 0x55569ec670 0x555692fae0 0x55569829a8
../../src/external/testffmpeg_rpi/external/drmu/drmu/drmu.c:3506:drmu_env_new_fd2: Failed to set atomic cap
>>> drmprime_out_new_fd: FAIL
Couldn't create video display: Couldn't create display output
DRM Intercepted ioctl: fd=3, request=0x4010640d
[CRUSTY]M File /crusty/src/frontends/drmgbm/gbm.c | Line 174 :: STUB gbm_surface_destroy
[CRUSTY]M File /crusty/src/frontends/drmgbm/egl.c | Line 288 :: STUB eglTerminate
[CRUSTY]M File /crusty/src/frontends/drmgbm/gbm.c | Line 133 :: STUB gbm_device_destroy
[CRUSTY]M File /crusty/src/frontends/drmgbm/drm.c | Line 450 :: STUB drmAuthMagic
[CRUSTY]M File /crusty/src/frontends/drmgbm/drm.c | Line 947 :: STUB drmDropMaster
Player failed to start video stream: width=640, height=480
[LWP 1868 exited]
[LWP 1867 exited]
[LWP 1866 exited]
[CRUSTY]M File /crusty/src/frontends/drmgbm/drm.c | Line 1159 :: STUB drmModeFreeConnector
[CRUSTY]M File /crusty/src/frontends/drmgbm/drm.c | Line 1154 :: STUB drmModeFreeCrtc
QStandardPaths: wrong permissions on runtime directory /tmp/weston_runtime, 7755 instead of 7700
Error reading fixed information (No such file or directory)
linuxfb: Failed to initialize screen
DRM Intercepted ioctl: fd=3, request=0x4602

Hmmmmmmmmmmm

subtle hazel
#

I'm gonna try adding that /dev/null hack to mine as a quick temporary workaround

untold scarab
#

The "DRM Intercepted ioctl" stull is from crusty.
What other IOCTLs is it expecting?

#

Just these?
#1345927176792571914 message

subtle hazel
#

I believe so

untold scarab
#

i guess atomic cap in particular since they don't immediately go to the failure state

subtle hazel
#

I don't think it tries DMA_HEAP in kms mode

untold scarab
#

crusty doesn't implement atomic caps but i can just lie and see where that gets us

#

I think this is actually it, because the intercepted ioctl number is defined in the drm header as DRM_IOCTL_SET_CLIENT_CAP

#

new IOCTL unlocked: 0xc01064b5

#

DRM_IOCTL_MODE_GETPLANERESOURCES

subtle hazel
#

Is... is that good?

untold scarab
#

It's further, but also very scary becuse it apparently implements all its DRM through IOCTLs instead of libdrm. My entire implementation relies on hooking libdrm....

subtle hazel
#

I see.

untold scarab
#

I'll just continue lying

#

has it really come to this?

subtle hazel
#

Oh what are we ghidra'ing for?

austere sigil
untold scarab
subtle hazel
#

I radare2'd it before

#

Oh is that all you wnat

untold scarab
subtle hazel
#

Follow that around a bit

#

Are we back to trying for x11/egl btw?

untold scarab
#

ah so first observation: It uses libepoxy to interact with EGL

untold scarab
subtle hazel
#

Fair

#

Not without coding an actual drm driver

untold scarab
#

Well i have tons lies set up on libdrm, but not on the ioctl versions, so porting that over would be like 3k lines of code that i don't feel like writing

subtle hazel
#

Mmkay!

#

I gotta take a moment away, sorry.

#

Ping me if there's any breakthroughs or if you think I might know something to help!

untold scarab
#

I think i may have found at least one of the issues:

SDL_VIDEO_X11_FORCE_EGL
was replaced with
SDL_VIDEO_FORCE_EGL

at some point during SDL3 development. The wiki for this is outdated. After setting that to 1 I'm now getting Crusty logs generated by SDL3 trying to init

[CRUSTY]T File /crusty/src/backends/sdl2/sdl2.c | Line 221 :: SDL2 get_backend_display 0x55569670a0
X11 backed surface requested
[CRUSTY]T File /crusty/src/backends/sdl2/sdl2.c | Line 278 :: SDL2 initialize_window_surface
[CRUSTY]T File /crusty/src/frontends/x11egl/egl.c | Line 413 :: HOOK eglBindAPI
[CRUSTY]T File /crusty/src/frontends/x11egl/egl.c | Line 279 :: Hook eglCreateContext
[CRUSTY]T File /crusty/src/backends/sdl2/sdl2.c | Line 229 :: SDL2 get_backend_context 0x555697f2c0
[CRUSTY]T File /crusty/src/frontends/x11egl/egl.c | Line 413 :: HOOK eglBindAPI
[CRUSTY]T File /crusty/src/backends/sdl2/sdl2.c | Line 325 :: SDL2 make_current 0x55569670a0 0x555697f2c0 0x55569cf708
[CRUSTY]T File /crusty/src/frontends/x11egl/egl.c | Line 44 :: HOOK eglQueryString 12373 0x55569670a0
[CRUSTY]T File /crusty/src/backends/egl_loader.c | Line 21 :: LINK eglQueryString
[CRUSTY]T File /crusty/src/backends/egl_loader.c | Line 30 :: LINK eglSwapInterval
[CRUSTY]T File /crusty/src/backends/egl_loader.c | Line 30 :: LINK eglSwapInterval
vidout_simple_new: Failed to create dmbauf control
[CRUSTY]T File /crusty/src/frontends/x11egl/egl.c | Line 413 :: HOOK eglBindAPI
[CRUSTY]T File /crusty/src/backends/sdl2/sdl2.c | Line 325 :: SDL2 make_current 0x55569670a0 0x555697f2c0 0x55569cf708
[CRUSTY]M File /crusty/src/frontends/x11egl/egl.c | Line 299 :: STUB eglDestroyContext
Couldn't create video display: Couldn't create video output
[CRUSTY]M File /crusty/src/frontends/x11egl/egl.c | Line 370 :: STUB eglTerminate
Player failed to start video stream: width=640, height=480
[LWP 5378 exited]
#

Hmmm vidout_simple_new: Failed to create dmbauf control

subtle hazel
#

Oh!

#

That’s the part where you need to redirect the DMA_HEAP access!

#

You’re reallll close’

untold scarab
#

So I'm not preloading your lib correctly i guess

subtle hazel
#

It’s probably the fact we each have a definition of open/ioctl

#

Or at least open

#

Oh wait thats in crusty gbm

untold scarab
#

yea

subtle hazel
#

One sec

#

Just got back, gotta take the dog out and I’ll be there

#

Are you still using linuxfb for Qt or did you switch to drm gl?

untold scarab
subtle hazel
#

Not yet

#

Just wanting to get back to similar setups

untold scarab
#

oh wait, I'm silly, i put wrapped_preload at the wrong spot

subtle hazel
#

It goes in env1 right?

untold scarab
#

yup

#

Here's my command right now

$ESUDO env crustydebug=_debug WRAPPED_PRELOAD=$GAMEDIR/libs.aarch64/libgpucompat.so WRAPPED_LIBRARY_PATH=$game_libs \
/root/weston/westonwrap.sh headless noop kiosk crusty_x11egl \
SDL_VIDEO_FORCE_EGL=1 QT_QPA_PLATFORM=linuxfb SDL_VIDEO_DRIVER=x11 gdb $GAMEDIR/$game_executable
subtle hazel
#

Let me add some debug messages to see if it's even hooking righ

#

Or I could send over a debug version

#

Why did I even bother stripping it, it's only like 4 kb smaller

austere sigil
#

the log will now be like 50mb

subtle hazel
#

By debug I mean you can break execution in it with gdb

untold scarab
#

Oh! This version interfers with crusty

subtle hazel
#

Ohhhh?

gentle anchor
#

I need some help with the conversion to 7za. I have it all working expect the Qt folder where we have symlinks. Sorry to interrupt.

untold scarab
#

Crashes the mali driver pretty hard

gentle anchor
#

Gives the log

/storage/roms/ports/SteamLink.sh: line 84: 561381 Killed                  $GPTOKEYB "$LOVE_GPTK"
./bin/shell.aarch64: error while loading shared libraries: /roms/ports/steamlink/Qt-5.14.1/lib/libQt5Widgets.so.5: file too short
#

It doesn't do the symlinks correctly I think

subtle hazel
#

Oh, it's probably just extracting them as empty files yeah

#

Might just need to rename the .so.5.14.0 files to .so.5 files after a full extract

#

Wait why does the debug version explode mali?

#

But not the stripped one????

austere sigil
#

~~ i would guess the source code would help~~

untold scarab
#

i think that was a fluke, i re-ran the script and it worked fine, but still no dmabuf

subtle hazel
#

Oh huh

#

Well yeah, we need "dmbauf's

#

:p

untold scarab
#

did you publish the source for your gpucompat lib anywhere?

subtle hazel
#

Oh yeah uhhhhhh

#

One sec

#

Too lazy to upload to github

untold scarab
#

So it's definitely hooking

Thread 1 "shell.aarch64" hit Breakpoint 2, 0x0000007fb7fb1328 in open64 () from /mnt/mmc/ports/steamlink/libs.aarch64/libgpucompat.so
(gdb) c
Continuing.

#

Actually sometimes it isn't?

subtle hazel
#

hwaht

#

It might be a nomatch or the redirect to the actual call

#

Maybe?

#

Hear me out

#

Try streaming twice and see if you hit a segfault at libX11

#

bt

#

whoops

untold scarab
#

huh?

0x0000007fb237c354 in XDefaultDepth () from /root/weston/lib_aarch64/libX11.so.6
(gdb) where
#0  0x0000007fb237c354 in XDefaultDepth () from /root/weston/lib_aarch64/libX11.so.6
#1  0x0000007fb7f87d8c in eglGetConfigAttrib () from /root/weston/lib_aarch64/graphics/crusty_x11egl_debug//libcrusty.so
#2  0x0000007fb7e298e4 in ?? () from /mnt/mmc/ports/steamlink/libs.aarch64/libSDL3.so.0
#3  0x0000007fb7e2ce08 in ?? () from /mnt/mmc/ports/steamlink/libs.aarch64/libSDL3.so.0
#

segfault

austere sigil
#

🍿

subtle hazel
#

@gentle anchor Did renaming the files help btw?

gentle anchor
#

Working on that

subtle hazel
#

Okay just making sure you're still okay.

gentle anchor
#

Nah I'm fine dw about me 🙂

#

7za is just a big pita compared to tar

subtle hazel
#

Might be the shm not having proper drm info?

untold scarab
#

wait. Of course this can't work. This redirects to the real DRM device

#define REAL_DRM_DEVICE "/dev/dri/renderD128"

we don't have drm facepalm

austere sigil
subtle hazel
#

Nooooo it doens't

gentle anchor
#

I would if I knew how

#

Tar binary that has -z

#

I'll just steal it from rocknix

subtle hazel
#

It shouldn't at least

untold scarab
subtle hazel
#

OH

#

I REMOVED THE-

#

SON OF THE B

untold scarab
#

imma make a device file with mknod to test

subtle hazel
#

I just need to readd the return 0 for the dmbauf

#

That part just literally wants success thats it

austere sigil
untold scarab
#

So just return 0 here in the if?

int open64(const char *path, int flags, __u32 mode) {
    if (strcmp(path, DMA_HEAP_PATH) == 0) {
        return real_open(REAL_DRM_DEVICE, flags, mode);
    }
    return real_open(path, flags, mode);
}
subtle hazel
#

Yeah, but only when we're using shm

#

Otherwise other ones will break

untold scarab
#

how do you determine when it's using shm?

subtle hazel
#

check if get_fd == shm_to_fd

#

For now

#

I will make it less jank later

austere sigil
untold scarab
#

btw, i see a TRIMUI mention. It's really werid how the PVR driver has DRM device drivers but no libdrm or GBM support

subtle hazel
#

I KNOW

gentle anchor
#

Noxwell, tar binary added to repo. You can try that on muos. 🙂

subtle hazel
#

Will do!

austere sigil
#

why cant just everyone use drm instead of whatever this shit is

untold scarab
#

why can't everyone just use wayland

gentle anchor
#

TrimUI is unworthy just dw about them

untold scarab
#

(which itself is built on top of drm and gbm, but still)

subtle hazel
#

WEllll uhhh

#

Not sure if it was blank because of running through ssh but

#

mmnope

untold scarab
#

So I'm getting a connection and sound through the device

subtle hazel
#

failed to import fd

untold scarab
#

And for a split second i saw one of those steam hint popups, but no video from my actual PC

subtle hazel
#

The overlay works now yes

#

Left stick click is Select, hold that to leave stream

#

SO

#

need to find either
A: good enough fake buffer implementation
or B: get wayland to work instead

austere sigil
#

C: Suicide? dropping steam link

untold scarab
#

the wayland support in crusty is very spotty at best

#

yikes

subtle hazel
#

Mmkay

#

NO

#

THE EASE OF USER EXPERIENCE COMES FIRST

#

THE CUSTOMER IS ALWAYS RIGHT AAAA

gentle anchor
#

WHY ARE YOU YELLING

subtle hazel
#

Just excited we'er getiting somewhere sorry

#

oh I missed the joke

gentle anchor
#

So now that I'm nt distracted by 7za/tar, what did I miss? Libgpucompat and westonpack fighting?

subtle hazel
#

Actually, they put aside their differences now

#

And are working together but one of them is the young edgy cop and the other grizzled veteran is sighing in the backgorund

untold scarab
#

which one is which doggokek

subtle hazel
#

Uhhh

#

I just got here like last week :v

untold scarab
#

crusty_x11egl specifically is only a month old i think, very late addition

subtle hazel
#

Oh dang

subtle hazel
#

I'm gonna test the download script real quick

subtle hazel
#

lmao

untold scarab
# austere sigil

this would've been especially accurate if we used crusty_gbm
they do not like each other

subtle hazel
#

Oh yeah

untold scarab
#

I'm a bit worried about qt still being on linuxfb. That doesn't work on Ark and Amber i think. And xcb segfaults for some reason

subtle hazel
#

Hear me out

#

oh wait we don't have a wayland Qt plugin built

#

I was gonna say to make an abomination

gentle anchor
untold scarab
#

oh hell yeah wayland ui, x11 gl

austere sigil
#

fuck i did a comma instead of a dot

subtle hazel
#

you're from not america though right?

untold scarab
#

half this server is german haha

austere sigil
#

were not going to convert everyone

subtle hazel
#

c...convert?

untold scarab
austere sigil
#

no, fuck thats not what i meant

#

and they didnt convert, they killed

subtle hazel
#

OHH LIKE RELIGION

gentle anchor
subtle hazel
#

My last name is german, it's already too late

untold scarab
subtle hazel
#

yes.

#

I deleted my steam link one moment

untold scarab
#

Hear me out

subtle hazel
#

I mean

#

usb-c to ethernet

austere sigil
untold scarab
austere sigil
#

thats actually one of the reason i made #1348695506771251270 , its hella nice to stream geforce now or xcloud from your phone

untold scarab
#

that's gonna be a major pain point for android apps that play video files btw. EVERYTHING on android assumes you have a hardware decoder

subtle hazel
#

@gentle anchor Looks like the downloader still pulls on the BusyBox tar rather than the one you set with TAR=

untold scarab
#

busybox tar and unzip are so ass

subtle hazel
#

Uhhh maybe?

#

I'm not good with anything other than very basic batch scripts

gentle anchor
#

Yeah I missed one

#

Line 57

subtle hazel
#

how 2 change?

gentle anchor
#

And 61

#

Change tar to $TAR

#

Oh and 76

#

And 86 you know what

subtle hazel
#

I'm already in nano :<

#

I think that's all of them though

#

Oh, but apparently if the version file exists it won't do the update

untold scarab
#

Two matches for "Failed to import fd", not sure which one is being hit, but it's doing some egl stuff that is currently not implemented in crusty :/

gentle anchor
#

Yeah delete that

#

It compares versions

subtle hazel
#

I patched it to skip some checks earlier! I don't have the radiff anyore though

#

Decided that was too intrusive really

#

Also download works yay

#

Well, it downloads

#

Everything except the files in Qt-5.14.1/lib

#
tar: can't create symlink 'Qt-5.14.1/lib/libQt5Gui.so.5.14' to 'libQt5Gui.so.5.14.1': Function not implemented
tar: write: Broken pipe
Patching process complete!```
#

So even tar is being a butt

untold scarab
#

ports folder is normally on exfat

subtle hazel
#

oh

gentle anchor
#

So I need to write a method to replace the symlinks anyway.

untold scarab
#

I'm pretty sure this one is being hit:

#

So from what i can tell, this imports the fd as an EGLImage, and then binds that to a texture and draws a quad with that texture on screen and then swaps buffers

subtle hazel
#

Mmkay mmkay

untold scarab
#

So basically i need to implement some sort of memfd texture loader in crusty. It's gonna be sloooooow because it's doing this every frame, but I'll try

subtle hazel
#

I mean, it does the same thing with dmabufs

#

And it somehow isn't that bad?

untold scarab
#

oh right, the image is coming from CPU space anyway, software decoding

subtle hazel
#

FOR NOW-actually probably for a while

#

v4l2_m2m is finnicky

gentle anchor
#

I added symlink cleanup

#

Should work for you now Nox

subtle hazel
#

Sweet, trying it in a moment

#

Line 86, Column 90

#

Also Because it can't extract the first symlink in order, it bails completely

#

So uh. maybe *.so.5.14.1 then rename? A bit clunky but it should work

#

Although I guess we want to make sure we can do it no matter what version they move to.

gentle anchor
#

Yes

#

I’ll see what else I can do. Maybe there’s a flag to ignore symlinks.

subtle hazel
#

Apparently there is!

#
‘-h’

    When reading or writing a file to be archived, tar accesses the file that a symbolic link points to, rather than the symlink itself. See section Symbolic Links. ```
#

Still might want to clean it up to avoid three copies. (if that's how it works?)

gentle anchor
#

Ok, updated again

subtle hazel
#

Third times the charm

subtle hazel
#

Okay 1 and a half birds stoned with one kill

#

We're using bsdtar now

#

It throws some ugly permission errors but they don't affect function at all

#

And I got xcb to load without segfaulting, but it still errors on import

#

making pr for you here in a moment @gentle anchor

untold scarab
subtle hazel
#

No worries, thanks for your help all

subtle hazel
#

Got rid of the perrmission errors real quick. Still complains about symlinks but it at least extracts the files we need and the rename fixes that up too

#

OH BOY I GOT THE RARE ERROR

#
WTF
ffmpeg error: get_buffer() failed
ffmpeg error: decode_slice_header error
dmabuf_alloc failed
WTF
ffmpeg error: get_buffer() failed
ffmpeg error: decode_slice_header error
dmabuf_alloc failed
WTF```
#

They're just like us frfr

#

So this makes me think that it's actually MY implementation that is badwrong

untold scarab
#

ugh, i wish i could rewrite like 10 lines of code on the steam link app, then this would already be over.

subtle hazel
#

YUP

#

Closed source baybeeee

#

Well, closedish source

untold scarab
#

yeah looking at the decomp it's so obvious they just extended that example code you linked me

subtle hazel
#

I mean... that person works at valve so

#

Or at least works WITH valve

untold scarab
#

ohhhh that makes more sense

subtle hazel
#

I emailed them actually, very nice

#

Though they couldn't tell me anything other than "Keep checking the source files, sorry"

#

Better safe than sorry

#

Oh you know what would be better than wayland UI and x11 rendering?

#

x11 UI and wayland rendering

#

You know what I'm gonna try

untold scarab
#

It's not gonna work on westonpack. EGL Wayland support is minimal, just enough to make weston happy enough to boot.

subtle hazel
#

Oh, well...

#

Let me dream

#

And I don't think their wayland implementation uses egl?

#

It's just x11 as far as I can tell

#

Or at least, it has separated egl and wayland things

untold scarab
#

On wayland you have no choice but to use EGL. Even if you don't, all the 0 copy buffer sharing that wayland does in the background, absolutely relies on EGL

subtle hazel
#

Oh I see

gentle anchor
subtle hazel
#

Who knew tar implementations were so weird

gentle anchor
#

I love programmers

#

So...no go for westonpack? Bummer.

subtle hazel
#

Maybe. It's still up in the air I think. I'm not sure we actually need to do a custom "eglCreateImageKHR" because I found that the Steam Link source already does that part

#

I'm going to keep plugging away at it for a bit longer

gentle anchor
#

Having a buddy at Valve kinda helps motivation I guess.

subtle hazel
#

Buddy is a strong word

#

More like they responded to one email

gentle anchor
#

Oh I thought you were acquaintances

#

Are you telling me you just outright emailed customer support? :v

subtle hazel
#

No, I'm not that silly

#

I emailed the SDL guy directly

#

I expected NO response

gentle anchor
#

The SDL guy

#

Icculus?

subtle hazel
#

Slouken

#

The one with the repos involving rpi steam link

gentle anchor
#

They probably know eachother