NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.37k stars 13.6k forks source link

Multimonitor on wayland CRASHES (Nvidia/PRIME) #331013

Open SpiderUnderUrBed opened 1 month ago

SpiderUnderUrBed commented 1 month ago

Describe the bug

A clear and concise description of what the bug is. Nixos unstable on wayland doesnt work, nor does it work on X but i assume its because of ongoing efforts to remove X that something became deprecated then unusable. The issue is that you can see the compositor (wayland) keeps on trying to establish a connection to the monitor with the video linked in this issue but it fails multiple times (like flickering), then after awhile it restarts into sddm. This issue is on KDE and Gnome and i assume this is a issue with nixos and wayland, mainly on the nixos side as i have not seen reports about this issue on other distros.

Note: this could be related to an issue with optimus and how it reacts with wayland, but i think this is still Nixos's domain as something might have been wrongly packaged

https://imgur.com/a/EY3A8r7

Steps To Reproduce

Steps to reproduce the behavior:

  1. Be on the unstable branch
  2. (optional? this might be related, try nixos with a computer with optimus and possibly with nvidia)
  3. Try kde plasma on wayland with another monitor connected

Expected behavior

A clear and concise description of what you expected to happen.

The monitor should connect to the laptop without trying and failing the connection over and over again and eventually crashing and going back to sddm. On wayland.

Screenshots

If applicable, add screenshots to help explain your problem. https://imgur.com/a/EY3A8r7

I already send the link:

Additional context

Add any other context about the problem here.

I made reports about this before: https://www.reddit.com/r/linuxquestions/comments/1dr4q1u/wayland_and_multimonitor_not_working_on_nixos/ https://www.reddit.com/r/NixOS/comments/1dg1p4i/multimonitor_on_nixos_and_nvidia_broken_anyone/ https://www.reddit.com/r/linuxquestions/comments/1dilqzk/multimonitor_on_kde_and_nvidia_broken/ https://bugs.kde.org/show_bug.cgi?id=489592

The issue might have changed over the time i used nixos but its still there regardless.

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.10.1, NixOS, 24.11 (Vicuna), 24.11.20240727.b73c222`
 - multi-user?: `yes`
 - sandbox: `yes`
warning: unknown setting 'access-token'
 - version: `nix-env (Nix) 2.18.5`
warning: unknown setting 'access-token'
 - channels(root): `"nix-ld, nixos-21.11"`
 - nixpkgs: `/nix/store/qxf6anli54ij0q1sdlnlgx9hyl658a4v-source`

Add a :+1: reaction to issues you find important.

SpiderUnderUrBed commented 1 month ago

Turns out this is when i enabled PRIME sync, I enabled prime sync because it did not work beforehand but I have a few slew of issues like wayland doesn't work either way, plasma x11 does not work so I have to use gnome. This should still be treated as a bug for those reasons plus PRIME sync should not have these adverse effects, I may have showed a image of what happens when I try plasma x11 without sync in one of the linked references but ill re-iterate: image

Also some of the other bugs I mentioned in the links are worth investigating. I will re-try prime offloading and other prime modifications and document this issue.

SpiderUnderUrBed commented 3 weeks ago

This issue has been solved, I will close this issue, I haven't tested x11 or gnome, but ill update this issue (maybe) when I do, also this is the version I'm on now: Linux 6.8.12, NixOS, 24.11 (Vicuna), 24.11.20240818.8a33541 If anyone know what happened and where the patch happened I hope you can comment to this issue.

SpiderUnderUrBed commented 2 weeks ago

This issue is still present, I just had a one off where wayland suddenly worked, anyways here are some log files if this helps: Systemctl status: https://pastebin.com/tMMDs2jA Journalctl: https://pastebin.com/APq2ZcPv