flowblade icon indicating copy to clipboard operation
flowblade copied to clipboard

Wayland not supported yet

Open igitur opened this issue 8 years ago • 19 comments

I'm trying to run flowblade on Fedora 25, which uses Wayland instead of X11.

I'm getting this traceback:

Selected color detected
BG color detected
Traceback (most recent call last):
  File "flowblade-trunk/flowblade", line 78, in <module>
    app.main(modules_path)
  File "/media/storage/dev/flowblade/flowblade-trunk/Flowblade/app.py", line 287, in main
    launch_player()
  File "/media/storage/dev/flowblade/flowblade-trunk/Flowblade/app.py", line 439, in launch_player
    editorstate.player.set_sdl_xwindow(gui.tline_display)
  File "/media/storage/dev/flowblade/flowblade-trunk/Flowblade/mltplayer.py", line 91, in set_sdl_xwindow
    os.putenv('SDL_WINDOWID', str(widget.get_window().get_xid()))
AttributeError: 'GdkWaylandWindow' object has no attribute 'get_xid'

igitur avatar Feb 05 '17 19:02 igitur

Yes, Flowblade uses MLT SDL consumer to display video and this does not work on Wayland.

Wayland support will be added in summer/autumn 2017, it will require quite a bit of work to get done and cannot be added to 1.12.

The WORKAROUND is to use X11 session when running Flowblade. X11 session is available in Fedora 25.

jliljebl avatar Feb 06 '17 12:02 jliljebl

It IS currently summer 2017. For me, at least. :-P

igitur avatar Feb 06 '17 12:02 igitur

Any news of correction?

edugsdf avatar Apr 08 '17 19:04 edugsdf

Timetable for Wayland support is still autumn 2017 or later unless we receive contributions.

jliljebl avatar Apr 09 '17 07:04 jliljebl

Hey, new user here.. I've just hit this on Fedora 26. I look forward to Wayland support, but I'll use X11 in the meanwhile.

fedelibre avatar Sep 24 '17 17:09 fedelibre

It seems that you might be able work around this by forcing flowblade to use x11 gdk backdend. That way the application will be run under Xwayland.

By starting flowblade with GDK_BACKEND=x11 flowblade I can get trough the error on first post. However I got struck by issue #445, so I still couldn't get flowblade to start, and test this properly.

kppmsd avatar Dec 29 '17 18:12 kppmsd

@kppmsd thanks for the pointer. I don't have Wayland capable system yet, neither my laptop or desktop run Wayland, but as soon as I have one I will test. If someone else has Wayland system, I would be interested in observed results for trying "GDK_BACKEND=x11 flowblade" to start Flowblade.

jliljebl avatar Jan 02 '18 17:01 jliljebl

I have Wayland and above command launches Flowblade correctly. I see only a warning in the terminal (don't know if it's releated to Wayland):

[swscaler @ 0x7fb268240ce0] Warning: data is not aligned! This can lead to a speedloss

fedelibre avatar Jan 03 '18 07:01 fedelibre

@fedelibre Thanks, I updated FAQ too.

Now we have two workarounds:

  1. Start Flowblade from terminal with command:

    GDK_BACKEND=x11 flowblade

  2. Use X11 session when running Flowblade.

jliljebl avatar Jan 03 '18 17:01 jliljebl

You could also add the environment variable to the Exec= line in flowblade.desktop file with: Exec=env GDK_BACKEND=x11 flowblade %f

That works on wayland, and should also work just fine on Xorg.

kppmsd avatar Jan 07 '18 16:01 kppmsd

@kppmsd When I add Exec=env GDK_BACKEND=x11 flowblade %f to the desktop file and run it, it starts fine. However, when you wanted to save a project, it says "permission denied".

gurumark avatar Mar 18 '18 01:03 gurumark

Looks like a file permission issue to me. @gurumark are you sure it is related to Wayland vs. X11?

BrunoVernay avatar Mar 18 '18 12:03 BrunoVernay

Yes, it is a permission issue. Flowblade is installed under /usr/share/menu/ and owned by root.

When I run flowblade as sudo flowblade... I am not getting any errors.

Should be owned by some other user. Is it the reason producing "permission"? What should I do to be able to save the project?

gurumark avatar Mar 18 '18 13:03 gurumark

Yes, it is a permission issue. Flowblade is installed under /usr/share/menu/ and owned by root.

I don't think this has anything to do with Flowblade source code so I can't do patch to fix this, this is an issue with particular installation in particular distro. If you are using the setup.py script to install Flowblade the results are unknown to me, it may work, it my not, setup.py is present for .deb packaking.

/usr/share/menu/ is not a lauchscript supported installation location, see here: https://github.com/jliljebl/flowblade/blob/master/flowblade-trunk/flowblade

jliljebl avatar Mar 18 '18 13:03 jliljebl

You're right. It turns out that because I was using "sudo flowblade" to run it in the first place, it was saving the file as root. Then I changed it my local user and tried to save the same file. That's why I got the permission error. thanks for help me out.

gurumark avatar Mar 18 '18 16:03 gurumark

FWIW this workaround is working on Fedora 29 just fine: Using today's 'git clone' version:

cd ~/flowblade/flowblade-trunk GDK_BACKEND=x11 ./flowblade

Note: Don't use flowblade's setup.py on Fedora.

Zotter avatar Feb 06 '19 20:02 Zotter

Check https://github.com/libsdl-org/SDL/issues/3739

bhack avatar Feb 18 '21 22:02 bhack

As of today, on NixOS 21.11, you need the following environment setup in order to run Flowblade under Wayland. It will start with just GDK_BACKEND, but you won't be able to see or do much of anything without SDL_VIDEODRIVER as well.

 GDK_BACKEND=x11 SDL_VIDEODRIVER=x11 flowblade 

While I'm documenting this here, on this thread, to help the next person, my personal opinion is that it's more of an ask on NixOS packaging team, which I say here

elmarsto avatar Mar 31 '22 21:03 elmarsto

The SDL_WINDOWID method will probably never work in Wayland since there is no concept of window id in that API.

However, the ability to import external wayland surfaces into SDL windows was added in SDL a few days ago. That works quite differently than SDL_WINDOWID.

https://github.com/libsdl-org/SDL/blob/main/docs/README-wayland.md contains a full example using Qt but doing the same with Gtk should not be a major issue. However, it may not be possible to implement it manually in Flowblade since SDL is entirely managed by the MLT Consumer. Simply speaking, MLT probably needs to be updated to support that new SDL feature.

schauveau avatar Jan 17 '24 09:01 schauveau