Box86 and Wine on RPi4
-
@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
-
@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 :)
-
@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
-
@george
Forget to reboot ;) haha sorrypi@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 -
@shavecat Wow, it worked. First time for everything. Haha!
-
@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 :\ -
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
-
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? -
@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.
-
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
or5.4
or5.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
-
@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
-
Hello all. This sounds great! Do we have a pull (at least experimental) for us non-linux-script-coding savvy people? :)
-
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 :) -
@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
-
@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 -
@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 likecmd.exe
andwinecfg
. Then, when trying to run another application, it might not always launch completely. Sometimes you will just get a blank black screen. Killingwineserver
withwineserver -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
-
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
-
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
-
I am not using at the moment, very busy with other things.
I see you do a lot work on it. 👍
I hope you will find the thing to fix it all.Regards
-
Thanks for the encouragement and support @folly!
I narrowed down the issues I was seeing with
wineserver
not terminating after a program completed. I brought it up on the Box86 Discord channel and got a reply back from ptitSeb saying that the shutdown sequence in Box86 is still problematic. At least he's aware of it and I'm sure if he'll be able to find a solution eventually.My current workaround for the issue is to use a slightly older version of Box86. On March 25, there was a commit (https://github.com/ptitSeb/box86/commit/bc198c37d7460c95cd0047f0cc1fd1234b898dc7), labelled "Improve shutdown sequence". At this commit, the issues with wineserver not terminating start. Prior commits to this I don't seem to have any issue with wineserver terminating after any app that I'm running ends.
I should note that my solution may not work for everyone seeing the issue and that everyone may not actually see the issue. Some apps seem to work fine, but I saw the issue with Winetricks, Space Cadet 3D Pinball, and even just running the Wine Desktop.
- George
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.