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
firefox: add pipewire patch for wayland users #84233
firefox: add pipewire patch for wayland users #84233
Conversation
a4d16cb
to
5b3bfb8
Compare
I have seen those in the past.. I have the feeling that we do not have the same bandwidth that fedora has to carry custom patches from release to release. I surely am not looking forward to rebase a patch. What is the current situation on upstream bugzilla regarding this? On a related note: Fedora also carried a bunch of other wayland patches last time I checked. If we go this route, would those make also sense? |
|
@@ -94,6 +94,7 @@ stdenv.mkDerivation ({ | |||
patches = [ | |||
./env_var_for_system_dir.patch | |||
] | |||
++ lib.optional waylandSupport ./fedora-pipewire.patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will update the filename
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you fetch it from fedora instead of putting it in-tree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtojnar I'll update. Please note, this isn't the Fedora patch though (when I took the relevant patch from master, it didn't build, idk if our Firefox is newer?). This patch is here, which I believe was the repo building the Nightly Flatpak that most folks have been using for quite sometime: https://github.com/xhorak/firefox-devedition-flatpak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, use https://github.com/xhorak/firefox-devedition-flatpak/raw/303388734fb213a9c4e5836f5017a4a849372bdb/org.mozilla.FirefoxNightly/firefox-pipewire.patch
then.
I for sure want this for gnome integration 👍 |
If this patch becomes a burden just forward the task to me. |
There is also the issue of trademarks. We are only permitted to use the Firefox logo and name for builds that do not deviate from upstream too much, see #31843 (comment). |
Does that mean Fedora somehow has special privileges? I believe these are the relevant bugs in firefox: |
No idea. Maybe legal people just did not notice yet. |
029730e
to
f41df2b
Compare
@@ -0,0 +1,473 @@ | |||
diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required if you use fetchpatch
.
f41df2b
to
ac2d3e3
Compare
By the way, this builds now, but I can't really validate this properly due to sway/wlroots/xdg stuff that needs a lot of attention first. |
ac2d3e3
to
d513a7c
Compare
@colemickens I can do this, since it should be straightforward in a GNOME environment. |
was getting
|
On 06:32 22.04.20, worldofpeace wrote:
was getting
```
| ^~~~~~~~~~~~
free(): invalid pointer
In file included from /build/firefox-75.0/obj-x86_64-pc-linux-gnu/dist/include/nsThreadUtils.h:18,
from /build/firefox-75.0/xpcom/base/nsInterfaceRequestorAgg.cpp:11,
from Unified_cpp_xpcom_base2.cpp:2:
/build/firefox-75.0/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Tuple.h: In instantiation of 'struct mozilla::detail::TupleImpl<7, long unsigned int, long unsigned int, bool, bool, mozilla::dom::UserActivation::State, bool, RefPtr<mozilla::dom::FeaturePolicy>, unsigned int, nsID, bool, bool, bool, mozilla::dom::GVAutoplayRequestStatus, mozilla::dom::GVAutoplayRequestStatus, float, mozilla::dom::OrientationType, nsTString<char16_t>, mozilla::Maybe<nsTString<char16_t> > >':
/build/firefox-75.0/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Tuple.h:114:8: recursively required from 'struct mozilla::detail::TupleImpl<1, bool, bool, nsILoadInfo::CrossOriginEmbedderPolicy, nsILoadInfo::CrossOriginOpenerPolicy, long unsigned int, long unsigned int, long unsigned int, long unsigned int, bool, bool, mozilla::dom::UserActivation::State, bool, RefPtr<mozilla::dom::FeaturePolicy>, unsigned int, nsID, bool, bool, bool, mozilla::dom::GVAutoplayRequestStatus, mozilla::dom::GVAutoplayRequestStatus, float, mozilla::dom::OrientationType, nsTString<char16_t>, mozilla::Maybe<nsTString<char16_t> > >'
/build/firefox-75.0/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Tuple.h:114:8: required from 'struct mozilla::detail::TupleImpl<0, nsTString<char16_t>, bool, bool, nsILoadInfo::CrossOriginEmbedderPolicy, nsILoadInfo::CrossOriginOpenerPolicy, long unsigned int, long unsigned int, long unsigned int, long unsigned int, bool, bool, mozilla::dom::UserActivation::State, bool, RefPtr<mozilla::dom::FeaturePolicy>, unsigned int, nsID, bool, bool, bool, mozilla::dom::GVAutoplayRequestStatus, mozilla::dom::GVAutoplayRequestStatus, float, mozilla::dom::OrientationType, nsTString<char16_t>, mozilla::Maybe<nsTString<char16_t> > >'
/build/firefox-75.0/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Tuple.h:224:7: required from 'class mozilla::Tuple<nsTString<char16_t>, bool, bool, nsILoadInfo::CrossOriginEmbedderPolicy, nsILoadInfo::CrossOriginOpenerPolicy, long unsigned int, long unsigned int, long unsigned int, long unsigned int, bool, bool, mozilla::dom::UserActivation::State, bool, RefPtr<mozilla::dom::FeaturePolicy>, unsigned int, nsID, bool, bool, bool, mozilla::dom::GVAutoplayRequestStatus, mozilla::dom::GVAutoplayRequestStatus, float, mozilla::dom::OrientationType, nsTString<char16_t>, mozilla::Maybe<nsTString<char16_t> > >'
/build/firefox-75.0/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/SyncedContext.h:163:14: required from 'struct mozilla::dom::syncedcontext::FieldStorage<void, nsTString<char16_t>, bool, bool, nsILoadInfo::CrossOriginEmbedderPolicy, nsILoadInfo::CrossOriginOpenerPolicy, long unsigned int, long unsigned int, long unsigned int, long unsigned int, bool, bool, mozilla::dom::UserActivation::State, bool, RefPtr<mozilla::dom::FeaturePolicy>, unsigned int, nsID, bool, bool, bool, mozilla::dom::GVAutoplayRequestStatus, mozilla::dom::GVAutoplayRequestStatus, float, mozilla::dom::OrientationType, nsTString<char16_t>, mozilla::Maybe<nsTString<char16_t> > >'
/build/firefox-75.0/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BrowsingContext.h:132:3: required from here
/build/firefox-75.0/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Tuple.h:114:8: internal compiler error: Aborted
114 | struct TupleImpl<Index, HeadT, TailT...>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
make[3]: *** [/build/firefox-75.0/config/rules.mk:745: Unified_cpp_xpcom_base2.o] Error 1
make[3]: *** Waiting for unfinished jobs....
```
You were likely running out of memory or disk space. How much RAM and
space do you have on /tmp?
|
@andir RAM 23.1/62.8G and from the looks of df
|
Fedora has a pipewire-0.3.patch now. I am currently |
Also, the patch for pipewire-0.3 is the first that seems to work relatively stable, together with latest xdg-desktop-portal-wlr and latest pipewire on sway. |
@calbrecht is that from your experience in Fedora, or do you have a Firefox build from nixpkgs that works? |
@colemickens thats from my experience from running it on nixos master since i got it to run for the first time about two months ago. See the overlay :) |
This is really awesome though only one of my monitors can be shared. |
@berbiche this is a current limitation of xdp-desktop-portal-wlr |
3361764
to
e3c95ab
Compare
Thanks for the great work :) I was wondering how I can use this in nixos configuration. If I import it and put it in nixpkgs.overlays I get the infinite recursion error |
I am using this overlay:
|
Thanks. this works. The sha is wrong though. On a different note, the whole reason I wanted to use this is to utilize the cache but it doesn't seem to be working. NixOS still tries to compile it from the source |
The sha was correct when I first tried this and it built from cache then, maybe it has been updated since? |
yeah, that's probably it. |
I tried this firefox overlay on sway, probably unrelated, but I just get a black screen and a cursor when sharing my screen. Probably configuration right? At least, there's a moving cursor, which is an improvement from the total black screen from before. |
@hlolli were you using #84233 (comment) configuration? |
my blunder, I just added that config, now my firefox resolution is much bigger, I get a secondary screen when I enable by webcam. On google hangouts, I select to share my screen, but it's effectively a no-op, and the screen share button is greyed. But anyway, we can take this discussion somewhere else, feel it's bit off topic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!
e3c95ab
to
31e54cd
Compare
Just rebased, I'm on GNOME 3 so I'll try it out from cachix. Will likely merge this shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It worked let's go.
@NixOS/backports: Any chance we could backport this to 20.09? |
I'd love that. |
Is this still working for y'all? I even pulled a newer pipewire patch from Fedora and re-built and I still can't get it to activate. (It was working when this was sent though) |
Still works on my end on revision 0b67d9e |
I'm using GNOME and everything at https://mozilla.github.io/webrtc-landing/gum_test.html works |
opened #99692 |
Motivation for this change
This enables WebRTC Screensharing for Firefox users on Wayland.
This patch is sourced from Fedora: https://src.fedoraproject.org/rpms/firefox/blob/master/f/firefox-pipewire-0-3.patch
an excerpt from my
profiles/sway.nix
:(This patch is required is due to limitations at the boundary of Firefox and WebRTC build systems: (I think it's this root issue:) https://bugzilla.mozilla.org/show_bug.cgi?id=1534615)
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)