RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Box86 and Wine on RPi4

    Scheduled Pinned Locked Moved Ideas and Development
    box86wineqemux86windows
    475 Posts 40 Posters 248.1k 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.
    • G
      George @shavecat
      last edited by George

      @shavecat it's possible something might be out of date on your system. Can you run the following at the command line and send us the output?

      uname -a
      dpkg -l
      

      - George

      shavecatS 1 Reply Last reply Reply Quote 1
      • shavecatS
        shavecat @George
        last edited by shavecat

        @george said in Box86 and Wine on RPi4:

        uname -a
        dpkg -l

        pi@retropie:~ $ uname -a
        Linux retropie 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
        

        dpkg-l

        pi@retropie:~ $ dpkg -l
        Desired=Unknown/Install/Remove/Purge/Hold
        | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
        |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
        ||/ Name                                   Version                             A
        +++-======================================-===================================-=
        ii  abuse                                  1:0.8-2                             a
        ii  abuse-lib                              1:0.8-2                             a
        ii  abuse-sfx                              1:0.8-1                             a
        ii  adduser                                3.118                               a
        ii  adwaita-icon-theme                     3.30.1-1                            a
        ii  agnostics                              0.5                                 a
        ii  alsa-oss                               1.1.8-1                             a
        ii  alsa-utils                             1.1.8-2                             a
        ii  amphetamine                            0.8.10-21                           a
        ii  amphetamine-data                       0.8.7-15                            a
        ii  apt                                    1.8.2                               a
        ii  apt-listchanges                        3.19                                a
        ii  apt-utils                              1.8.2                               a
        ii  arandr                                 0.1.9-2+rpt12                       a
        ii  aspell                                 0.60.7~20110707-6                   a
        ii  aspell-en                              2018.04.16-0-1                      a
        ii  autoconf                               2.69-11                             a
        ii  automake                               1:1.16.1-4                          a
        lines 1-23...skipping...
        Desired=Unknown/Install/Remove/Purge/Hold
        | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
        |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
        ||/ Name                                   Version                             Architecture Description
        +++-======================================-===================================-============-============================================================================
        ii  abuse                                  1:0.8-2                             armhf        classic Abuse action game
        ii  abuse-lib                              1:0.8-2                             all          levels and graphics for Abuse
        ii  abuse-sfx                              1:0.8-1                             all          music and sound effects for Abuse
        ii  adduser                                3.118                               all          add and remove users and groups
        ii  adwaita-icon-theme                     3.30.1-1                            all          default icon theme of GNOME
        ii  agnostics                              0.5                                 armhf        Raspberry Pi Diagnostics
        ii  alsa-oss                               1.1.8-1                             armhf        ALSA wrapper for OSS applications
        ii  alsa-utils                             1.1.8-2                             armhf        Utilities for configuring and using ALSA
        ii  amphetamine                            0.8.10-21                           armhf        jump'n run game with unique visual effects
        ii  amphetamine-data                       0.8.7-15                            all          data files for the game "Amphetamine"
        ii  apt                                    1.8.2                               armhf        commandline package manager
        ii  apt-listchanges                        3.19                                all          package change history notification tool
        ii  apt-utils                              1.8.2                               armhf        package management related utility programs
        ii  arandr                                 0.1.9-2+rpt12                       all          Simple visual front end for XRandR
        ii  aspell                                 0.60.7~20110707-6                   armhf        GNU Aspell spell-checker
        ii  aspell-en                              2018.04.16-0-1                      all          English dictionary for GNU Aspell
        ii  autoconf                               2.69-11                             all          automatic configure script builder
        ii  automake                               1:1.16.1-4                          all          Tool for generating GNU Standards-compliant Makefiles
        ii  autopoint                              0.19.8.1-9                          all          The autopoint program from GNU gettext
        ii  autotools-dev                          20180224.1                          all          Update infrastructure for config.{guess,sub} files
        ii  avahi-daemon                           0.7-4+b1                            armhf        Avahi mDNS/DNS-SD daemon
        ii  base-files                             10.3+rpi1+deb10u4                   armhf        Debian base system miscellaneous files
        ii  base-passwd                            3.5.46                              armhf        Debian base system master password and group files
        ii  bash                                   5.0-4                               armhf        GNU Bourne Again SHell
        ii  bash-completion                        1:2.8-6                             all          programmable completion for the bash shell
        ii  bind9-host                             1:9.11.5.P4+dfsg-5.1                armhf        DNS lookup utility (deprecated)
        ii  binfmt-support                         2.2.0-2                             armhf        Support for extra binary formats
        ii  binutils                               2.31.1-16+rpi2                      armhf        GNU assembler, linker and binary utilities
        ii  binutils-arm-linux-gnueabihf           2.31.1-16+rpi2                      armhf        GNU binary utilities, for arm-linux-gnueabihf target
        ii  binutils-common:armhf                  2.31.1-16+rpi2                      armhf        Common files for the GNU assembler, linker and binary utilities
        ii  bison                                  2:3.3.2.dfsg-1                      armhf        YACC-compatible parser generator
        ii  bluealsa                               0.13                                armhf        Bluetooth ALSA Audio backend
        ii  bluetooth                              5.50-1.2~deb10u1+rpt1               all          Bluetooth support (metapackage)
        ii  bluez                                  5.50-1.2~deb10u1+rpt1               armhf        Bluetooth tools and daemons
        ii  bluez-firmware                         1.2-4+rpt2                          all          Firmware for Bluetooth devices
        ii  bluez-tools                            2.0~20170911.0.7cb788c-2            armhf        Set of tools to manage Bluetooth devices for linux
        ii  bsdiff                                 4.3-21                              armhf        generate/apply a patch between two binary files
        ii  bsdmainutils                           11.1.2                              armhf        collection of more utilities from FreeBSD
        l
        

        yeha ? :O:o

        G 1 Reply Last reply Reply Quote 0
        • G
          George @shavecat
          last edited by

          @shavecat it might be possible that your system is out of date. Here's the output of my uname -a:

          Linux retropie 5.4.83-v7l+ #1379 SMP Mon Dec 14 13:11:54 GMT 2020 armv7l GNU/Linux
          

          The package list is also very different and where we have the same packages, many of mine are more recent than yours.

          The safest way to test would be to use a different SD card, install the latest RetroPie image version available, and then before going further, performing the following:

          sudo apt update
          sudo apt upgrade
          sudo apt dist-upgrade
          

          Alternatively, you could do that on your current system.

          - George

          shavecatS 1 Reply Last reply Reply Quote 1
          • shavecatS
            shavecat @George
            last edited by shavecat

            @george
            Hey
            thanks again for all your help.
            i will love to stick to my sd card image (cause its quite fix and all )..
            so i did all the update u wrote and took like 20min.
            so it did something .
            but i still get the same linux retropie -

            
            pi@retropie:~ $ uname -a
            Linux retropie 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
            
            

            If now im trying to do that again -

            pi@retropie:~ $ sudo apt upgrade
            Reading package lists... Done
            Building dependency tree
            Reading state information... Done
            Calculating upgrade... Done
            The following packages were automatically installed and are no longer required:
              lxplug-volume rpi-eeprom-images
            Use 'sudo apt autoremove' to remove them.
            0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
            pi@retropie:~ $ sudo apt dist-upgrade
            Reading package lists... Done
            Building dependency tree
            Reading state information... Done
            Calculating upgrade... Done
            The following packages were automatically installed and are no longer required:
              lxplug-volume rpi-eeprom-images
            Use 'sudo apt autoremove' to remove them.
            0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
            pi@retropie:~ $
            

            Thanks again :)

            G 1 Reply Last reply Reply Quote 0
            • G
              George @shavecat
              last edited by

              @shavecat that's weird. Now I'm wondering what might be going on with my SD card. Haha!

              Did you also perform a reboot? I hate to suggest it because it is the typical phone support response, but some updates might require it.

              If I can find some time I'll see if I can try to install Claw also. I was reading that some versions check that a CD has been inserted.

              \ - George

              shavecatS 1 Reply Last reply Reply Quote 2
              • shavecatS
                shavecat @George
                last edited by

                @george
                Forget to reboot ;) haha sorry

                
                pi@retropie:~ $ uname -a
                Linux retropie 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux
                
                

                will check tmrw the game again
                THANKS !! :))<3

                G 1 Reply Last reply Reply Quote 0
                • G
                  George @shavecat
                  last edited by

                  @shavecat Wow, it worked. First time for everything. Haha!

                  shavecatS 1 Reply Last reply Reply Quote 2
                  • shavecatS
                    shavecat @George
                    last edited by shavecat

                    @george
                    Yes it did !
                    but still the same output So didnt work :
                    Will still love to see it works on my pi 4.
                    Saw also Jazz 2 i working with wine , but didnt get that also working on my pi :\

                    1 Reply Last reply Reply Quote 0
                    • G
                      George
                      last edited by

                      Update on my side. I've been converting my installation scripts from ports to an emulator script module. Everything on that end is going well. Programs can be added to EmulationStation either with a shell script (much like Ports), or a config file, if it's very simple.

                      There are a couple of caveats:

                      • Since Wine (and Box86) are "new" emulators, there is no entry for them in the existing themes, so while Wine will show up in Emulation Station, it's very difficult to select a "rom". Entries in all the themes will have to be created by their respective theme maintainers.
                      • External repositories currently do not have the ability to have their own platforms.cfg file, which means that unless you edit the platforms.cfg file, Wine won't show up in EmulationStation, because there are no file associations. I think there's an easy way to accomplish a fix, but I've created a separate post to get feedback on the idea.

                      On another note, I found that when I updated my system from Raspbian 5.4.83 to 5.10.17, it somehow broke PCM audio playback for SOME but not all games. Even more interesting is that on the games where PCM audio playback was broken, MIDI playback still worked. I'm still troubleshooting to see what changed that would effect audio. I'll also be testing out a couple of different emulators to see if this effected anything else. Hopefully not, as that would be a very large problem. I've seen another recent post about audio, so I'll be checking that out for some hints.

                      - George

                      pyramid_schemeP 1 Reply Last reply Reply Quote 1
                      • pyramid_schemeP
                        pyramid_scheme @George
                        last edited by

                        thanks @george
                        I'm just installing box86 now, I'd like to attempt running somme Taito Type X games – should that be possible? Can I use my regular USB joystick without any extra config?

                        G 1 Reply Last reply Reply Quote 0
                        • G
                          George @pyramid_scheme
                          last edited by

                          @pyramid_scheme I haven't tried any Taito Type X games, so I can't say for sure. I have read that even on a Windows XP machine there would be some work to do. A safe bet would be to try to install it in Wine on an X86 Linux machine. If you can get it to work there, then just copy the .wine directory over to your Raspberry Pi.

                          1 Reply Last reply Reply Quote 0
                          • G
                            George
                            last edited by

                            Just a heads up. If you've done a sudo apt dist-upgrade recently, you may have been updated to the Linux kernel v5.10. Evidently there are still some issues with it, although it's still marked as stable. One issue that I and some others have seen is with audio not playing or stopping during the game. I do not know if there is a solution to the issue as of yet. I also don't know if it affects other emulators.

                            You can tell what kernel version you have by doing:

                            uname -a
                            

                            It may say something like 4.19 or 5.4 or 5.10. I downgraded my kernel back to 5.4.83 using the following command:

                            sudo rpi-update 453e49bdd87325369b462b40e809d5f3187df21d
                            

                            That brought everything back to normal. The rest of my software packages remain the same.

                            Hope that helps someone.

                            - George

                            shavecatS 1 Reply Last reply Reply Quote 0
                            • shavecatS
                              shavecat @George
                              last edited by shavecat

                              @george
                              Hey ,
                              Try to change the es_setings config

                              <string name="AudioCard" value="sysdefault" />
                              <string name="AudioDevice" value="HDMI" />
                              

                              After i did the update it happen to me too ... after a search here
                              that help's...
                              Using -

                              
                              pi@retropie:~ $ uname -a
                              Linux retropie 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux
                              
                              
                              1 Reply Last reply Reply Quote 0
                              • V
                                vargasjj510
                                last edited by

                                Hello all. This sounds great! Do we have a pull (at least experimental) for us non-linux-script-coding savvy people? :)

                                shavecatS 1 Reply Last reply Reply Quote 0
                                • shavecatS
                                  shavecat @vargasjj510
                                  last edited by

                                  So most of the games
                                  with wineexplore just give me black screen and go back to wine :(( ...
                                  only got commandos 1&2 and the pinball runing :)

                                  G 1 Reply Last reply Reply Quote 0
                                  • G
                                    George @shavecat
                                    last edited by

                                    @shavecat I've seen some mention about Wine having problems changing screen resolution. Does it work when you use a script? Possibly also with using xrandr to manually set a resolution?

                                    What games have you tried where you see this problem?

                                    I've been a little busy with other projects, but at the moment I've been stuck on issues with Linux Kernel 5.10. Mostly audio issues, but I'm also finding some slowness happening, and wineserver not exiting after a game closes, making subsequent game launches have a problem. I've tried up to Wine v6.5 Devel, and it hasn't fixed the issue.

                                    The latest release of Raspberry Pi OS contains the Linux Kernel v5.10 and also has the ability to do full KMS (kernel mode switching). I'm hoping that might improve the video capabilities to the point where we don't need a different Mesa driver. But the audio issue is causing the biggest headache right now.

                                    - George

                                    shavecatS 2 Replies Last reply Reply Quote 1
                                    • shavecatS
                                      shavecat @George
                                      last edited by

                                      @george
                                      Hey glad to hear from u again :))
                                      and hope for the headache to go away and make it work !
                                      so i try couple of games that u have like CaptinClaw and more also blip & blop (haha really old one and funny)
                                      but still like black screnn and goes away
                                      tried also with a script and all ... :\ pretty much give up on that

                                      G 1 Reply Last reply Reply Quote 0
                                      • G
                                        George @shavecat
                                        last edited by

                                        @shavecat Thanks for the reminder on Captain Claw. One thing I've found with running WIne through Box86 on Linux Kernel 5.10.x is that the wineserver processes as well as other wine related processes do not always exit after the main application that was running has been shut down. This includes even simple wine included apps like cmd.exe and winecfg. Then, when trying to run another application, it might not always launch completely. Sometimes you will just get a blank black screen. Killing wineserver with wineserver -k gets rid of everything and then I've been able to start up again. I'm continuing to investigate this issue and posted it to the Box86 community as well.

                                        I was trying out a game called CityRacing, which people say is a really bad car racing game, but it still has a bit of a cult following. I originally had the game working, but without sound. After I installed additional Windows libraries, the game would no longer run. I'd get a blank screen and then get returned to EmulationStation (or Wine Desktop). Perhaps those are similar issues to what you are having.

                                        One bit of good news is that I may have determined the cause of my audio issues and may have also resolved them. I added lots of logging parameters as per https://wiki.winehq.org/Sound and found that an ALSA buffer underrun was occurring on the games that had sound issues. Additionally, it would either occur at the start of running the application, or about 18 seconds after the application launched. No idea why that time frame. In Wine, the buffer underrun triggered an error message "XRun state, recovering"(https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/winealsa.drv/mmdevdrv.c#l2269), but sometimes did not always recover. Interestingly, it sometimes did recover, but I would hear an audible gap in the audio (also at about 18 seconds in). I might investigate that further, but then I saw this post (https://forum.winehq.org/viewtopic.php?t=32304), which indicated that perhaps installing some Windows libraries as native might help. Many games require some form of native Windows libraries as Wine's implementations are not always complete. I rechecked the logs and found that DSound was being used for PCM audio. I used Winetricks to install the Windows DSound DLL and so far the audio issues no longer occur. Well, the buffer underrun still occurs, but the program recovers from it. I'm continuing to test with fresh SD cards and fresh installs, as well as updates to Box86. Fingers are crossed!

                                        So, a lot of text for a small update. Hope this is interesting for some.

                                        - George

                                        roslofR 1 Reply Last reply Reply Quote 2
                                        • G
                                          George
                                          last edited by

                                          Forgot to mention, I've seen some intermittent high disk usage on Linux kernel 5.x, which seems to slow things down. I've installed iotop to try to determine what causes it, but it's usually just system processes like:

                                          [jbd2/mmcblk0p2-]
                                          [kworker/u8:1-ext4-rsv-conversion]
                                          [kworker/u8:3+events_unbound]
                                          [kworker/u8:4+flush-179:0]
                                          [kworker/u8:2-brcmf_wq/mmc1:0001:1]
                                          rsyslogd -n -iNONE [rs:main Q:Reg]
                                          

                                          There's no universal method that will work for everyone to tune these down to a minimum, but I've been looking at these posts for some inspiration. It might be helpful in the long run to minimize SD card writes.

                                          • https://leszekjaskierny.wordpress.com/2017/01/26/minimize-sd-cad-usage-on-raspberry-pi/
                                          • https://www.raspberrypi.org/forums/viewtopic.php?t=267561
                                          • https://raspberrypi.stackexchange.com/questions/114153/raspberry-pi-3-high-io

                                          - George

                                          1 Reply Last reply Reply Quote 0
                                          • G
                                            George
                                            last edited by

                                            FYI: It seems that the Mesa drivers starting with mesa-21.0.0 have some kind of issue running on Raspberry Pi. I started getting errors like the following:

                                            X Error of failed request:  GLXBadFBConfig
                                              Major opcode of failed request:  152 (GLX)
                                            

                                            Downgrading to mesa-20.3.5 resolved these issues. Again, this was using Linux Kernel 5.10.17, which I'm still continuing to test and troubleshoot, but I'm pretty confident that it will show up on previous kernel versions as well. I checked the Box86 Discord server and saw others have the same problem, with the same solution.

                                            Hopefully the Mesa drivers in Raspbian OS will be updated, possibly with Full KMS so we can take better advantage of the Raspberry Pi 4's GPU.

                                            - George

                                            F 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.