Trying to make wine work in startx xterm

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
thepigamer
Posts: 4
Joined: Sat Apr 03, 2021 10:53 pm

Trying to make wine work in startx xterm

Post by thepigamer »

Hello,

I am trying to install a minimalist straight to the point dietpi to get a maximum benchmark performance with wine-x86 and box86.

My approach was to set a simple startx+xterm session and to load wine from there.
This is successful when I am setting resolution as fixed PC 1024x768 and even if I edit config.txt to force a fixed PC 1280x1024.
However that success implies that I can't use OpenGL acceleration, which I would like to use.

Upon trying to use OpenGL I set Fake-KMS 1920x1080 in display options.

There I'm stuck with a problem: when doing that with Raspberry Pi OS Lite it works quite well because fake/full KMS support manages multiple resolution and gives a full panel of them allowing PC games to enforce their own resolution to wine.
In DietPi, choosing Fake or Full KMS will give me a fixed resolution of 1920x1080.

Then when Im trying to run a game in startx xterm in Fake KMS, wine-x86 raises this exception: nodrv_CreateWindow.
This exception doesn't happen when Im running in PC mode but in that case I cant use OpenGL (and especially GL4ES).
I have even tried unsuccesfully to hack-install raspi-config in Dietpi and select Fake-KMS from there.

Has anyone a clue to make Wine+Box86+OpenGL+GL4ES working in DietPi? So far I see no other solution than going back to Raspbian Mini :/

Thanks in advance!
User avatar
MichaIng
Site Admin
Posts: 3097
Joined: Sat Nov 18, 2017 6:21 pm

Re: Trying to make wine work in startx xterm

Post by MichaIng »

thepigamer wrote: Sat Apr 03, 2021 11:05 pm In DietPi, choosing Fake or Full KMS will give me a fixed resolution of 1920x1080.
Indeed, a limitation I wanted to remove for a while but didn't find time yet. Not sure why we have that coupled in the first place. However, it's simple to change. Open /boot/config.txt and comment or remove the framebuffer_width and framebuffer_height settings.

raspi-config only adds the dtoverlay=vc4-fkms-v3d line, so it should then match what you get on Raspberry Pi OS.

Btw you should be even able to skip xterm and instead start WINE via xinit directly. box86 is invoked automatically as well when any x86 binary is executed, thanks to binfmt.
thepigamer
Posts: 4
Joined: Sat Apr 03, 2021 10:53 pm

Re: Trying to make wine work in startx xterm

Post by thepigamer »

Thanks for info, Ill try it!
I will indeed stop using xterm once it works: xterm is valuable to get log and try to understand troubleshooting.
thepigamer
Posts: 4
Joined: Sat Apr 03, 2021 10:53 pm

Re: Trying to make wine work in startx xterm

Post by thepigamer »

Hello,
Ive tried to remove the framebuffer away from config.txt.
I'm facing some very odd behavior.
When I start DietPi with that configuration (fake kms and framebuffer removed) after rebooting from Raspbian then startx wine-x86 path/to/some/exe works even when I add GL4ES.
However, if I start DietPi after rebooting from DietPi, startx wine (or startx xterm then wine) will give the nodrv_CreateWindow error (which is a wine error btw).

Any clue? Know a startup driver that I might be missing?

PS: I installed Box86 by manually compiling (as I did with every OS)

Thanks!
User avatar
MichaIng
Site Admin
Posts: 3097
Joined: Sat Nov 18, 2017 6:21 pm

Re: Trying to make wine work in startx xterm

Post by MichaIng »

I couldn't follow, do you mean it works on Raspberry Pi OS but not on DietPi when installing things the same way?

Please check whether the binfmt service is running:

Code: Select all

systemctl restart systemd-binfmt
sleep 1
systemctl status systemd-binfmt
And try to start WINE explicitly with Box86, like xinit box86 wine /path/to/exe from console.

Are you trying this as root user or other user?
thepigamer
Posts: 4
Joined: Sat Apr 03, 2021 10:53 pm

Re: Trying to make wine work in startx xterm

Post by thepigamer »

Hello,
I'm using dietpi/dietpi user.

I don't think its a binfmt/x86 problem, if I run wine, I successfully get ptitSeb's box86 signature. I only meet a problem when wine tries to invoke graphic card.
No matter if I try to run winecfg or any x86 binary, if I don't reboot Raspbian before booting Dietpi, I will get wine:nodrv_CreateWindow error
If I reboot Raspbian from PINN, reboot again in DietPi, I will run my wine binary (winecfg or any windows game) it runs and I can use GL4ES without problem.
I know this can be quite difficult to figure out. Im thinking of something that happens on boot differently in Raspbian and Dietpi... but I don't know enough to investigate this route.

Thanks for reply and help anyways! if ever you think of anything I'm preneur (even a wild guess test).
Post Reply