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

Wine 9.17 adds high DPI scaling but breaks Yabridge's ability to size windows correctly #368

Closed fripholm closed 2 days ago

fripholm commented 2 months ago

Thanks for giving yabridge a shot!

Problem description

Wine version 9.17 adds 'Window surface scaling on High DPI displays.' This in itself is awesome because e.g. older Native Instruments software like Battery or Massive scale their GUI to the 'Screen resolution' setting under the 'Graphics' tab in WINECFG. This would be really helpful on high DPI displays.

But now, although the GUI is scaled properly, values higher than the default '96 dpi' cause Yabridge to crop parts of the user interface with no way to reveal the cropped area.

What did you expect to happen?

When 'Screen resolution' is set higher than 96 dpi, Yabridge plugin windows should size according to this value.

What actually happened?

Plugin windows are cropped smaller than their actual GUI. This even happens with plugins that actually have scaling capability built in, like Serum, GlissEQ or Tone Projects Unisum.

Operating system

MX Linux

How did you install yabridge?

directly from the releases page

yabridge version

5.1.0

yabridgectl version

5.1.0

Wine version

wine-9.17 (Staging)

Plugin

various

Plugin type

both VST2 and VST3

Plugin architecture

64-bit

Host

Reaper 7.22

Desktop environment or WM

KDE Plasma 5.27.5

GPU model

AMD 780M

GPU drivers and kernel

6.10.8-1-liquorix-amd64

Debug log

No response

Anything else?

No response

tobiashuttinger commented 1 month ago

This also happens on Arch Linux with yabridge 5.1.0-5 and wine 9.18-1 for me. Unfortunately, yabridge is unusable this way. Until this is fixed, is there any workaround except lowering DPI?

robbert-vdh commented 1 month ago

I'm just looking into this, haven't been keeping up with new Wine releases as much lately. Before I dive into this, does anyone happen to have more context on these recent changes? The scaling seems to do be acting up in some places too, so if the current behavior is still being tweaked I'd rather not work around it in yabridge for it to be broken again in the next release. I'll see what I can find out.

siborg commented 1 month ago

I noticed it only because i had dpi set to 120 in winecfg. Once i lowered it down to 96 - things went back to normal. My monitors are 1440p so I can cope with the lower dpi and still be able to see wine apps GUI properly.

On Sun, 6 Oct 2024 at 15:01, Robbert van der Helm @.***> wrote:

I'm just looking into this, haven't been keeping up with new Wine releases as much lately. Before I dive into this, does anyone happen to have more context on these recent changes? The scaling seems to do be acting up in some places too, so if the current behavior is still being tweaked I'd rather not work around it in yabridge for it to be broken again in the next release. I'll see what I can find out.

— Reply to this email directly, view it on GitHub https://github.com/robbert-vdh/yabridge/issues/368#issuecomment-2395451547, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ6NUWHDD524FUQPGKMZ5TZ2E7CVAVCNFSM6AAAAABNZ4RCI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJVGQ2TCNJUG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

robbert-vdh commented 1 month ago

I'll just go through the diff from Wine 9.17 to check what they actually ended up implementing, and to what extend the previous implementation handled scaling. It sounds like it now sometimes does its own surface scaling as part of the layer that maps Wine's WIn32 windows to X11 windows, which means that coordinates and sizes no longer match up. That scaling behaves close to what Windows also does (and some plugins I just tried look absolutely horrible at 144 DPI now), but I'd prefer if fixing this in yabridge doesn't cause scaling issues for older versions that don't have this scaling yet.

robbert-vdh commented 1 month ago

It should work just like before again now. Could you try a master branch build? https://github.com/robbert-vdh/yabridge?tab=readme-ov-file#installing-a-development-build

It may be nice to use this new surface scaling in the future as it would make old plugins that don't have any API scaling a bit more usable, but that may need some more figuring out because currently in the DPI unaware mode everything uses this ugly linear scaling. For example, this is what VVV looked like before Wine 9.17, and with these new changes:

image

And this is what it looks like with this new Wine 9.17 DPI scaling:

image

tobiashuttinger commented 1 month ago

I just tried your latest changes on master, it works perfectly now!

bsedin commented 1 month ago

Had same problem, compiled from master branch and it works perfectly again, tested on wine 9.19 and 9.20. Thank you @robbert-vdh !

robbert-vdh commented 2 days ago

This should be fixed as of yabridge 5.1.1!