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.48k stars 65 forks source link

Plugins don't show their UI in Reaper #40

Closed Trollwut closed 4 years ago

Trollwut commented 4 years ago

Problem description When loading an FX to a track, the plugin window resizes but doesn't show any content. The UI seems to not be rendered.

What did you expect to happen? The fancy UI of the plugin is being shown with all it's knobs and sliders.

What actually happened? Nothing shown at all.

System information

Additional information When pressing the UI button on the VST interface, instead of the fancy plugin's UI, it shows the "native Reaper plugin" sliders. I can move them and it has an effect on my sound - so the plugin itself works. It just doesn't render its graphics.

Debug log (Sorry that I didn't include this log, as for now my Reaper won't open again without a restart. If this is necessary, please tell me and I will give you a log tomorrow.) Please also include a debug log if possible. If you are reporting an issue with yabridgectl, then you can omit this section.

  1. First make sure that there are no leftover Wine processes left running in the background using wineserver -k.
  2. Launch your host from a terminal using env YABRIDGE_DEBUG_FILE=/tmp/yabridge.log YABRIDGE_DEBUG_LEVEL=2 <host>, e.g. env YABRIDGE_DEBUG_FILE=/tmp/yabridge.log YABRIDGE_DEBUG_LEVEL=2 bitwig-studio.
  3. Try to scan or load the plugin that's causing issues.
  4. /tmp/yabridge.log should now contain a debug log. You can either attach this log directly to the issue by dragging the file onto this text box, or you could upload the contents to a website like GitHub's Gists or Hastebin.
robbert-vdh commented 4 years ago

Hi,

First of all, I've recently rewritten the way keyboard input works to be much more reliable and consistent feeling in Ardour and REAPER. I haven't gotten around to making a release for this just yet, but you may be interested in using the development version with these changes for the time being. Prebuilt versions are available from the automated builds on GitHub, and on Arch and Manjaro you can use the yabridge-git AUR package instead.

I just tried using the top two plugins from that YouTube video (the 32-bit version of FA 3, and the 64-bit version of TSE 808), and I was not having any issues running them with i3-gaps 4.18.2-2, REAPER 6.14 and using both wine-nspa 5.9-19 and wine-staging-5.17.2-1 from Manjaro's repos. There's likely some dependency issue going on. A first thing you could do would be to install some common dependencies though winetricks. The usual suspects here are vcrun2019 and gdiplus. You may also have to disable d2d1.dll in winecfg since Wine's implementation is incomplete and most plugins (Spire being an exception) will work fine without Direct2D support. If that doesn't work, then there may be something useful in yabridge's debug logs. To create these logs, run REAPER with:

env YABRIDGE_DEBUG_FILE=/tmp/yabridge.log YABRIDGE_DEBUG_LEVEL=1 reaper

Then load a plugin, and upload the contents of /tmp/yabridge.log to hastebin or drag the file directly onto the comments field here on GitHub.

drewofdoom commented 4 years ago

I'm having the same issue. Here's the debug log: https://pastebin.com/nghRiyfU

Edit: FWIW, My plugins have no issue showing a UI with the same overrides, etc., when using LinVST.

robbert-vdh commented 4 years ago

Hmmm strange. I can't seem to reproduce it here, and there's also nothing strange in those logs. Could you tell me:

Thanks!


*Because REAPER's bridging doesn't seem to properly work with VST2 plugins. With yabridge the GUI is too small by default (although you can drag the window to resize), and native U-He VST2 plugins don't work at all when bridging is enabled.

Trollwut commented 4 years ago

I copy my answer over from my reddit thread:


Ok, I did winetricks vcrun2019 gdiplus on ~/.wine and my toontrack-Wineprefix. I also disabled d2d1 in winecfg of both.

Still, the plugins don't want to render :/

I got a dump though. I opened reaper, clicked straight to the FX and added a plugin. Then clicked UI button to render the image. Then I closed everything.

Here is the dump: https://hastebin.com/takucoqoqa.makefile


In addition to that, I screenshotted the settings you have asked for:

1: https://i.imgur.com/jaH8ma3.png

2: https://i.imgur.com/MUxyRNX.png

robbert-vdh commented 4 years ago

Could you create a screenshot of the FX window where the plugin editor is not showing? And what does it look like when you double click on the plugin in the list to make the window float? And if you open Carla, drag the generated .so file (~/Games/toontrack/drive_c/Program Files/Steinberg/VSTPlugins/TSE808_x64/TSE_808_2.0_x64.so) directly onto Carla, and then opening the GUI, does that work fine?

Trollwut commented 4 years ago

When adding a plugin and click it once to show in the window embedded: https://i.imgur.com/aRgxYmH.png

Basically the background is what has been behind it before. It just leaves that "graphic glitch" as it is.

When double-clicking, this window pops out: https://i.imgur.com/b0AGhPy.png

When I move another window over it, this overdrawn window will then be shown there permanently instead. I mean, how to I describe it? It just doesn't redraw the window, just what have been over it before :D

And this is the embedded window, after I clicked on UI: https://i.imgur.com/dND2yR5.png

You see, the sliders are there and they work as intended.

This is when I drag the file into Carla: https://i.imgur.com/bhnAs0t.png

It seems to render. But I have no idea what Carla is, so I can't say if this is how it should look like :D

Hopefully this information helped you!

robbert-vdh commented 4 years ago

That's all so strange! And I can't seem to get it to behave the same way with i3 myself, it works just fine both when floating and tiling the windows. One other thing you could try that may get us one step closer to figuring out what's going on here, could you try resizing the FX window after the plugin gets all glitchy (floating_modifer ($mod by default) + RMB + drag in i3)?

And for Carla you have to press that little cogwheel to open the editor. I really wonder whether that works for you or not (since there should not be any differences).

Trollwut commented 4 years ago

One other thing you could try that may get us one step closer to figuring out what's going on here, could you try resizing the FX window after the plugin gets all glitchy

Sure. It still doesn't render anything. Resizing works as intended (also toggling float), but no image rendered.

And for Carla you have to press that little cogwheel to open the editor. I really wonder whether that works for you or not (since there should not be any differences).

I did a screenshot of my whole workspace. When opening the cogwheel, it opens the plugin's window in the middle (focused), but it also doesn't render anything: https://i.imgur.com/wCvojIG.png

robbert-vdh commented 4 years ago

At least the good news is that the issue doesn't have anything to do with REAPER - the bad news is that I still don't know w hat could be causing this since I can't reproduce it on Manjaro with i3 and the same Wine Staging version (and I also know quite a few people using yabridge with i3 without any issues which makes it all the stranger).

So logically the issue could either be that the reparenting (embedding a Wine window into the window provided by the DAW) doesn't work, or that it's something with Wine itself. I've created a build that strips most window handling including everything related to reparenting/embedding, so with this build the window will be shown standalone just like any other Wine application (f483015a8ab8fe78457e2c9fd2406e680ef05424). Could you try this build and report if the plugin draws correctly now. With this build you'll have the window provided by REAPER/Carla which will be empty, and there will be a separate Wine window with the plugin's editor GUI. Also, only if it's not too much of a hassle, could you try installing GNOME or KDE Plasma to see if the issue also happens there?

Easiest way to install this build on Manjaro would be to do the following. This will replace your current yabridge package, so you can just reinstall the old one and rerun yabridgectl sync after you're done.

git clone https://aur.archlinux.org/yabridge-git.git /tmp/yabridge-git
cd /tmp/yabridge-git

# We're using the yabridge-git AUR package, but instead of building from the master branch we'll modify the PKGBUILD to build from the branch that contains the above commit instead
sed -i 's!git+https://github.com/robbert-vdh/yabridge!git+https://github.com/robbert-vdh/yabridge#branch=removeme/standalone-without-reparenting!;s/yabridge-git/yabridge-git-standalone-test/' PKGBUILD

# And now just build the package and let it replace your current yabridge package
makepkg -sic

# Always rerun `yabridgectl sync` after updating yabridge
yabridgectl sync
Trollwut commented 4 years ago

Just for future reader: I needed lib32-boost-libs as a build dependency :)

I also needed to download yabridgectl from the Releases page (https://github.com/robbert-vdh/yabridge/releases) because it wasn't installed when compiling your branch.

Download the .tar.gz of yabridgectl, extract it and then use ./yabridgectl sync to, well, sync.


Oooooh @robbert-vdh, you sneaky clever boy, I guess we're onto something! So I used your mentioned branch, synced with that again. Then I opened Reaper, add the same VST as before and BOOM! as you mentioned, a new WINE window pops up. AND IT RENDERS!

Also, I can turn the knobs and it will change as intended. It works! Just, well, not as an embedded window :)

Screenshot: https://i.imgur.com/Yq4gmKU.png

So, may I ask what this means to that problem? Is the embedding some kind of broken?

Also, only if it's not too much of a hassle, could you try installing GNOME or KDE Plasma to see if the issue also happens there?

TBH yes, that's too much hassle. But I could try to install it on either VM (QEMU and VirtualBox) or on my second laptop to test it, if you want. But, as you see, both are then "another hardware".

robbert-vdh commented 4 years ago

Oh yeah when using the yabridge and yabridge-git packages you'll have to use the optional yabridgectl-git dependency for yabridgectl.

So then this would mean that something's interfering with the reparenting in your i3 installation. I had been testing with my own old i3 config, but I just installed Manjaro i3 on a VM and made sure every package was up to date. Then I ran yay -S yabridge-git yabridgectl-git wine-staging carla pulseaudio to install yabridge, yabridgectl, Carla, Wine and PulseAudio (because it for whatever reason didn't come with Manjaro i3). After everything was set up I downloaded TSE808, used yabridgectl to set up yabridge for it, and then loaded the plugin in Carla:

afbeelding

Are you using the default i3 config that comes with Manjaro i3 or are you using your own? Something in your config has to be interfering with the reparenting, since everything works fine both on my own i3 installation as well as with stock Manjaro i3 in a VM. I'm not that familiar with i3's debug logs anymore, but maybe when the reparenting fails (so with the regular version of yabridge) there's something in the debug logs or in ~/.xsession-errors. I really wish I could reproduce this, because that would make fixing it so much easier!

Anyways, in a moment of desperation I tried something else since I can't investigate the issue myself. If you rerun the script above, you'll now get a new version of yabridge (with commit 7a6a746f5e02eaf2761ec38217700712b997f20e) that does yet another reparent after showing the Wine window. Maybe that can work around the issues with your i3 installation? And if you could someone share your i3 config that would be great too, maybe we can figure something out there!

Trollwut commented 4 years ago

First of all, thank you for investigating this problem!

Are you using the default i3 config that comes with Manjaro i3 or are you using your own?

My own, built from Manjaro Architect. Here is my i3 config: https://hastebin.com/vasurozuva.pl

in ~/.xsession-errors

While using your previously branch, I get no xsession-errors at all. Also non with yabridge-bin.

If you rerun the script above, you'll now get a new version of yabridge (with commit 7a6a746) that does yet another reparent after showing the Wine window.

Jackpot! It now renders in the intended window :) Turning the knobs feel like "limited to 30 fps", but that might just be the plugin itself. BUT, with that new commit, it seems to work as intended! (tested in Carla)

// Off-topic: Are you using KDE+i3 in your last screenshot? Because I'd like to test that. Anything why I shouldn't use it over just i3?

robbert-vdh commented 4 years ago

I tried your i3 config in the same VM I was using in the comment above, and outside of picom --experimental-backends just flat out not working in the VM (and even plain picom throws a few warnings and gets all glitchy when things start happening), everything seems to work just fine there. The compositor hijacking windows is the only thing I can think of that could be causing these isses (I've been testing with good old compton on both i3 configurations).

Anyways, I've included the fix on the master branch. I'm still baffled as to what could be causing this, but at least it works now. You can now just use yay -S yabridge-git to build directly from the master branch. You may also want to create a yabridge.toml file next to your VST plugin's .dll and .so files with the following contents to work around a limitation when using yabridge in REAPER:

["*"]
hack_reaper_update_display = true

And the plugins will definitely be updating at 30fps unless they use OpenGL or something to do their rendering, although I don't particularly notice it in a way that really stands out. Drawing graphics in Win32 applications is tied to the message loop and right now that's running at 30 fps, which is about the same rate that most hosts on Windows use.

Oh and no, I'm just running plain KDE Plasma now. I tried combining i3 with both XFCE and KDE Plasma and the past after I didn't feel like micromanaging things like power management and all the other things a DE does for you anymore, but at some point I decided to just use plain KDE Plasma since I didn't have much use for tiling anymore (I use tmux and Emacs a lot, both have their own window management built in), and I could easily replicate most of i3's other window and workspace handling in Plasma. Also, I'm a sucker for fancy animations and eye candy :grin:.

Trollwut commented 4 years ago

I tried your i3 config in the same VM I was using in the comment above, and outside of picom --experimental-backends just flat out not working in the VM (and even plain picom throws a few warnings and gets all glitchy when things start happening), everything seems to work just fine there. The compositor hijacking windows is the only thing I can think of that could be causing these isses (I've been testing with good old compton on both i3 configurations).

First thing when booting is killing picom process. 😅 Because I'm a gamer and I don't want a compositor while gaming. So picom shouldn't be the problem.

Anyways, I've included the fix on the master branch. I'm still baffled as to what could be causing this, but at least it works now. You can now just use yay -S yabridge-git to build directly from the master branch. You may also want to create a yabridge.toml file next to your VST plugin's .dll and .so files with the following contents to work around a limitation when using yabridge in REAPER:

["*"]
hack_reaper_update_display = true

Thanks mate! Tested it quickly with Carla and works fine!

Maybe I can test it in the evening in Reaper, but I think it will work as intended.

And the plugins will definitely be updating at 30fps unless they use OpenGL or something to do their rendering, although I don't particularly notice it in a way that really stands out. Drawing graphics in Win32 applications is tied to the message loop and right now that's running at 30 fps, which is about the same rate that most hosts on Windows use.

Ah, those are nice insights. :D I think I just see it as that obviously, as I'm now used to 144Hz screens.

Oh and no, I'm just running plain KDE Plasma now. I tried combining i3 with both XFCE and KDE Plasma and the past after I didn't feel like micromanaging things like power management and all the other things a DE does for you anymore, but at some point I decided to just use plain KDE Plasma since I didn't have much use for tiling anymore (I use tmux and Emacs a lot, both have their own window management built in), and I could easily replicate most of i3's other window and workspace handling in Plasma. Also, I'm a sucker for fancy animations and eye candy grin.

Yes, I also would sometimes like to have a DE because of convenience stuff. And KDE is the best-looking IMHO. :) I might try to run KDE+i3 in a VM sometimes, let's see... On the other hand, there are already tiling scripts for KDE, so I think KDE+i3 just may cause some unintended behaviour and running vanilla KDE might be a better idea.


Anyway, big thanks for your effort!!!

Is there any way to donate a coffee to you?

robbert-vdh commented 4 years ago

I'm also using a 144 Hz display and 30 FPS is really jarring while gaming - but somehow I don't mind it as much when just turning knobs haha.

I've had more people ask for a way to donate so I've just added some links to the sponsor button in GitHub, but I don't really need any donations. I created yabridge in an effort to make audio production on Linux slightly more pleasant, so just spreading the word about yabridge is more important to me!

robbert-vdh commented 4 years ago

I've just released yabridge 1.7.0 with the fix for this issue. Please reopen this issue if it turns out it's still not fixed!

Trollwut commented 4 years ago

Hello! Just installed yabridge-bin with the newest release and wanted to tell you, that everything works as intended! :)

You still owe me an answer, if there is a way that I can donate a coffee to you. You really earned that!

jdnixx commented 1 year ago

I'm running into this issue all of a sudden as well. Got here through google. Dunno if it's on Reaper's side or yabridge's

The weirdest thing is that this just started happening a couple days ago when I tried adding some new VST's to my usual stack, which I haven't changed at all for a few months now because I was happy with how it sounded. The ones that I added a long time ago & already have in my project (which are running through yabridge) still work fine. I only have problems once I add a new plugin & try to use it.

EDIT: one more thing, it appears newly added plugins DO work: I added Ignite - Emissary to my project and it does change the sound. In fact if you click the "UI" box in the top right of the window, it shows all the basic sliders that reaper renders for you. It's just the plugin's custom UI that doesn't appear to work

robbert-vdh commented 1 year ago

@jdnixx Check WIne's logs. There's probably something in there. Like missing GPU drivers, you disabling D2D1 and the plugin requiring it.

indigomirage commented 1 year ago

@jdnixx Check WIne's logs. There's probably something in there. Like missing GPU drivers, you disabling D2D1 and the plugin requiring it.

I have the same issue. Uncertain where to look. Have yet to get a single plugin actually running in reaper 7.02 under Linux.

I'm sure there's an answer somewhere.