-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
nixos/plasma5: make it run using systemd and wayland #117102
Conversation
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
I'm guessing that @eliasp is probably interested in this too. |
Is it not possible to fix the systemd units in the package with substitution? Also, why doesn't the substitution that CMake does on the units not work https://github.com/KDE/plasma-workspace/blob/master/ksmserver/plasma-restoresession.service.in#L8? |
807a6cb LGTM 👍 |
Review per https://nixos.org/manual/nixpkgs/stable/#reviewing-contributions-module-updatesReviewed points
Comments
|
Yes, and as pointed out in the message, I will basically undo that commit when fixing the package properly - it was just to make it easy for people to test out without having to do any (re)compiling.
We have |
What does |
I haven't tried without using systemd to manage the session, but with this PR and a single line of config, you can run a KDE wayland session:
I haven't looked at the proper way to add the session file so this is the quick and dirty. But it works. Couple of things that don't:
Otherwise it looks pretty solid. |
Giving it a spin as I write this. Works fine¹ although a lot of polishing is clearly still needed. Without the kwriteconfig5 command pipewire wasn't working at all, after running that and rebooting pipewire is fine. I have two monitors in the following arrangement:
Some problems I ran into straight away:
¹for some value of "fine" |
The service started successfully, then stopped 5 min later:
I got irritated by the "Unknown encoding" error. Note that the test system has the NixOS configuration Regarding the PR's title change, I'd like to add that I didn't enable wayland for this tests. |
First post has been updated with the current situation. You might find #100057 interesting as well. |
I currently have the following in my config: services.xserver.displayManager.sessionPackages = [
(pkgs.plasma-workspace.overrideAttrs
(old: { passthru.providedSessions = [ "plasmawayland" ]; }))
]; Still a bit hacky I guess, but it should not make any other sessions unavailable... |
@pasqui23 In that case I probably got the code from you at some point and should give you credit for it. Had it sitting around in my config for a while now and could not remember where I got it from, sorry about that. |
Edit: This only seems to happen with the proprietary Using this,
From
The above is repeated a couple of times, and then I'm returned to SDDM. However, It unbreaks if I use The above segfault lies in
|
I started trying this out today because I have a new multi-monitor setup that benefits from different scaling on each screen. Here are some problems I ran into:
Despite these flaws, I think the situation is definitely good enough that we can consider merging this pull request as long as X11 is still the default Plasma session. |
Also worth noting: The "Plasma (X11)" session works just fine with systemd, too! |
Actually, I think this is due to using systemd and not Wayland. systemd will not run our custom scripts for setting the default theme. Plasma should use the corresponding NixOS options to set the default theme instead. |
Found an interesting bit in logs, might explain why pipewire screen capturing, screenshots and fcitx5 are currently not working on my system:
|
sorry about that i had remembered that it after using |
f964055
to
90075c8
Compare
To whoever is tracking this - Plasma with Wayland works wonderfully here with latest unstable and this PR applied. There are a few minor glitches (those are upstream issues) as well as a few non-KDE applications not behaving properly but that's neither our nor KDE's fault. I really want to get this cleaned up properly and submitted for 21.11. |
Agreed. I've been using Plasma Wayland for months now, without any glaring
issues. Since we are keeping X11 as default, I don't see a blocker to get
this merged.
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Tried this today and so far so good - Wayland session has appeared and it's been working for the last several hours. How to make it happen into 21.11? Whom do we need to ping to review? P.S. If you are new to Nix and want to try the fix, here are the instructions: https://discourse.nixos.org/t/how-to-try-a-pr/15410/6?u=haizaar |
904a34b
to
5941db1
Compare
It's been rebased - I'd like to do a final test when #100057 hits unstable and then go ahead and get this merged. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/kde-plasma-wayland-still-does-not-behave-correctly/15526/2 |
5941db1
to
d278d8c
Compare
Looks like we're good to go. Any thoughts on making the "run with systemd" default to true? |
I vote yes. |
@CertainLach is there anything in your powers to get it approved/merged? (apologies if I'm pinging a wrong person) |
Yes, default to true. In fact, I would not mind if it is the only option, as it is only a implementation detail after all |
I'll go ahead and merge this. The "systemd by default" shouldn't be too controversial, but we can always flick that switch. |
Motivation for this change
With
nixos-unstable
as of 2021-03-29, in order to activate the "run with systemd mode", you can either:kwriteconfig5 --file startkderc --group General --key systemdBoot true
configuration.nix
(when using this PR):If you want to try out wayland, you need to make the wayland session file available to sddm:
The nicer way:
Alternatively, override the path to the wayland sessions directory for sddm. This will make all other wayland sessions unavailable:
Please note that you probably want to run the session with systemd if you're trying out the wayland variant.
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)