Fredrum / chiaki

Raspberry Pi fork of the Free and Open Source PS4 and PS5 Remote Play client Chiaki.
https://github.com/Fredrum/chiaki/wiki/rpi02---branch-for-Bullseye,-64bit,-h265-and-kmsdrm
GNU Affero General Public License v3.0
67 stars 11 forks source link

Unable to open stream #33

Closed JeremyLJordan closed 1 year ago

JeremyLJordan commented 2 years ago

Device: RPi 4 B+ OS: Raspbian Bullseye 5.15.32-v7l+ Chiaki Version 2

I am having an issue getting my stream to start and i feel confident it is due to something with the change in dtoverlay. I have followed the tutorial verbatum and did troubleshooting by changing dtoverlay between:

  1. vc4-kms-v3d
  2. vc4-fkms-v3d
  3. rpivid-v4l2 (which i know is the correct one for my model)

I get a segmentation fault on both 2 and 3 that outputs to the terminal like so:

Linux base Path: /home/pi/chiaki-rpi/build/rpi/chiaki-rpi'�Ĭ��� SDL version linked: 2.0.20 Disp Mode: 1920x1080px @ 0hz SDL_VIDEO_DRIVER selected: x11 Segmentation fault

I can launch the UI using number 1, but when the stream tries to open I get the following

Linux base Path: /home/pi/chiaki-rpi/build/rpi/chiaki-rpi���L�� SDL version linked: 2.0.20 Disp Mode: 1920x1080px @ 60hz SDL_VIDEO_DRIVER selected: x11 SDL_RENDER_DRIVER selected: opengles2 Running under X11: 1 INFO: Audio device 0: Built-in Audio Analog Stereo INFO: Audio device 1: Built-in Audio Digital Stereo (HDMI) Rpi IO created END HostInit Gamepads currently attached: 0 Check the gamepad is properly connected Will try to read rpi settings file: /home/pi/.config/Chiaki/Chiaki_rpi.conf Found settings for 1 host(s) Discovery Service started GL_VERSION : OpenGL ES 3.1 Mesa 20.3.5 GL_RENDERER : V3D 4.2 Gui init done Discovered Host State: ready Discovery ID match Host Click Starting Play session! SDL drm_fd: 33554460 Segmentation fault

I attempted to revert to chiaki v1, but I am unable to register my device because there is no longer a PIN when registering.

Any help would be appreciated.

JeremyLJordan commented 1 year ago

Hey, I'm trying to figure out something from one of these pages here

https://github.com/Fredrum/chiaki/wiki/More-rpi02-Instructions-and-tips#ubuntu-and-other-distros

For retro pie you have

"add /usr/lib"

and

"add /usr/local/lib"

I'm not sure what that means as "add" is not a thing. Can you clarify?

Edit: May have figured it out, adding it to the config files above it.

Fredrum commented 1 year ago

It means to add the that text to the files mentioned. For example adding the text: /usr/local/lib

JeremyLJordan commented 1 year ago

works great! Thanks for fixing it. I have 2 issues I'd like to mention though, and one request.

When at the chiaki main screen it flickers a lot. As soon as I launch the remote play it doesn't do that, so not a big deal.

When in the remote play session, there is a mouse cursor (i dont have one connected) in the top left side of the screen, it never goes away. Also not a huge deal

My request is a little guidance with launching chiaki at boot. I tried creating a script but it segmentation faults because its running it in the background. This pi is only going to be used for this project, any suggestions for getting it to launch at boot? The script I made for connecting the controller automatically works great.

Thanks again

brantai commented 1 year ago

If you're using the SDL option (that is, not inside an X session) you can make a simple systemd service file like

[Unit]
Description=Chiaki
After=network.target

[Service]
ExecStart=<full path to chiaki-rpi> 2>&1
Restart=always

[Install]
WantedBy=default.target

in $HOME/.local/share/systemd/user/chiaki.service, run systemctl --user enable chiaki to have it launch at user login.

JeremyLJordan commented 1 year ago

Thanks for your reply. A few things, I dont have a /systemd/user directory. But I created it to try and get it running, here is what I get when it is run:

''Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=@.host --user to connect to bus of other user) ''

So, I attempted to follow these directions

https://www.shubhamdipt.com/blog/how-to-create-a-systemd-service-in-linux/

but it seems to crash. Here is what is in my file: `' [Unit] Description=Launches Chiaki at boot and restarts if it crashes

[Service] User=root WorkingDirectory=/home/pi/chiaki-rpi/build/rpi/ ExecStart=chiaki-rpi Restart=always

[Install] WantedBy=multi-user.target `

Here is the crash: `● chiaki.service - Launches Chiaki at boot and restarts if it crashes Loaded: loaded (/etc/systemd/system/chiaki.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2022-09-07 02:18:45 BST; 2s ago Process: 839 ExecStart=chiaki-rpi (code=exited, status=203/EXEC) Main PID: 839 (code=exited, status=203/EXEC) CPU: 2ms

Sep 07 02:18:45 raspberrypi systemd[1]: chiaki.service: Scheduled restart job, restart counter is Sep 07 02:18:45 raspberrypi systemd[1]: Stopped Launches Chiaki at boot and restarts if it crashe Sep 07 02:18:45 raspberrypi systemd[1]: chiaki.service: Start request repeated too quickly. Sep 07 02:18:45 raspberrypi systemd[1]: chiaki.service: Failed with result 'exit-code'. `'

Any ideas would be appreciated.

Edit: I moved this topic here https://stackoverflow.com/questions/73641995/how-to-i-create-a-service-in-raspbian so I didn't derail the purpose of this issue.

JeremyLJordan commented 1 year ago

Got this all resolved. the blinking stopped and the cursor went away after I created the service.

Thanks for all of your hard work