RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    RPI 4 Steamlink crashes [solved]

    Scheduled Pinned Locked Moved Help and Support
    steamlink
    12 Posts 2 Posters 1.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      skip
      last edited by mitu

      Pi Model or other hardware: 4B 4GB RAM
      Power Supply used: Official Raspberry USB-C power supply
      RetroPie Version Used (eg 3.6, 3.8.1, 4.1 - do not write latest): 4.8.2
      Built From: Pre made SD Image on RetroPie website
      USB Devices connected: XBox Controller
      Controller used: Idem
      Error messages received: Bad thread localxinit: connection to X server lost
      Verbose log (if relevant):

      X.Org X Server 1.20.4
      X Protocol Version 11, Revision 0
      Build Operating System: Linux 5.4.0-72-generic armv8l Raspbian
      Current Operating System: Linux retropie 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l
      Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1920x1080M@60,margin_left=48,margin_right=48,margin_top=48,margin_bottom=48 smsc95xx.macaddr=DC:A6:32:09:B2:AF vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 console=tty1 root=PARTUUID=56a57ab5-02 rootfstype=ext4 fsck.repair=yes rootwait loglevel=3 consoleblank=0 plymouth.enable=0
      Build Date: 04 January 2022  10:05:34AM
      xorg-server 2:1.20.4-1+rpt4+deb10u4 (https://www.debian.org/support)
      Current version of pixman: 0.36.0
             Before reporting problems, check http://wiki.x.org
             to make sure that you have the latest version.
      Markers: (--) probed, (**) from config file, (==) default setting,
             (++) from command line, (!!) notice, (II) informational,
             (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
      (==) Log file: "/home/pi/.local/share/xorg/Xorg.0.log", Time: Sun Jul 10 20:26:26 2022
      (==) Using system config directory "/usr/share/X11/xorg.conf.d"
      (II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
      Set mode 1920x1080@60Hz on HDMI-1
      
      Executing (via xinit): /opt/retropie/ports/steamlink/steamlink_xinit.sh
      
      Added controller with mapping 030000005e0400008e02000014016800,*,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,
      INFO: Connected to Remote Client service with session 8300114422404234169
      
      Bad thread localxinit: connection to X server lost
      
      waiting for X server to shut down wm_set_cursor_visibility: visible using XCreateFontCursor
      (II) Server terminated successfully (0). Closing log file.
      

      Emulator: Steamlink (is not an emulator)
      How to replicate the problem: Install steamlink using the retropie package manager. Launch steamlink.
      Steamlink shows start playing once started retropie goes back to Ports and nothing else happens.

      Link on Steam Discussion for the same error:
      https://steamcommunity.com/app/353380/discussions/6/3410930328920002259/

      So far I downgraded steamlink to version 1.1.62.158 without success using this script I built inspired by this reply https://retropie.org.uk/forum/post/252294 without any success

      #!/bin/bash
      
      cd .local/share/
      rm -rf SteamLink
      rm -rf Valve\ Corporation
      read -p "Enter Version: " version
      wget http://media.steampowered.com/steamlink/rpi/steamlink-rpi3-"$version".tar.gz
      tar -xvf steamlink-rpi3-"$version".tar.gz
      mv -i steamlink SteamLink
      rm -rf steamlink-rpi3-"$version".tar.gz
      

      Any help is greatly appreciated

      Thanks

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        Can you modify /opt/retropie/configs/ports/steamlink/emulators.cfg and remove the XINIT: part from the launch command of steamlink ? Does it work with this modification ?

        S 2 Replies Last reply Reply Quote 0
        • S
          skip @mitu
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • S
            skip @mitu
            last edited by

            @mitu Thanks for the reply

            I edited the emulators.cfg to the following
            a960b834-03fa-44ca-bf48-47f38a218361-image.png

            And now when I launch SteamLink from the Ports menu it loads and goes back to Retropie

            Here the log file
            b8dcacd0-3c97-4db8-b94c-fc8eac3cfdc6-image.png

            Thank you

            mituM 1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @skip
              last edited by

              @skip Are you running the latest version or you're still running the downgraded version (1.1.62.158) ?

              S 1 Reply Last reply Reply Quote 0
              • S
                skip @mitu
                last edited by

                @mitu You're right, sorry!

                Thanks for the reminder! I had not that much sleep tonight and forgot about that.

                I am running 1.1.92.230now and this is the log

                Parameters:
                Executing: /opt/retropie/ports/steamlink/steamlink_xinit.sh
                xset:  unable to open display ""
                matchbox: can't open display! check your DISPLAY variable.
                Added controller with mapping 030000005e0400008e02000014016800,*,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:$
                INFO: Connected to Remote Client service with session 8196955630107934252
                Bad thread local
                
                1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator
                  last edited by mitu

                  Same error, I see. I'll have to give it a test on Buster, I think the changes for Bullseye support in Steamlink may have broke something on Buster.

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    skip @mitu
                    last edited by

                    @mitu I'll try to downgrade to the last version (1.1.86.210) before bullseye's experimental support and report back to you

                    S 1 Reply Last reply Reply Quote 0
                    • S
                      skip @skip
                      last edited by

                      I tried

                      • 1.1.86.210
                        Gave the bad thread error

                      • 1.1.82.201

                      Parameters: 
                      Executing: /opt/retropie/ports/steamlink/steamlink_xinit.sh
                      xset:  unable to open display ""
                      matchbox: can't open display! check your DISPLAY variable.
                      * failed to add service - already in use?
                      
                      1 Reply Last reply Reply Quote 0
                      • mituM
                        mitu Global Moderator
                        last edited by mitu

                        I can't reproduce the issue.
                        I started steamlink and it updated itself to version 1.1.92.230 automatically, then it started the remote play once I pressed on the Start Playing button. With the default emulators.cfg, steamlink is started from a X.org (desktop) session, but the latest versions (since 'bullseye' X-less playback was added) also work without a desktop session.

                        FWIW, I'm using a similar setup, with a Pi4 4Gb model. In the log file, the same error appears (Bad thread local), but only when I exit steamlink.

                        One thing to check - the new version may have changed the controller button mappings, so when you press the Start Playing you may actually instruct steamlink to exit. Can you try pressing the 'other' button when you're on Start Playing (i.e. press A of you were pressing B or vice-versa) ?

                        NOTE: before testing, make sure you upgrade to the latest version and add back the XINIT: stanza in emulators.cfg. You may also start steamlink from the command line if you want, after exiting EmulationStation.

                        S 2 Replies Last reply Reply Quote 0
                        • S
                          skip @mitu
                          last edited by

                          @mitu Thank you for taking the time, I will verify and get back to you

                          1 Reply Last reply Reply Quote 0
                          • S
                            skip @mitu
                            last edited by

                            @mitu OMG, I am so sorry for wasting your time. Yes, it was the button setup and I was exiting the application all the time. I think we can mark this as solved and as Layer 8 issue.

                            Thank you again for your patience and time.

                            1 Reply Last reply Reply Quote 1
                            • First post
                              Last post

                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.