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

Wayland not supported yet #329

Open
igitur opened this issue Feb 5, 2017 · 19 comments
Open

Wayland not supported yet #329

igitur opened this issue Feb 5, 2017 · 19 comments

Comments

@igitur
Copy link

igitur commented Feb 5, 2017

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'
@jliljebl jliljebl changed the title AttributeError: 'GdkWaylandWindow' object has no attribute 'get_xid' Wayland not suppoerted yet Feb 6, 2017
@jliljebl jliljebl changed the title Wayland not suppoerted yet Wayland not supported yet Feb 6, 2017
@jliljebl
Copy link
Owner

jliljebl commented Feb 6, 2017

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.

@igitur
Copy link
Author

igitur commented Feb 6, 2017

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

@edugsdf
Copy link

edugsdf commented Apr 8, 2017

Any news of correction?

@jliljebl
Copy link
Owner

jliljebl commented Apr 9, 2017

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

@fedelibre
Copy link

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.

@kppmsd
Copy link

kppmsd commented Dec 29, 2017

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.

@jliljebl
Copy link
Owner

jliljebl commented Jan 2, 2018

@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.

@fedelibre
Copy link

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

@jliljebl
Copy link
Owner

jliljebl commented Jan 3, 2018

@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.

@kppmsd
Copy link

kppmsd commented Jan 7, 2018

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.

@gurumark
Copy link

@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".

@BrunoVernay
Copy link

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

@gurumark
Copy link

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?

@jliljebl
Copy link
Owner

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

@gurumark
Copy link

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.

@jliljebl jliljebl removed the < 2.0 label Oct 9, 2018
@Zotter
Copy link

Zotter commented Feb 6, 2019

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.

@bhack
Copy link

bhack commented Feb 18, 2021

Check libsdl-org/SDL#3739

@elmarsto
Copy link

elmarsto commented Mar 31, 2022

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

@schauveau
Copy link

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.

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