Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd Wayland Support #5071
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
vcunat
Nov 21, 2014
Member
IIRC gtk3 supports wayland natively, so I presume most gtk3 apps should just work out of the box. The whole gnome3 stack should be a low-hanging fruit (because upstream supports it). The WMs you listed are packaged, only they may need some (X)wayland tweaks.
|
IIRC gtk3 supports wayland natively, so I presume most gtk3 apps should just work out of the box. The whole gnome3 stack should be a low-hanging fruit (because upstream supports it). The WMs you listed are packaged, only they may need some (X)wayland tweaks. |
vcunat
added
6.topic: nixos
0.kind: enhancement
labels
Nov 21, 2014
added a commit
that referenced
this issue
Nov 24, 2014
referenced
this issue
Nov 24, 2014
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
auntieNeo
Feb 5, 2015
Contributor
I have started working on writing NixOS modules for Wayland compositors, out of my own interest in using Wayland as a primary window environment. I have hit a snag where compositors (both weston-launch and swc-launch) will segfault, but only when running as systemd services. I've been sidetracked into trying to collect core dumps of those processes, but I suspect it has something to do with systemd sandboxing.
Right now I'm just making modules as simple systemd services, but I think it might be best to somehow incorporate Wayland sessions into the existing X11 display-manager/session configuration. It is conceivable that one might launch a Wayland compositor from an X11 display manager and vice-versa. I fear this will add a lot of multiplicity to the options, but I believe more than one person will want this during the X11 to Wayland transition period. (Personally, I will just be using auto-login, so I'm open to whatever works)
There have been a number of lesser-known compositors popping up, many of them on github. There's a good list on the Arch Wiki. I might add packages for a few of those as I test them out.
My only goal right now is boot to Wayland. It shouldn't be difficult to do, but doing it right with all of the right options exposed could be tricky.
|
I have started working on writing NixOS modules for Wayland compositors, out of my own interest in using Wayland as a primary window environment. I have hit a snag where compositors (both weston-launch and swc-launch) will segfault, but only when running as systemd services. I've been sidetracked into trying to collect core dumps of those processes, but I suspect it has something to do with systemd sandboxing. Right now I'm just making modules as simple systemd services, but I think it might be best to somehow incorporate Wayland sessions into the existing X11 display-manager/session configuration. It is conceivable that one might launch a Wayland compositor from an X11 display manager and vice-versa. I fear this will add a lot of multiplicity to the options, but I believe more than one person will want this during the X11 to Wayland transition period. (Personally, I will just be using auto-login, so I'm open to whatever works) There have been a number of lesser-known compositors popping up, many of them on github. There's a good list on the Arch Wiki. I might add packages for a few of those as I test them out. My only goal right now is boot to Wayland. It shouldn't be difficult to do, but doing it right with all of the right options exposed could be tricky. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
lethalman
Feb 5, 2015
Contributor
@auntieNeo consider checking journalctl, most likely you find the reason of the crash there.
About core dumps, it may be worthwhile for you to look at this function:
Line 114 in 8d49e87
It will tweak the build of a derivation to include debug symbols.
Also another think you should note, is that opengl needs LD_LIBRARY_PATH to be correctly set. It's done by default on user environments, don't know if it's also in systemd service variables by default.
|
@auntieNeo consider checking journalctl, most likely you find the reason of the crash there. About core dumps, it may be worthwhile for you to look at this function: Line 114 in 8d49e87 It will tweak the build of a derivation to include debug symbols. Also another think you should note, is that opengl needs |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
vcunat
Feb 5, 2015
Member
Before inspecting coredumps, just using strace might be more efficient (to see what resources are accessed right before the crash).
|
Before inspecting coredumps, just using strace might be more efficient (to see what resources are accessed right before the crash). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
auntieNeo
Feb 5, 2015
Contributor
journalctl is what told me that it was segfaulting in the first place. My second instinct was to use strace, but I quickly discovered that setuid-wrapper.c has code that prevents it from running with strace here: https://github.com/NixOS/nixos/blob/master/modules/security/setuid-wrapper.c#L46
Without strace, I figured a core dump would be my only option. It took a while to figure out, but I enabled core dump collection in systemd. I have a pull request that adds the NixOS config niceties for enabling it here: #6168
@lethalman Thanks for the debugVersion tip. I was having trouble getting symbols in my core dump before I started using that.
tl;dr: I found and patched the segfault and sent it upstream. Now that it's working, I'll try to get a NixOS config interface fleshed out that works with multiple system/session compositors.
|
journalctl is what told me that it was segfaulting in the first place. My second instinct was to use strace, but I quickly discovered that setuid-wrapper.c has code that prevents it from running with strace here: https://github.com/NixOS/nixos/blob/master/modules/security/setuid-wrapper.c#L46 Without strace, I figured a core dump would be my only option. It took a while to figure out, but I enabled core dump collection in systemd. I have a pull request that adds the NixOS config niceties for enabling it here: #6168 @lethalman Thanks for the debugVersion tip. I was having trouble getting symbols in my core dump before I started using that. tl;dr: I found and patched the segfault and sent it upstream. Now that it's working, I'll try to get a NixOS config interface fleshed out that works with multiple system/session compositors. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Great @auntieNeo , will review your PR about the coredump. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
trishume
Feb 7, 2015
Contributor
This is awesome! NixOS is already awesome and the moment it supports Wayland well I will switch to it for my main computer. Depending on how annoyed I get at my current system I might ragequit earlier and help with the effort. I'm not at that point yet, but it's tempting.
|
This is awesome! NixOS is already awesome and the moment it supports Wayland well I will switch to it for my main computer. Depending on how annoyed I get at my current system I might ragequit earlier and help with the effort. I'm not at that point yet, but it's tempting. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
campadrenalin
Feb 19, 2015
Contributor
We have XWayland marked as done, as per previous ticket. However, it's not documented how to install a version of Weston that has the optional dependency supplied. Possibly that's in some more general documentation area, but my google-fu is lacking, and this seems like it should be more straightforward than it is.
Could anyone provide guidance on how to install Weston with XWayland?
|
We have XWayland marked as done, as per previous ticket. However, it's not documented how to install a version of Weston that has the optional dependency supplied. Possibly that's in some more general documentation area, but my google-fu is lacking, and this seems like it should be more straightforward than it is. Could anyone provide guidance on how to install Weston with XWayland? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
vcunat
Feb 19, 2015
Member
Weston (the non-lite version) comes with XWayland support. Only it doesn't compile in current master 170775a#commitcomment-9748711.
|
Weston (the non-lite version) comes with XWayland support. Only it doesn't compile in current master 170775a#commitcomment-9748711. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
yacinehmito
Dec 8, 2015
Contributor
Bumping!
How is the integration of Wayland going? I packaged a Wayland window manager -- see SirCmpwn/sway and my nixpkgs fork for the nix expression -- and I'd like to know if someone thought of an API akin to the X11 one for Nix. I'd very much like to contribute but as it impacts a lot more than this little package I'm afraid to touch anything before getting any insight.
|
Bumping! How is the integration of Wayland going? I packaged a Wayland window manager -- see SirCmpwn/sway and my nixpkgs fork for the nix expression -- and I'd like to know if someone thought of an API akin to the X11 one for Nix. I'd very much like to contribute but as it impacts a lot more than this little package I'm afraid to touch anything before getting any insight. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I don't understand what kind of API you mean; can you explain? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
yacinehmito
Dec 13, 2015
Contributor
We have a Nixos module that exposes services.xserver in order to configure the graphic stack to our liking, i. e. which window manager to use, which keyboard layout, which display manager etc. That's what I (perhaps wrongly) called the API.
There is no such thing for wayland. We could turn currently available window managers and desktop environements into services for wayland, provide options to compile widget toolkits with wayland support, set keyboard layouts, enable/disable Xwayland support and whatnot.
I'd like to know if some work has started in this direction or if someone thought about it already. I'm ready to work on it as soon as someone provides clear guidelines, because backward compatibility must be assured for this "API".
The main challenge is the way it may conflict with the already available X11 options, particularly regarding display managers which are currently mandatory to enable the graphic stack on Nixos.
EDIT: By the way, I ask because I packaged the sway window manager but I'm not willing to submit a PR until there's a proper way to configure it.
|
We have a Nixos module that exposes There is no such thing for wayland. We could turn currently available window managers and desktop environements into services for wayland, provide options to compile widget toolkits with wayland support, set keyboard layouts, enable/disable Xwayland support and whatnot. I'd like to know if some work has started in this direction or if someone thought about it already. I'm ready to work on it as soon as someone provides clear guidelines, because backward compatibility must be assured for this "API". The main challenge is the way it may conflict with the already available X11 options, particularly regarding display managers which are currently mandatory to enable the graphic stack on Nixos. EDIT: By the way, I ask because I packaged the sway window manager but I'm not willing to submit a PR until there's a proper way to configure it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
vcunat
Dec 14, 2015
Member
I see, at least superficially.
All modules can read all nixos options, I believe, so wayland stuff can start by reading those that make sense in both worlds. We could think of a better structure/names for the options in the meantime. There's a good infrastructure for option renaming at least.
Compiling with wayland support should become the default in nixpkgs, so we can share (most) binaries. We do so already for gtk3 at least (upstream doesn't even support building without wayland IIRC). Feel free to improve the situation.
|
I see, at least superficially. All modules can read all nixos options, I believe, so wayland stuff can start by reading those that make sense in both worlds. We could think of a better structure/names for the options in the meantime. There's a good infrastructure for option renaming at least. Compiling with wayland support should become the default in nixpkgs, so we can share (most) binaries. We do so already for gtk3 at least (upstream doesn't even support building without wayland IIRC). Feel free to improve the situation. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
auntieNeo
Dec 14, 2015
Contributor
@gpyh Regarding the nixos options, that is exactly what I am/was working on. I have some prototype nixos module code here:
https://github.com/auntieNeo/nixrc/tree/master/services/display
And I have some (pseudo-working) example configuration here:
https://github.com/auntieNeo/nixrc/blob/master/profiles/desktop.nix#L161-L244
Some time after starting working on that prototype, it became apparent that the display manager situation had not yet settled down in Wayland. Most X11-based display managers would either require a shim-script to start Wayland compositor, or we would need to use password-less logins with the compositor provided script (weston-init, etc.). Wayland itself doesn't even actually include the concept of display manager; it's really a function of logind.
The GDM people seem to be the only display manager actively working on this (from what I could find). They have some (possibly out of date) info on how they start a Wayland compositor here:
https://wiki.gnome.org/Initiatives/Wayland/gdm
So last I checked, about 6 months ago, the latest GDM (with GNOME on Wayland support) had not yet hit nixos, but it looks like it's here now.
So GDM looks like the place to start. Now that the semester is over I might have a bit of time to poke around at this. Other display managers might need a shim (and probably a different shim for each compositor) for launching Wayland compositors. A complete split from X11 display managers would be the easiest... but uh, there hasn't been any Wayland display managers until recently. :)
The multiplicity of Display Manager + Window Manager + Desktop Manager + Wayland Compositor is mind numbing, so (as a C++ developer) I've been working on abstraction/polymorphism techniques within nix modules to tackle the situation. So it's basically in the "analysis paralysis" phase until I can both 1.) figure out which compositor combinations are most possible/practical/in-demand to reduce the multiplicity and 2.) improve my nix-foo. Advice on either of these points is most helpful.
For now, running the compositor script from the command line (or even as a system service) is pretty easy. It's the login screen and easy configuration that needs to be done.
|
@gpyh Regarding the nixos options, that is exactly what I am/was working on. I have some prototype nixos module code here: Some time after starting working on that prototype, it became apparent that the display manager situation had not yet settled down in Wayland. Most X11-based display managers would either require a shim-script to start Wayland compositor, or we would need to use password-less logins with the compositor provided script (weston-init, etc.). Wayland itself doesn't even actually include the concept of display manager; it's really a function of logind. The GDM people seem to be the only display manager actively working on this (from what I could find). They have some (possibly out of date) info on how they start a Wayland compositor here: So last I checked, about 6 months ago, the latest GDM (with GNOME on Wayland support) had not yet hit nixos, but it looks like it's here now. So GDM looks like the place to start. Now that the semester is over I might have a bit of time to poke around at this. Other display managers might need a shim (and probably a different shim for each compositor) for launching Wayland compositors. A complete split from X11 display managers would be the easiest... but uh, there hasn't been any Wayland display managers until recently. :) The multiplicity of Display Manager + Window Manager + Desktop Manager + Wayland Compositor is mind numbing, so (as a C++ developer) I've been working on abstraction/polymorphism techniques within nix modules to tackle the situation. So it's basically in the "analysis paralysis" phase until I can both 1.) figure out which compositor combinations are most possible/practical/in-demand to reduce the multiplicity and 2.) improve my nix-foo. Advice on either of these points is most helpful. For now, running the compositor script from the command line (or even as a system service) is pretty easy. It's the login screen and easy configuration that needs to be done. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
trishume
Dec 15, 2015
Contributor
@auntieNeo Do you have an example of what you mean by "Display Manager + Window Manager + Desktop Manager + Wayland Compositor" multiplicity? Aren't the window manager and desktop manager kind of subsumed/tied into the compositor on Wayland?
One thing that might be cool to get working is GDM 3.16 with the default Wayland backend, not a desktop but at least something would be Wayland. Haven't really looked into it but there seems to be some work done here (@lethalman do you know how much is working with that?)
I know that other distros (like recent Fedora) have it so that one display manager can start up either an X11 or a Wayland session. That indicates that it might make sense to extend the current display manager modules to support starting Wayland compositors.
|
@auntieNeo Do you have an example of what you mean by "Display Manager + Window Manager + Desktop Manager + Wayland Compositor" multiplicity? Aren't the window manager and desktop manager kind of subsumed/tied into the compositor on Wayland? One thing that might be cool to get working is GDM 3.16 with the default Wayland backend, not a desktop but at least something would be Wayland. Haven't really looked into it but there seems to be some work done here (@lethalman do you know how much is working with that?) I know that other distros (like recent Fedora) have it so that one display manager can start up either an X11 or a Wayland session. That indicates that it might make sense to extend the current display manager modules to support starting Wayland compositors. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
yacinehmito
Dec 15, 2015
Contributor
Starting either a X11 or Wayland session from an X11 display manager is not that hard. SDDM and GDM can both do that, it's just up to NixOs to allow it. We just need to point toward the right *.desktop files and fire the Wayland compositor on top of the existing tty.
Getting to boot directly on Wayland on the other hand, that is challenging, and IMHO much more meaningful. I don't know about you but if I run Wayland it is not to see a Xorg process permanently running in the background.
I think that allowing this will heavily affect both the current logind-dm-xorg relationship and the functionalities exposed through the xserver module.
I'm eager to see your coming work @auntieNeo. I won't be of much help except packaging some additional Wayland window managers and writing services and options for them.
|
Starting either a X11 or Wayland session from an X11 display manager is not that hard. SDDM and GDM can both do that, it's just up to NixOs to allow it. We just need to point toward the right *.desktop files and fire the Wayland compositor on top of the existing tty. Getting to boot directly on Wayland on the other hand, that is challenging, and IMHO much more meaningful. I don't know about you but if I run Wayland it is not to see a Xorg process permanently running in the background. I think that allowing this will heavily affect both the current logind-dm-xorg relationship and the functionalities exposed through the I'm eager to see your coming work @auntieNeo. I won't be of much help except packaging some additional Wayland window managers and writing services and options for them. |
Mathnerd314
referenced this issue
Dec 18, 2015
Closed
slock: cannot disable the out-of-memory killer for this process #9656
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
lethalman
Jan 13, 2016
Contributor
@trishume I wasn't even able to run gdm 3.16 with X. We have gdm 3.14, it's a hard work to upgrade.
|
@trishume I wasn't even able to run gdm 3.16 with X. We have gdm 3.14, it's a hard work to upgrade. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
peterhoeg
Jul 9, 2016
Member
Regd wayland and KDE:
If you want to give Plasma/Wayland a try I recommend to not just wait for Plasma 5.7 but also for frameworks 5.24.
From: https://blog.martin-graesslin.com/blog/2016/06/wayland-in-plasma-5-7/
Additionally, there is now work by the Debian guys to try and standardize the running of a graphical session via systemd which would also apply here: https://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg36573.html
|
Regd wayland and KDE:
From: https://blog.martin-graesslin.com/blog/2016/06/wayland-in-plasma-5-7/ Additionally, there is now work by the Debian guys to try and standardize the running of a graphical session via systemd which would also apply here: https://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg36573.html |
siddharthist
referenced this issue
Jul 16, 2016
Closed
NixOS information is outdated on the wiki #755
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
siddharthist
Jul 16, 2016
Contributor
nixpkgs has the sway window manager, which supports Wayland + XWayland.
|
nixpkgs has the sway window manager, which supports Wayland + XWayland. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
tg-x
Oct 18, 2016
Contributor
Now both GTK and Qt have wayland support enabled.
Added a config.services.xserver.windowManager.sway config option that can be used together with wayland-compatible display managers such as SDDM or GDM -- this still requires an X server, though.
|
Now both GTK and Qt have wayland support enabled. Added a config.services.xserver.windowManager.sway config option that can be used together with wayland-compatible display managers such as SDDM or GDM -- this still requires an X server, though. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
groxxda
Oct 18, 2016
Contributor
Note that GDM from #19081 uses wayland instead of X (at least for the login screen).
Maybe a fellow wayland user want's to test it to get a x-less system (minus xwayland
The session file has to be placed in a folder named wayland-session to make gdm aware of its wayland nature (relevant source)
|
Note that GDM from #19081 uses wayland instead of X (at least for the login screen). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Is it possible to use only wayland yet? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
vcunat
Nov 19, 2016
Member
gnome 3.22 worked so recently in the default setting, but it's "temporarily" broken ATM: #19896. I don't know about people using any (other) wayland setup on NixOS, but there may be some.
|
gnome 3.22 worked so recently in the default setting, but it's "temporarily" broken ATM: #19896. I don't know about people using any (other) wayland setup on NixOS, but there may be some. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
toogley
Dec 24, 2016
@echo-oddly Why is xmonad on your list? As far as i understood this thread, they won't add wayland support in the near future.
toogley
commented
Dec 24, 2016
|
@echo-oddly Why is xmonad on your list? As far as i understood this thread, they won't add wayland support in the near future. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
miltador
Apr 1, 2017
Contributor
Added way-cooler Wayland wm. Supports Wayland + XWayland.
@echo-oddly, add it please to the list. Thanks!
|
Added |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
vcunat
Apr 1, 2017
Member
Right. Crossed XMonad and added way-cooler. It's well possible that gnome's wayland works OK already, though there are some gnome problems in general currently. I'm not sure about kwin.
|
Right. Crossed XMonad and added way-cooler. It's well possible that gnome's wayland works OK already, though there are some gnome problems in general currently. I'm not sure about kwin. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
toogley
Apr 1, 2017
@vcunat I use wayland and gnome on arch linux. And it works great, i had no real issue with it yet. So i can confirm that gnome's wayland works.
(However, i still am forced to use also Xwayland - some apps require that, as far as i remember.)
toogley
commented
Apr 1, 2017
|
@vcunat I use wayland and gnome on arch linux. And it works great, i had no real issue with it yet. So i can confirm that gnome's wayland works. (However, i still am forced to use also Xwayland - some apps require that, as far as i remember.) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
vcunat
Apr 1, 2017
Member
Well, yes, but I won't tick it until confirmed that it works well on NixOS :-)
|
Well, yes, but I won't tick it until confirmed that it works well on NixOS :-) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
toogley
Apr 1, 2017
@vcunat ah, okay. i thought you asked about the general experience on linux, not specifically on NixOS.
toogley
commented
Apr 1, 2017
•
|
@vcunat ah, okay. i thought you asked about the general experience on linux, not specifically on NixOS. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
seweu100
Apr 7, 2017
Mutter is a wayland compositor since at least late 2016. The first post should be updated.
- mutter (gnome)
+1 for the issue
seweu100
commented
Apr 7, 2017
•
|
Mutter is a wayland compositor since at least late 2016. The first post should be updated.
+1 for the issue |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
hedning
Apr 24, 2017
Contributor
For those that are wondering how to actually run gnome-shell in wayland you should be able to run it from a tty like this (kill gnome-shell before you want to switch to another tty though, or else things might hang):
export XCURSOR_PATH="~/.icons:/run/current-system/sw/share/icons"
gnome-shell --wayland
The cursor path is set in the gnome desktop-environement module, so I'm not sure if it's easy to include it in the gnome-shell wrapper, though it would be nice.
|
For those that are wondering how to actually run gnome-shell in wayland you should be able to run it from a tty like this (kill gnome-shell before you want to switch to another tty though, or else things might hang):
The cursor path is set in the gnome desktop-environement module, so I'm not sure if it's easy to include it in the gnome-shell wrapper, though it would be nice. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
samdroid-apps
Oct 10, 2017
Contributor
Hum, I tried a variation on @hedning's solution by running:
dbus-run-session gnome-shell --wayland
However, it seems to be crashing due to a network manager issue. It might be unrelated. I'll try and look into it, but maybe somebody else has had a similar issue?
sam@vcs ~> dbus-run-session gnome-shell --wayland
Activating service name='org.gtk.vfs.Daemon'
Successfully activated service 'org.gtk.vfs.Daemon'
(gnome-shell:13700): mutter-WARNING **: failed to bind to @/tmp/.X11-unix/X0: Address already in use
Window manager warning: Failed to set environment variable DISPLAY for gnome-session: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.SessionManager" does not exist
Window manager warning: Failed to set environment variable WAYLAND_DISPLAY for gnome-session: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.SessionManager" does not exist
Activating service name='org.a11y.Bus'
Successfully activated service 'org.a11y.Bus'
Gjs-Message: JS WARNING: [resource:///org/gnome/shell/ui/main.js 317]: reference to undefined property global.stage
Gjs-Message: JS WARNING: [resource:///org/gnome/shell/ui/layout.js 217]: reference to undefined property global.window_group
Gjs-Message: JS WARNING: [resource:///org/gnome/shell/ui/osdMonitorLabeler.js 59]: reference to undefined property Meta.MonitorManager
Activating service name='org.gnome.Shell.CalendarServer'
Gjs-Message: JS WARNING: [resource:///org/gnome/shell/ui/slider.js 34]: reference to undefined property St.GenericAccessible
Activating service name='org.freedesktop.Telepathy.AccountManager'
Activating service name='org.gtk.vfs.UDisks2VolumeMonitor'
Activating service name='org.gnome.evolution.dataserver.Sources5'
Successfully activated service 'org.freedesktop.Telepathy.AccountManager'
Activating service name='org.freedesktop.Telepathy.Client.Vino'
Successfully activated service 'org.gtk.vfs.UDisks2VolumeMonitor'
Activating service name='org.gtk.vfs.MTPVolumeMonitor'
Successfully activated service 'org.gtk.vfs.MTPVolumeMonitor'
Activating service name='org.gtk.vfs.GPhoto2VolumeMonitor'
Successfully activated service 'org.gtk.vfs.GPhoto2VolumeMonitor'
Gjs-Message: JS WARNING: [resource:///org/gnome/gjs/modules/tweener/tweener.js 540]: reference to undefined property properties[istr].isSpecialProperty
GNOME Shell-Message: Failed to add search provider /run/current-system/sw/share/gnome-shell/search-providers/org.gnome.Characters.search-provider.ini: TypeError: appInfo is null
GNOME Shell-Message: Failed to add search provider /run/current-system/sw/share/gnome-shell/search-providers/org.gnome.Weather.Application.search-provider.ini: TypeError: appInfo is null
Activated service 'org.freedesktop.Telepathy.Client.Vino' failed: Process org.freedesktop.Telepathy.Client.Vino exited with status 1
GNOME Shell-Message: No permission to trigger offline updates: Polkit.Error: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action org.freedesktop.packagekit.trigger-offline-update is not registered
(gnome-shell:13700): libnm-ERROR **: libnm-util symbols detected; Mixing libnm with libnm-util/libnm-glib is not supported
(EE)
Fatal server error:
(EE) failed to read Wayland events: Connection reset by peer
(EE)
|
Hum, I tried a variation on @hedning's solution by running:
However, it seems to be crashing due to a network manager issue. It might be unrelated. I'll try and look into it, but maybe somebody else has had a similar issue?
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jtojnar
Oct 10, 2017
Contributor
I found this bug but it looks like the patch is merged. Maybe a similar bug elsewhere?
|
I found this bug but it looks like the patch is merged. Maybe a similar bug elsewhere? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jtojnar
Oct 10, 2017
Contributor
The following patch was sufficient to get rid of the error and make the Wayland sessoin start:
diff --git a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix
index a694da0844d..419f7431508 100644
--- a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix
@@ -1,5 +1,5 @@
{ fetchurl, stdenv, pkgconfig, gnome3, json_glib, libcroco, intltool, libsecret
-, python3Packages, libsoup, polkit, clutter, networkmanager, docbook_xsl , docbook_xsl_ns, at_spi2_core
+, python3Packages, python3, libsoup, polkit, clutter, docbook_xsl , docbook_xsl_ns, at_spi2_core
, libstartup_notification, telepathy_glib, telepathy_logger, libXtst, p11_kit, unzip
, sqlite, libgweather, libcanberra_gtk3, librsvg, geoclue2
, libpulseaudio, libical, libtool, nss, gobjectIntrospection, gstreamer, makeWrapper
@@ -19,8 +19,8 @@ in stdenv.mkDerivation rec {
buildInputs = with gnome3;
[ gsettings_desktop_schemas gnome_keyring gnome-menus glib gcr json_glib accountsservice
libcroco intltool libsecret pkgconfig libsoup polkit libcanberra_gtk2 gdk_pixbuf
- (librsvg.override { enableIntrospection = true; })
- clutter networkmanager libstartup_notification telepathy_glib docbook_xsl docbook_xsl_ns
+ (librsvg.override { enableIntrospection = true; }) python3
+ clutter libstartup_notification telepathy_glib docbook_xsl docbook_xsl_ns
libXtst p11_kit networkmanagerapplet gjs mutter libpulseaudio caribou evolution_data_server
libical libtool nss gtk gstreamer makeWrapper gdm
libcanberra_gtk3 gnome_control_center geoclue2Of course it also disabled networking. I guess upstream bug report is in order. Edit: There is https://bugzilla.gnome.org/show_bug.cgi?id=779776
And will need to check if this, by any chance, does not also kill gnome-shell 3.26.
|
The following patch was sufficient to get rid of the error and make the Wayland sessoin start: diff --git a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix
index a694da0844d..419f7431508 100644
--- a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix
@@ -1,5 +1,5 @@
{ fetchurl, stdenv, pkgconfig, gnome3, json_glib, libcroco, intltool, libsecret
-, python3Packages, libsoup, polkit, clutter, networkmanager, docbook_xsl , docbook_xsl_ns, at_spi2_core
+, python3Packages, python3, libsoup, polkit, clutter, docbook_xsl , docbook_xsl_ns, at_spi2_core
, libstartup_notification, telepathy_glib, telepathy_logger, libXtst, p11_kit, unzip
, sqlite, libgweather, libcanberra_gtk3, librsvg, geoclue2
, libpulseaudio, libical, libtool, nss, gobjectIntrospection, gstreamer, makeWrapper
@@ -19,8 +19,8 @@ in stdenv.mkDerivation rec {
buildInputs = with gnome3;
[ gsettings_desktop_schemas gnome_keyring gnome-menus glib gcr json_glib accountsservice
libcroco intltool libsecret pkgconfig libsoup polkit libcanberra_gtk2 gdk_pixbuf
- (librsvg.override { enableIntrospection = true; })
- clutter networkmanager libstartup_notification telepathy_glib docbook_xsl docbook_xsl_ns
+ (librsvg.override { enableIntrospection = true; }) python3
+ clutter libstartup_notification telepathy_glib docbook_xsl docbook_xsl_ns
libXtst p11_kit networkmanagerapplet gjs mutter libpulseaudio caribou evolution_data_server
libical libtool nss gtk gstreamer makeWrapper gdm
libcanberra_gtk3 gnome_control_center geoclue2Of course it also disabled networking. I guess upstream bug report is in order. Edit: There is https://bugzilla.gnome.org/show_bug.cgi?id=779776 And will need to check if this, by any chance, does not also kill gnome-shell 3.26. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Same issue as @samdroid-apps on my system. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
5paceToast
Oct 27, 2017
It is my understanding that kwin_wayland is now obligatory when compiling kwin, which is reinforced by a cursory glance at its cmakelists.
We already depend on it, and I have a (seemingly) fully functional version of it (nested sessions work just fine).
It might make sense to update the original post with:
- kwin (kde)
Might make sense to experiment with configuration (or at least getting it started manually from tty).
---- update
Checked running startplasmacompositor.
While it does start up, we might need to do some work in that regard - things like dri being unable to access the card (common elsewhere too) and xprop failing to figure out what the correct display is.
5paceToast
commented
Oct 27, 2017
•
|
It is my understanding that kwin_wayland is now obligatory when compiling kwin, which is reinforced by a cursory glance at its cmakelists. It might make sense to update the original post with:
Might make sense to experiment with configuration (or at least getting it started manually from tty). ---- update |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
robinvd
Oct 27, 2017
@5paceToast What did you do to get it to work (from a tty?). All i get when running kde_wayland is a black screen with just a cursor.
robinvd
commented
Oct 27, 2017
|
@5paceToast What did you do to get it to work (from a tty?). All i get when running |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
peterhoeg
Oct 27, 2017
Member
@robinvd, have a look at #30610. I got it working from within sddm: #30610 (comment)
|
@robinvd, have a look at #30610. I got it working from within sddm: #30610 (comment) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
5paceToast
Oct 27, 2017
@robinvd kde_wayland isn't a command I'm aware of.
If you ran kwin_wayland (and got a black screen with a cursor) that's expected - kwin is just the window manager.
If you want a full plasma session, you want to run startplasmacompositor.
Consider checking kde's wiki on the subject (note: it's quite outdated (e.g it's no longer "tech-preview"), but the section you're interested in in this case is still helpful).
5paceToast
commented
Oct 27, 2017
|
@robinvd If you ran If you want a full plasma session, you want to run Consider checking kde's wiki on the subject (note: it's quite outdated (e.g it's no longer "tech-preview"), but the section you're interested in in this case is still helpful). |
timokau
referenced this issue
Oct 30, 2017
Closed
First-class Wayland support in Nixpkgs - meta/tracking issue #30753
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cmacrae
Nov 26, 2017
Contributor
I'm getting the same issue as @samdroid-apps, too:
$ dbus-run-session gnome-shell --wayland
Activating service name='org.gtk.vfs.Daemon'
Successfully activated service 'org.gtk.vfs.Daemon'
Window manager warning: Failed to set environment variable DISPLAY for gnome-session: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.SessionManager" does not exist
Window manager warning: Failed to set environment variable WAYLAND_DISPLAY for gnome-session: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.SessionManager" does not exist
Activating service name='org.a11y.Bus'
Successfully activated service 'org.a11y.Bus'
Gjs-Message: JS WARNING: [resource:///org/gnome/shell/ui/main.js 317]: reference to undefined property global.stage
Gjs-Message: JS WARNING: [resource:///org/gnome/shell/ui/layout.js 217]: reference to undefined property global.window_group
Gjs-Message: JS WARNING: [resource:///org/gnome/shell/ui/osdMonitorLabeler.js 59]: reference to undefined property Meta.MonitorManager
Activating service name='org.gnome.Shell.CalendarServer'
Gjs-Message: JS WARNING: [resource:///org/gnome/shell/ui/slider.js 34]: reference to undefined property St.GenericAccessible
Activating service name='org.freedesktop.Telepathy.AccountManager'
Activating service name='org.gtk.vfs.UDisks2VolumeMonitor'
Successfully activated service 'org.freedesktop.Telepathy.AccountManager'
Activating service name='org.freedesktop.Telepathy.Client.Vino'
Successfully activated service 'org.gtk.vfs.UDisks2VolumeMonitor'
Activating service name='org.gtk.vfs.GPhoto2VolumeMonitor'
Successfully activated service 'org.gtk.vfs.GPhoto2VolumeMonitor'
Activating service name='org.gtk.vfs.MTPVolumeMonitor'
Successfully activated service 'org.gtk.vfs.MTPVolumeMonitor'
Activating service name='org.gnome.evolution.dataserver.Sources5'
Gjs-Message: JS WARNING: [resource:///org/gnome/gjs/modules/tweener/tweener.js 540]: reference to undefined property properties[istr].isSpecialProperty
GNOME Shell-Message: Failed to add search provider /run/current-system/sw/share/gnome-shell/search-providers/org.gnome.Characters.search-provider.ini: TypeError: appInfo is null
GNOME Shell-Message: Failed to add search provider /run/current-system/sw/share/gnome-shell/search-providers/org.gnome.Weather.Application.search-provider.ini: TypeError: appInfo is null
GNOME Shell-Message: No permission to trigger offline updates: Polkit.Error: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action org.freedesktop.packagekit.trigger-offline-update is not registered
Activated service 'org.freedesktop.Telepathy.Client.Vino' failed: Process org.freedesktop.Telepathy.Client.Vino exited with status 1
(gnome-shell:2320): libnm-ERROR **: libnm-util symbols detected; Mixing libnm with libnm-util/libnm-glib is not supported
(EE)
Fatal server error:
(EE) failed to read Wayland events: Connection reset by peer
(EE)
After some very brief digging, it looks like it might be a library conflict in NetworkManager
|
I'm getting the same issue as @samdroid-apps, too:
After some very brief digging, it looks like it might be a library conflict in NetworkManager |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Ah, cheers @jtojnar |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Baughn
Dec 19, 2017
Contributor
As an anecdote, I tried following instructions here ("Run gnome-shell --wayland"), which failed because there's no /dev/dri directory and thus no KMS device.
The device does exist, as per /proc/devices, but there's no udev rule creating the device nodes -- and I'm not sure what's supposed to do so. Presumably that happens as part of the normal X infrastructure, which I've deliberately disabled. A Wayland-based system shouldn't need to be running an X window manager.
|
As an anecdote, I tried following instructions here ("Run The device does exist, as per /proc/devices, but there's no udev rule creating the device nodes -- and I'm not sure what's supposed to do so. Presumably that happens as part of the normal X infrastructure, which I've deliberately disabled. A Wayland-based system shouldn't need to be running an X window manager. |
peterhoeg
added this to General
in Wayland
Dec 21, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Baughn
Dec 23, 2017
Contributor
Allow me to retract my previous comment. After some hair-pulling, and a lot of debugging, it turned out to be a kernel issue -- to wit, the GPU driver was subtly broken on 4.9 in a way that let X fall back to pure 2D output. Wayland, of course, depends on OpenGL being available.
Some of it may still be applicable, but I'll sort that out by way of PRs instead.
|
Allow me to retract my previous comment. After some hair-pulling, and a lot of debugging, it turned out to be a kernel issue -- to wit, the GPU driver was subtly broken on 4.9 in a way that let X fall back to pure 2D output. Wayland, of course, depends on OpenGL being available. Some of it may still be applicable, but I'll sort that out by way of PRs instead. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
hedning
Feb 3, 2018
Contributor
I'm able to run Gnome Shell (3.26 in my case) on Wayland like this now:
XDG_SESSION_TYPE=wayland dbus-run-session $(nix-build --no-out-link '<nixpkgs>' -A gnome3.gnome_session)/bin/gnome-session
|
I'm able to run Gnome Shell (3.26 in my case) on Wayland like this now:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
samdroid-apps
Feb 3, 2018
Contributor
I was able to run @hedning's method. But using that method, I needed to run it inside a nix-shell with glib.dev installed; as it failed without the gsettings command in the PATH.
So my script is:
#! /usr/bin/env nix-shell
#! nix-shell -p glib.dev -i bash
XDG_SESSION_TYPE=wayland dbus-run-session $(nix-build '<nixpkgs>' -A gnome3.gnome_session)/bin/gnome-sessionI've played around with setting up a systemd unit to do it; but I can't fix environment errors relating to gsettings schemas:
systemd.services.display-manager = lib.mkForce {
description = "The worst way to run a wayland session";
# needs gsettings in path
# dbus-run-session expects other dbus binaries to be in PATH
# gnome-session needs path in path
path = with pkgs; [ glib.dev dbus bash ];
script = let
cfg = {
# default from gnome3 service
sessionPath = [ pkgs.gnome3.gnome_shell pkgs.gnome3.gnome-shell-extensions ];
};
in ''
. /etc/profile
${lib.concatMapStrings (p: ''
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
fi
if [ -d "${p}/lib/girepository-1.0" ]; then
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
fi
'') cfg.sessionPath}
# The top of this script is copied from the gnome3 service
# Set GTK_DATA_PREFIX so that GTK+ can find the themes
export GTK_DATA_PREFIX=${config.system.path}
# find theme engines
export GTK_PATH=${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0
export XDG_MENU_PREFIX=gnome-
echo $XDG_DATA_DIRS
# Let nautilus find extensions
export NAUTILUS_EXTENSION_DIR=${config.system.path}/lib/nautilus/extensions-3.0/
# Find the mouse
export XCURSOR_PATH=~/.icons:${config.system.path}/share/icons
# Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
${pkgs.xdg-user-dirs}/bin/xdg-user-dirs-update
# WAYLAND SPECIFIC CODE
export XDG_SESSION_TYPE=wayland
dbus-run-session ${pkgs.gnome3.gnome_session}/bin/gnome-session
'';
# copied from nixpkgs: https://github.com/NixOS/nixpkgs/blob/dddcd10ecce21237f8b7f8abf6acd0938bff095e/nixos/modules/services/x11/xserver.nix#L633
after = [ "systemd-udev-settle.service" "local-fs.target" "acpid.service" "systemd-logind.service" ];
wants = [ "systemd-udev-settle.service" ];
# restartIfChanged = false;
serviceConfig = {
Restart = "always";
RestartSec = "200ms";
SyslogIdentifier = "display-manager";
# Stop restarting if the display manager stops (crashes) 2 times
# in one minute. Starting X typically takes 3-4s.
StartLimitInterval = "30s";
StartLimitBurst = "3";
# TODO: put your username in here
User = "sam";
Group = "nogroup";
};
};|
I was able to run @hedning's method. But using that method, I needed to run it inside a nix-shell with So my script is: #! /usr/bin/env nix-shell
#! nix-shell -p glib.dev -i bash
XDG_SESSION_TYPE=wayland dbus-run-session $(nix-build '<nixpkgs>' -A gnome3.gnome_session)/bin/gnome-sessionI've played around with setting up a systemd unit to do it; but I can't fix environment errors relating to gsettings schemas: systemd.services.display-manager = lib.mkForce {
description = "The worst way to run a wayland session";
# needs gsettings in path
# dbus-run-session expects other dbus binaries to be in PATH
# gnome-session needs path in path
path = with pkgs; [ glib.dev dbus bash ];
script = let
cfg = {
# default from gnome3 service
sessionPath = [ pkgs.gnome3.gnome_shell pkgs.gnome3.gnome-shell-extensions ];
};
in ''
. /etc/profile
${lib.concatMapStrings (p: ''
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
fi
if [ -d "${p}/lib/girepository-1.0" ]; then
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
fi
'') cfg.sessionPath}
# The top of this script is copied from the gnome3 service
# Set GTK_DATA_PREFIX so that GTK+ can find the themes
export GTK_DATA_PREFIX=${config.system.path}
# find theme engines
export GTK_PATH=${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0
export XDG_MENU_PREFIX=gnome-
echo $XDG_DATA_DIRS
# Let nautilus find extensions
export NAUTILUS_EXTENSION_DIR=${config.system.path}/lib/nautilus/extensions-3.0/
# Find the mouse
export XCURSOR_PATH=~/.icons:${config.system.path}/share/icons
# Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
${pkgs.xdg-user-dirs}/bin/xdg-user-dirs-update
# WAYLAND SPECIFIC CODE
export XDG_SESSION_TYPE=wayland
dbus-run-session ${pkgs.gnome3.gnome_session}/bin/gnome-session
'';
# copied from nixpkgs: https://github.com/NixOS/nixpkgs/blob/dddcd10ecce21237f8b7f8abf6acd0938bff095e/nixos/modules/services/x11/xserver.nix#L633
after = [ "systemd-udev-settle.service" "local-fs.target" "acpid.service" "systemd-logind.service" ];
wants = [ "systemd-udev-settle.service" ];
# restartIfChanged = false;
serviceConfig = {
Restart = "always";
RestartSec = "200ms";
SyslogIdentifier = "display-manager";
# Stop restarting if the display manager stops (crashes) 2 times
# in one minute. Starting X typically takes 3-4s.
StartLimitInterval = "30s";
StartLimitBurst = "3";
# TODO: put your username in here
User = "sam";
Group = "nogroup";
};
}; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jtojnar
Feb 3, 2018
Contributor
I was able to run @hedning's method. But using that method, I needed to run it inside a nix-shell with
glib.devinstalled; as it failed without the gsettings command in the PATH.
Weird, gnome-session should be wrapped:
Weird, |
echo-oddly commentedNov 21, 2014
•
edited by adisbladis
Edited 2 times
-
adisbladis
edited Feb 5, 2018 (most recent)
-
vcunat
edited Apr 7, 2017
I would love to help give NixOS full support for running wayland natively. As you may know wayland is a protocol which aims to replace the antiquated X11 protocol and replace it with something more modern. I'm putting together a list of some tasks . As always, I'm biased and don't know much so any input is greatly appreciated!
xmonad(no wayland support planned upstream)What do you think? How long would it take? Where is the low hanging fruit and which tasks are most difficult? Thanks for everything and happy hacking!