robbert-vdh / yabridge

A modern and transparent way to use Windows VST2, VST3 and CLAP plugins on Linux
GNU General Public License v3.0
2.34k stars 61 forks source link

64-bit Plugins Not Loading #70

Closed Settyness closed 3 years ago

Settyness commented 3 years ago

Problem description 64-bit plugins aren't showing up in my device library. My 64-bit Wine prefix is $HOME/.wine64, and that was used to run sync with no errors. I think I did everything right, but the 64-bit plugins are failing for some reason. I've spent a couple of hours searching and trying to understand this, but I've given up and ask that you'd give this a look for me. Thanks.

System information

Debug log The debug environment variables did not seem to work at all. I tried changing the log output to my home directory to no avail. Instead, I opted to attach my terminal output (as much as I could copy), which has some information about the 64-bit plugin failures. log.txt

robbert-vdh commented 3 years ago

This 0614:err:process:exec_process error usually means that the Wine version you're using is not compatbile with the yabridge-host.exe.so binary yabridge is trying to load, but that should not be an issue here. I just checked and the yabridge-bin AUR package works fine with wine-staging-5.22 for me. Also weird that that error did not show up during yabridgectl sync, because that same error should definitely have also showed up there. Are you by any chance running Bitwig through firejail? Anyways, one thing you could try would be to use the non -bin AUR packages. Those compile yabridge from source. You should install both the yabridge and the yabridgectl packages to replace yabridge-bin (which also included yabridgectl).

Another unrelated thing worth pointing out is that all of those plugins are located outside of a Wine prefix, so they'll be hosted from the default prefix (which is ~/.wine, and not ~/.wine64 unless you symlinked the former to the latter).

Settyness commented 3 years ago

Another unrelated thing worth pointing out is that all of those plugins are located outside of a Wine prefix, so they'll be hosted from the default prefix (which is ~/.wine, and not ~/.wine64 unless you symlinked the former to the latter).

This looks like the ticket. All 32-bit .dll plugins are working great. Unfortunately, I need $HOME/.wine for 32-bit applications that bork under 64-bit environments, so symlinks won't be a solution. Is there anyway I can just force a profile on yabridge in its entirety?

robbert-vdh commented 3 years ago

Yabridge respects the WINEPREFIX environment variable. So if you set WINEPREFIX to $HOME/.wine64 before launching Bitwig then all plugins will use that prefix, skipping the auto detection. But this issue looks unrelated to that, unless you accidentally broke something in your default Wine prefix's drive associations (it's also using M: instead of the default Z:, which is interesting).

Settyness commented 3 years ago

Yabridge respects the WINEPREFIX environment variable. So if you set WINEPREFIX to $HOME/.wine64 before launching Bitwig then all plugins will use that prefix, skipping the auto detection.

Darn, I actually did try that before filing this. So it looks like it must be something else then.

To clarify on the first portion of your first post: I did run WINEPREFIX=$HOME/.wine64 yabridgectl sync, otherwise it would actually result in an error (it mentioned version disparities). I do have firejail installed, but I do not use it with Bitwig (I just double checked to make sure). I will go ahead and try building yabridge and tinkering with that at this point.

Thank you for your help.

robbert-vdh commented 3 years ago

If running yabridgectl sync without setting WINEPREFIX resulted in an error then that's definitely the same error that's in that output from Bitwig, so that's one less issue to solve (the default prefix is probably a WINEARCH=win32 prefix, hence the errors when trying to run the 64-bit host application). How are you setting those environment variables when starting Bitwig? Setting WINEPREFIX should work, but yabridge's debug environment variables should also work so something's going wrong there. An alternative to setting WINEPREFIX would be to just move all of your plugins to some directory in ~/.wine64. Even somewhere outside of drive_c would work there, but keep in mind that the automatic prefix detection works based on the actual location of the plugin's .dll file, after resolving symlinks, so just symlinking /mnt/black/Applications there wouldn't work.

Settyness commented 3 years ago

For whatever reason, environment variables seem to refuse to work with Bitwig. The line I tried most recently is: env WINEPREFIX=$HOME/.wine64 WINEARCH=win64 YABRIDGE_DEBUG_FILE=$HOME/yabridge.log YABRIDGE_DEBUG_LEVEL=2 bitwig-studio

I did try many variants, but none of them seem to work. So against my desires, I went ahead and copied my VST folder to within my .wine64 folder. yabridgectl sync ran without environment variables or errors, which is great, but the same plugins seem to be loading. In the case of Xfer, Dada Life, and CamelAudio, they seem to hate it when you move the .DLL files around, so I ignored that for now and focused on the free plugins, in this case Tokyo Dawn Labs and FullBucket. Both of those still refuse to load. I've attached as much of the terminal output as I could copy once more. log.txt

robbert-vdh commented 3 years ago

The plugins are now in ~/Documents/VST/ so as you can see they are still using the default prefix and they thus still won't work. That VST directory really has to be in ~/.wine64/ or ~/.wine64/drive_c/ for the auto detection to pick up that specific prefix.

But the fact that those environment variables are not getting picked up is even weirder. What shell are you using? Maybe it's overriding env or something. To make sure that's not the issue, try running this from a terminal:

bash -c "WINEPREFIX=$HOME/.wine64 YABRIDGE_DEBUG_FILE=$HOME/yabridge.log YABRIDGE_DEBUG_LEVEL=2 /opt/bitwig-studio/bitwig-studio"
Settyness commented 3 years ago

For a second there, I was confused as to why you said they were in ~/Documents, but then I realized the My Documents folder in ~/.wine64 is a symlink to ~/Documents. Going to move those now and try again.

And it's now working. Gonna reinstall the paid plugins and go from there.

Running the above command did not generate a yabridge.log. I'm using bash. Environment variables usually work, I usually use them for installing Wine applications between my two prefixes.

At any rate, this appears to have fixed my problem. I noticed some draw issues with FerricTDS, but I assume this is to be expected. The plugins seem to work great.

Thank you for your time.

robbert-vdh commented 3 years ago

Ah yes, didn't even think about that haha. Super weird that those environment variables are not working with your Bitwig though. To fix those rendering issues you'd have to install native gdiplus through winetricks and then add and disable d2d1 in winecfg (all in the correct prefix of course). This is required for basically all plugins that use VSTGUI to render correctly (like all of the Xfer plugins for instance).

Settyness commented 3 years ago

I saw that in the docs before I posted this thread and installed gdiplus and disabled d2d1 in anticipation for using Cuthulu and Serum. Weirdly, FerricTDS looks normal now, but unsurprisingly, the Dada Life plugins look very bizarre. I've never seen them look very good in Wine. But they work perfectly.

Thanks again.

robbert-vdh commented 3 years ago

I'll close this since your setup issues have been resolved, but feel free to open a new issue or to come join is in the yabridge Discord if you have more questions!