Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve HDPI support #1160

Open
HubKing opened this issue May 13, 2024 · 5 comments
Open

Improve HDPI support #1160

HubKing opened this issue May 13, 2024 · 5 comments

Comments

@HubKing
Copy link

HubKing commented May 13, 2024

Please include the following information.

  1. Flowblade version (Help->About): 2.14.0.2
  2. MLT version (Help->Runtime Environment): 7.24.0
  3. Your distribution and desktop environment(Ubuntu/Unity, Debian/KDE, Mint/Cinnamon etc.): EndeavourOS(basically Arch Linux with some additional utilities, so the problem is probably the same on Arch Linux), Plasma 6.0.4
  4. X11 or Wayland: Wayland with fractional scaling.
  5. If possible, try to provide step-by-step instructions on how to reproduce the issue. From developer point of view this is the easieast way to understand what is happening.: Installed from the Arch official repository. As soon as it starts, the window becomes unresponsive (showing "Not responding" in the title) and crashes. The full terminal output is attached, but the main error seems to be:
  File "/usr/lib/python3.12/site-packages/Flowblade/mltplayer.py", line 88, in set_sdl_xwindow
    os.putenv('SDL_WINDOWID', str(widget.get_window().get_xid()))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'GdkWaylandWindow' object has no attribute 'get_xid'. Did you mean: 'get_width'?

log.txt

Also, in the kernel log:

kernel python[363963]: segfault at 14 ip 00007e7b33228efd sp 00007e7b067ff910 error 4 in libmltavformat.so[7e7b33217000+1b000] likely on CPU 7 (core 1, socket 0)

kernel log.txt

The GPU is Intel A770, which currently has some sort of driver bug that makes Blender stuck when trying to use GPU rendering ( https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10895 ), but I am not sure if that is related here.

When launched in Xwayland mode, like below, it does not crash, but since I use "Apps scaling themselves" for X11, the UI elements look tiny. I don't want to use System scaling for X11, because it makes other apps blurry.

SDL12COMPAT_NO_QUIT_VIDEO=1 GDK_BACKEND=x11 SDL_VIDEODRIVER=x11 /usr/bin/flowblade

@jliljebl
Copy link
Owner

jliljebl commented May 15, 2024

When launched in Xwayland mode, like below, it does not crash, but since I use "Apps scaling themselves" for X11, the UI elements look tiny. I don't want to use System scaling for X11, because it makes other apps blurry.

Yes, Flowlade is not native Wayland app yet because MLT does not have Wayland video output.

For now you can select from app menu Edit -> Preferences and in View panel in Track Heights preference select Double For HDPI - 100px option.

BTW, would it be possible for you to post 2 screenshots. First before applying Double For HDPI - 100px option and second one after applying it, with some clips in timeline so that I'll see how bad the small GUI problem is? I don't have HDPI monitor available to test, so all additional info would be good.

@jliljebl
Copy link
Owner

In https://superuser.com/questions/950794/per-application-window-scaling-in-xorg-for-high-dpi-display I found this

Without seeing the exact problem that you are running into I would suggest using
GDK_SCALE=x
or
GDK_DPI_SCALE=x
Before starting each application. You will likely have to manually change .desktop files or run from your shell prefixing the commands with GDK_SCALE=x
GDK_SCALE only allow interger values however GDK_DPI_SCALE=x allow for decimal values like i.e.GDK_DPI_SCALE=0.66
For other SDK based applications there are likely similar settings for respective kits. However since your problem is with gnome desktop I will provide this solution.
I haven't tried with a 4k monitor, but running GDK_DPI_SCALE=1.66 gnome-calculator will demo the solution.

So does something like:

SDL12COMPAT_NO_QUIT_VIDEO=1 GDK_BACKEND=x11 SDL_VIDEODRIVER=x11  GDK_DPI_SCALE=1.5  /usr/bin/flowblade 

help?

@HubKing
Copy link
Author

HubKing commented May 15, 2024

Below are the screenshots. Panels like "Project Profile" or "Active" or the left size of the tracks don't seem to allow adjusting the width. Also, unless this app doesn't work without a real GPU, you can probably test it in a virtual machine with the monitor size set to large. You would need to scroll the screen, but it will probably work.

Default DPI + Default Track size
default+Normal

Default DPI + Double Track size
default_Double

DPI 1.5 + Default Track size
DPI1 5+Normal

DPI 1.5 + Double Track size
DPI1 5+Double

@HubKing
Copy link
Author

HubKing commented May 15, 2024

Probably the most useable option is GDK Scale 2 (only allows whole numbers) + Double Track size. Everything is too big, but better than too small, though I cannot move the horizontal splitter to make the track panel taller.

image

@HubKing HubKing closed this as completed May 15, 2024
@jliljebl
Copy link
Owner

jliljebl commented May 15, 2024

Below are the screenshots. Panels like "Project Profile" or "Active" or the left size of the tracks don't seem to allow adjusting the width.

Ok, thanks, this helps a lot. The Double Track Size seems broken and "Project Profile" and some others need panel sizes to be scaled by user selected multipliers.

Also, unless this app doesn't work without a real GPU, you can probably test it in a virtual machine with the monitor size set to large. You would need to scroll the screen, but it will probably work.

No, we don't need real GPU to run, so testing in virtual machine seems very interesting. If I can actually see what is going on, and get some screenshots I can easily see many ways to get improvement.

I'll rename this Issue as Improve HDPI support. I'm not doing any new features for the upcoming 2.16 release as of today now that I got motion features in, but for 2.18 we can get much nicer results by giving users more preference options.

@jliljebl jliljebl reopened this May 15, 2024
@jliljebl jliljebl changed the title 'GdkWaylandWindow' object has no attribute 'get_xid'. Did you mean: 'get_width' Improve HDPI support May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants