Visual PinballX on Linux

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #150326


      I’m trying to get VPX (10.6) running on Linux.

      Especially table “Ice Cold Beer”. But I have problems.

      I installed  wine (v3.20) via ‘playonlinux’ on an Ubuntu 16 system.

      I can open the editor and start the vpx table. The table looks good and I can see also some control with a blinking star.

      However I cannot do anything with the table.

      I also installed the same table on Windows and there it is working without a problem.

      On Linux I do not even get the red number LEDs displaying the score. Also it is not accepting keys to enter coins or start the game.

      On the other hand the key for quitting is working.

      For me it seems that the VB script is simply not running.

      Has anyone experience with running VP under wine?

      Or any hint what I could test?








        You should try another table, like the demo table that comes with VPX to see if it works.


          I tested the “Nudge Test and Calibration.vpx” table.

          Here the same:

          After starting (“Play”) I can see the table, all the graphics, but the only keys that are working are “ESC” and  “Q” to quit.

          There is no reaction on the flippers.


            I hope this isn’t too much of a necro-post. Your issue sounds like Windows Script Host isn’t setup in the Wine prefix.

            I jumped through these hoops recently and figured I would share what I did to get it mostly working with Steam/Proton on Fedora 31 (using proprietary Nvidia drivers). It doesn’t sound like you’re using Proton, but hopefully the general setup steps will help.

            Proton is new to me and I never really really messed with Wine in the past, so there could definitely be easier/better ways to set things up :unsure:

            1. Run VPX6setup.exe with Steam Wine prefix. I have Steam installed via Flatpak, so my prefix path is a little convoluted:
            $ WINEPREFIX=/home/{USER}/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/2468213580/pfx wine ./VPX6setup.exe
            I couldn’t select the Steam flatpak directory when trying the installer in vanilla Wine, there didn’t seem to be a way to traverse the hidden ~/.var directory.
            So run setup through Steam’s Wine to see the container directory correctly as the root of Z:/.
            The DirectX setup fails for me with an error. Just continue past it. .Net install just said it was already installed.
            I did not select DirectB2S for install, FYI.

            2. You will need to setup VPinMame. Running this through Steam does NOT seem to allow tables to use it, so just invoke with Wine directly.
            Not sure if there’s some registry context difference even though VPX itself gets run through Steam?
            Run through Wine with prefix set:
            $ WINEPREFIX=/home/{USER}/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/2468213580/pfx wine ./Setup.exe
            $ WINEPREFIX=/home/{USER}/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/2468213580/pfx wine ./Setup64.exe
            (Can’t remember if 32 or 64 bit are needed. I just did both)

            3. You need Windows Script Host for VBA to work:
            $ WINEPREFIX=/home/{USER}/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/2468213580/pfx winetricks wsh57

            4. Also D3D9:
            $ WINEPREFIX=/home/{USER}/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/2468213580/pfx winetricks d3dx9

            If you change the game title in Steam, it appears to create a new compdata (prefix) folder.. so make sure you do this first.
            The Steam properties dialog is very glitchy. I always save and reopen to make sure settings stuck. If the Play button does nothing, check that the Force Runtime checkbox didn’t get deselected.
            If I run tables in Exclusive Fullscreen, I have to alt-tab to another window, then back to the VPX window for the table to display correctly.
            Also performance is _usually_ good, but sometimes tables will just.. run slow, until I reboot or try again in a while. I think this is a Proton thing (happens in other games too). My GPU also isn’t particularly amazing, so YMMV.

            Results for some random tables:
            Fish Tales – Runs Perfectly
            BSD – Doesn’t launch at all. Haven’t looked, but I think the controller is hardcoded to B2S.
            GNR – Runs, but the 2 ramps and some plastics are colored black, which makes it look awful.
            Flintstones – Runs Perfectly
            Genesis – Runs Perfectly
            RollerCoaster Tycoon – Runs Perfectly
            LOTR – Runs Perfectly (DMD is super faint for some reason, probably just need to make it opaque)
            White Water – Runs but errors out on BlendDisableLighting
            TOTAN – Runs but errors out on BlendDisableLighting

            Hope that’s able to help at least somebody. I’ll keep playing around with it. VPX is one of the last things I keep a Win10 partition around for.

            Edit: Tested out WW and TOTAN under Windows, also the latest D&D table, no script errors at all.
            I copied over the executable and scripts folder from my Windows install and I still get the BlendDisableLighting script errors in Linux. D&D also starts up with an error that LightStateOn is undefined. Unfortunately, unless I figure this out, it’s going to render a lot of tables unplayable. Looks like they are internal variables in VPX and I haven’t developed on/with VPX, so I have no clue what to do about that.


              I messed around some more tonight and I was able to simplify the process a bit. I got frustrated with some limitations with the Flatpak version of Steam, so I installed the normal Steam package (from RPMFusion) instead. Had some weirdness with GPU drivers, but fixed it pretty quickly.

              I put together a little script (thanks to Reddit) that exports the correct environment variables for the Proton version of Wine:

              export W="/home/{USER}/.local/share/Steam/steamapps/common/Proton 4.11/dist"
              export WINEVERPATH=$W
              export PATH=$W/bin:$PATH
              export WINESERVER=$W/bin/wineserver
              export WINELOADER=$W/bin/wine
              export WINEDLLPATH=$W/lib/wine/fakedlls
              export LD_LIBRARY_PATH="$W/lib:$LD_LIBRARY_PATH"
              export WINEPREFIX=/home/{USER}/.local/share/Steam/steamapps/compatdata/2229724400/pfx
              wine /home/{USER}/games/visualpinball/Installer/VPX6setup.exe
              #winetricks wsh57
              #wine /home/{USER}/games/visualpinball/VPinballX.exe

              With these variables set, it looks like VPinMame gets correctly registered by the installer. I also tested without installing d3dx9 and it doesn’t seem to need it as far as I can tell.
              You still need wsh57 (Windows Script Host) installed, though. I left the commands in the script, so you can just comment/uncomment as needed.
              Obviously paths will be different (Your username, the compatdata folder #, the folder you installed/placed VPX)
              With this I can also run VPX without Steam running (I think you can setup Proton completely outside of Steam too, but haven’t messed with it)

              Unfortunately, I still get the script errors I mentioned above on the same tables :-( I was hoping that being able to actually see the Wine terminal output would reveal some helpful error, but nothing that I can see so far.


                Thanks very much for your posts.

                I think this might help me, especially the windows scripting host is something to look at.

                I‘m busy at the moment but I will try in a few days.


                  Definitely, I’m happy to help. Nothing like being a niche of a niche (pinball emulation under Linux) B-)

                  I’d be really curious to see if you also get script errors on some of those tables. The tables that do run, run very well for the most part.

                  I dug a little more into the elements throwing errors (LightStateOn and BlendDisableLighting). Still not sure why these specifically are throwing fits, but as a quick workaround for the LightState errors, you can Replace-All LightStateOff, LightStateOn, LightStateBlinking with 0, 1, and 2 respectively and the table will run.
                  I figured it was probably just an enum and a quick search on the VPX source confirmed that: grep -rnwI . -e "LightState"

                  I got the recently released DnD and Strange Science tables running this way. Also tested TZ and STTNG last night and both ran perfectly for a quick game or two!
                  I’ll post again if I figure more out, i.e. the BlendDisableLighting method. You could just comment out the lines but I don’t really consider that a solution. Maybe somebody more familiar with the source (and vbscript) knows what the issue could be.


                    So there is hope. I did a ton of digging into the script errors. The closest I could get is that it’s an issue with Wine’s version of oleaut32.
                    With Wine’s debug logging, I could see errors to the effect of 0009:warn:ole:ITypeInfo_fnGetIDsOfNames no names found and similar. Also reading bug reports with Wine show that AddTypeLib was unimplemented –
                    (To be clear, I am a developer, but I have no experience whatsoever with Win32 dev outside of the .Net stack)

                    So why not override with the native oleaut32 (from winetricks)? Well, VPX just doesn’t start. And I’ve tried a ton of different library override combos. And the terminal output (even at trace level) is useless and/or undecipherable to me.
                    I also had the VPX source compiling in a VM and was looking at the IDL bindings and the required dependencies but nothing particularly helpful.

                    So I decided to scrap the Proton Wine (4.11) for the moment and create a new prefix with standard Wine (5.0-rc5). Ran installer, and used winetricks for wsh57, ole32, and oleaut32.. and it works! Well, there’s no sound device for some reason. And the performance is worse than under Proton. But no errors. DnD, my test table because it errors with LightState right when you start it, started and played fine. TOTAN too (no BlendDisableLighting error)

                    As for what to do now, not entirely sure.. fix sound and get dxvk working with standard Wine 5.0, or maybe see if an actual Proton release based on 5.0 is forthcoming. Again, I’ll update if I figure anything out new, but think I need a break for a little bit.



                      I had some success now.

                      I installed Wine 5 and PlayOnLinux. Then installed vpinballx and took care to install wsh57.

                      And, voila, the tables are running now.

                      Basically at least. My system is far to slow. When using a NUC N3050 the tables are completely unplayable.

                      I then changed to a NUC7i7BNH. This one is better but still I have an estimated frame rate of maybe 5-10 fps.

                      So I can see that it is working in general and also play some tables, but, of course, it’s not  really fun.

                      Could you tell me what your system setup is? And what frame rate you got. Is it running smooth?








                        I’m using a ThinkPad P52:

                        CPU: Xeon E-2176M GPU: Quadro P2000 (Comparable to GTX 1060) Memory: 32GB Resolution: 4K

                        I have max texture size set to 2048. Playfield reflections turned off. Detail level at max. Most tables are playable at around 40-60 FPS.
                        There were 1 or 2 tables that are unplayable. Namely, g5k’s Firepower runs at like.. 10-15FPS for whatever reason.

                        I can’t remember exactly what I did to fix the sound issue, but I believe I installed the i386 and x64 versions of wine-pulseaudio and it works fine now. I didn’t notice huge performance increases with Proton DXVK so didn’t bother setting up DXVK proper on regular Wine. Proton still has one killer feature, though, it up-scales fullscreen apps to your monitor’s native resolution as full-screen windowed. This is important because: Launching VPX in 1080 fullscreen completely locks up my Gnome session. I had to completely kill my X session from another console.

                        Performance would probably be more stable at 1080 resolution, and I would say that I can’t do that until Valve updates Proton because of all the script errors, but I just searched:

                        Guess I’ll be trying that soon :)

                      Viewing 10 posts - 1 through 10 (of 10 total)
                      • You must be logged in to reply to this topic.


                      Log in with your credentials

                      Forgot your details?