Skip to content

hyprland: 0.39.1 -> 0.40.0; hyprwayland-scanner: init at 0.3.4#309075

Merged
Aleksanaa merged 2 commits intoNixOS:masterfrom
fufexan:hyprland
May 18, 2024
Merged

hyprland: 0.39.1 -> 0.40.0; hyprwayland-scanner: init at 0.3.4#309075
Aleksanaa merged 2 commits intoNixOS:masterfrom
fufexan:hyprland

Conversation

@fufexan
Copy link
Contributor

@fufexan fufexan commented May 4, 2024

Description of changes

  • hyprwayland-scanner: init at 0.3.4 - needed for Hyprland
  • hyprland: 0.39.1 -> 0.40.0 - CHANGELOG

Blocked until #306557 lands in master. Tracking https://nixpk.gs/pr-tracker.html?pr=306557.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label May 4, 2024
@ofborg ofborg bot requested a review from wozeparrot May 4, 2024 17:51
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels May 4, 2024
@fufexan fufexan mentioned this pull request May 5, 2024
13 tasks
@JohnRTitor
Copy link
Member

JohnRTitor commented May 5, 2024

This will break other programs that listen to sockets, most notably, Waybar. I'd have to backport the patches if needed. Unless there is a new release of Waybar before this PR is merged Alexays/Waybar#3212

@JohnRTitor JohnRTitor mentioned this pull request May 6, 2024
13 tasks
@Flakebi
Copy link
Member

Flakebi commented May 7, 2024

Looks like swaylock and hyprlock are broken on 0.40.0, so probably makes sense to include the fix: hyprwm/Hyprland#5913

@hakan-demirli
Copy link
Member

@fufexan It landed.
image

@fufexan
Copy link
Contributor Author

fufexan commented May 13, 2024

Everything's almost working. There's one last thing left to solve.

When building, CMake complains about missing XWayland include paths:

hyprland> CMake Error in CMakeLists.txt:
hyprland>   Imported target "PkgConfig::xdeps" includes non-existent path
hyprland>     "/nix/store/7q83znq247cfc65h3zzq6l82z8dr9d56-xwayland-23.2.6/include"
hyprland>   in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:
hyprland>   * The path was deleted, renamed, or moved to another location.
hyprland>   * An install or uninstall procedure did not complete successfully.
hyprland>   * The installation package was faulty and references files it does not
hyprland>   provide.

Checking the out dir of xwayland, it seems there isn't any include dir, even though it's referenced by its pkg-config file.
Upstream, we fixed this by using an override.

Ideally, this should be fixed in xwayland upstream. I've tested the latest tag, 24.0.99.902, but it still references the non-existent path. Pinging @Emantor.

Alternatively, we could solve the problem if we could remove the path from INTERFACE_INCLUDE_DIRECTORIES.

@Emantor
Copy link
Member

Emantor commented May 14, 2024

I have a fix for the upstream xwayland meson pkgconfig generation, will pull this in once its merged.

Edit: upstream MR: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1543

@Aleksanaa
Copy link
Member

So we currently need to wait for this PR to be merged upstream, a new version is released upstream, and nixpkgs updates xwayland before we can continue this PR?

@Emantor
Copy link
Member

Emantor commented May 15, 2024

So we currently need to wait for this PR to be merged upstream, a new version is released upstream, and nixpkgs updates xwayland before we can continue this PR?

My plan is to get this merged and than fetchpatch it into nixpkgs. If I read Olivier correctly we can than remove the patch with the 24.x release.

@Aleksanaa
Copy link
Member

Merging should not be needed, just use https://gitlab.freedesktop.org/xorg/xserver/-/commit/5acdc7b6bdb0722e7afd276f3ae538b6195f0baa.patch and https://gitlab.freedesktop.org/xorg/xserver/-/commit/814dd61c1b46a8a0c4a76587dd786819180f6976.patch?

@Emantor
Copy link
Member

Emantor commented May 15, 2024

Merging should not be needed, just use https://gitlab.freedesktop.org/xorg/xserver/-/commit/5acdc7b6bdb0722e7afd276f3ae538b6195f0baa.patch and https://gitlab.freedesktop.org/xorg/xserver/-/commit/814dd61c1b46a8a0c4a76587dd786819180f6976.patch?

The first commit is enough for the backport. My assumption was that this PR is still "Draft" and there is no need to fix this right now, but it appears that this is still a draft PR since Xwayland needs fixing first. #311886

@Emantor
Copy link
Member

Emantor commented May 15, 2024

#311966 which includes the 24.1.0 bump has been merged.

@Aleksanaa
Copy link
Member

Please be quick. The current input focus issue almost caused me to send my login password to the NixOS group today 🫠

@fufexan fufexan marked this pull request as ready for review May 16, 2024 21:25
Copy link
Member

@Aleksanaa Aleksanaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay so I've tested in a quick way:

nix build github:fufexan/nixpkgs/hyprland#hyprland
ln -s $(realpath ./result) /tmp/hyprland-tmp-1

And then logout and change login command in greetd into /tmp/hyprland-tmp-1/bin/hyprland, and yeah it works (However, I observed that the output settings of kanshi and hyprland seemed to have a race, but the race with swww is solved, and input issue is gone too)

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label May 17, 2024
@Septias
Copy link

Septias commented May 17, 2024

lets gooo

@Aleksanaa Aleksanaa merged commit 951f6c8 into NixOS:master May 18, 2024
@wuyoli
Copy link
Contributor

wuyoli commented May 21, 2024

This crashes my hyprland when using it with nouveau and moving my cursor to the top of the screen.
Additionally this creates a mismatch between a cursor and its hotspots (hyprwm/Hyprland#6117)

here the logs from one of the crashes:

May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: .Hyprland-wrapp[13615]: fail ttm_validate
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: .Hyprland-wrapp[13615]: validating bo list
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: .Hyprland-wrapp[13615]: validate: -22
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: .Hyprland-wrapp[13615]: fail ttm_validate
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: .Hyprland-wrapp[13615]: validating bo list
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: .Hyprland-wrapp[13615]: validate: -22
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: fifo: fault 00 [READ] at 000000000f286000 engine 00 [GR] client 01 [GPC0/T1_0] reason 02 [PTE]>
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: fifo:000000:0004:[.Hyprland-wrapp[13615]] rc scheduled
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: fifo:000000: rc scheduled
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: gr: TRAP ch 4 [007fa10000 .Hyprland-wrapp[13615]]
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: gr: GPC0/TPC0/TEX: 80000049
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: gr: GPC0/TPC1/TEX: 80000049
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: gr: GPC1/TPC0/TEX: 80000049
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: fifo:000000:0004:0004:[.Hyprland-wrapp[13615]] errored - disabling channel
May 21 18:35:14 gravitas kernel: nouveau 0000:01:00.0: .Hyprland-wrapp[13615]: channel 4 killed!
May 21 18:35:14 gravitas systemd[1]: Started Process Core Dump (PID 18160/UID 0).

@fufexan
Copy link
Contributor Author

fufexan commented May 21, 2024

I can update hyprland again when there's a fix. Until then, either use an older nixpkgs, or use the flake package.

@SuperSandro2000
Copy link
Member

Not an ideal situation just a few days before the branch off.

@fufexan
Copy link
Contributor Author

fufexan commented May 21, 2024

@wuyoli I've downgraded hyprland by a few commits, can you test whether it's all working?
fufexan@7c60f01
If this works alright I'll open another PR downgrading hyprland and hyprwayland-scanner, so that we can get them working right before the branch off.

@gvolpe
Copy link
Member

gvolpe commented May 21, 2024

so that we can get them working right before the branch off

Can anyone shed some light on what this is about? 😄


Also, since I'm here, I just want to thank everyone involved in this! 🙏🏽

I haven't experienced any issues so far with Hyprlock, Hypridle and Pyprland scratchpads 👍🏽

@fufexan
Copy link
Contributor Author

fufexan commented May 21, 2024

Can anyone shed some light on what this is about? 😄

NixOS 24.05 will be released soon. See more about the process here.

@wuyoli
Copy link
Contributor

wuyoli commented May 21, 2024

@fufexan I cherry-picked your commit fufexan@7c60f01 . this didn't work, but with 7185b47 everything worked again.

@fufexan
Copy link
Contributor Author

fufexan commented May 21, 2024

Great, I'll make a quick PR then.

@fufexan
Copy link
Contributor Author

fufexan commented May 21, 2024

Also, @wuyoli do screen lockers work fine? I just remembered about Flakebi's comment.

@wuyoli
Copy link
Contributor

wuyoli commented May 21, 2024

Sorry, it just crashed again, this time it wasn't obviously in connection to some action i did.

May 22 00:14:44 gravitas kernel: nouveau 0000:01:00.0: fifo: SCHED_ERROR 0a [CTXSW_TIMEOUT]
May 22 00:14:44 gravitas kernel: nouveau 0000:01:00.0: fifo:000000:0003:[.Hyprland-wrapp[6875]] rc scheduled
May 22 00:14:44 gravitas kernel: nouveau 0000:01:00.0: fifo:000000: rc scheduled
May 22 00:14:44 gravitas kernel: nouveau 0000:01:00.0: fifo:000000:0003:0003:[.Hyprland-wrapp[6875]] errored - disabling channel
May 22 00:14:44 gravitas kernel: nouveau 0000:01:00.0: .Hyprland-wrapp[6875]: channel 3 killed!
May 22 00:14:44 gravitas systemd[1]: Started Process Core Dump (PID 8056/UID 0).

The issue with the cursor hotspot is fixed though.

@wuyoli
Copy link
Contributor

wuyoli commented May 21, 2024

do screen lockers work fine?

no very much not. hyprland crashes instantly (I'm using swaylock)
(sorry I missed this comment previously)

@SuperSandro2000
Copy link
Member

The issue with the cursor hotspot is fixed though.

That's at least something. The crash could also be related to some kernel, nouveau, some driver or maybe also xwayland but that the cursor is so much off for high DPI is good to be fixed for 24.05.

Icenowy pushed a commit to AOSC-Tracking/xserver that referenced this pull request Jul 27, 2024
Before this change, the xwayland pkgconfig file will always contain an
includedir directive, even though xwayland is not a linkable shared
library:

  prefix=/nix/store/3spcjqp5zcyg8arz6dnsj59fal5yk3jy-xwayland-23.2.6
  includedir=${prefix}/include

  exec_prefix=${prefix}
  xwayland=/nix/store/3spcjqp5zcyg8arz6dnsj59fal5yk3jy-xwayland-23.2.6/bin/Xwayland
  […]
  Cflags: -I${includedir}

According to a bug reporter this trips up cmake [1], which expects that
the include directory exists, which it does not since xwayland does not
install any header files.

Add the dataonly directive to pkgsconfig.generate() which will remove
the default "." subdir and ensures that includedir is not set inside the
pkgconfig file. Additionally enforce the install directory to
$libdir/pkgconfig, since it otherwise will be installed to
$datadir/pkgconfig, which precludes programs from finding the pkgconfig
because share/pkgconfig is usually not included in the search path.

The resulting pkgconfig does not contain an includedir:

  prefix=/nix/store/p7xhdzl65hfhzf36vxykzp2i9cyy7y6c-xwayland-23.2.6

  exec_prefix=${prefix}
  xwayland=/nix/store/p7xhdzl65hfhzf36vxykzp2i9cyy7y6c-xwayland-23.2.6/bin/Xwayland
  have_glamor=true
  have_eglstream=true
  have_initfd=true
  have_listenfd=true
  have_verbose=true
  have_terminate_delay=true
  have_no_touch_pointer_emulation=true
  have_force_xrandr_emulation=true
  have_geometry=true
  have_fullscreen=true
  have_host_grab=true
  have_decorate=false
  have_enable_ei_portal=true
  have_byteswappedclients=true

  Name: Xwayland
  Description: X Server for Wayland
  Version: 23.2.6

[1]: NixOS/nixpkgs#309075 (comment)

Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit 9df084c)

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1569>
notbabaisyou pushed a commit to SpaghettiFork/Spaghetti that referenced this pull request Jun 25, 2025
Before this change, the xwayland pkgconfig file will always contain an
includedir directive, even though xwayland is not a linkable shared
library:

  prefix=/nix/store/3spcjqp5zcyg8arz6dnsj59fal5yk3jy-xwayland-23.2.6
  includedir=${prefix}/include

  exec_prefix=${prefix}
  xwayland=/nix/store/3spcjqp5zcyg8arz6dnsj59fal5yk3jy-xwayland-23.2.6/bin/Xwayland
  […]
  Cflags: -I${includedir}

According to a bug reporter this trips up cmake [1], which expects that
the include directory exists, which it does not since xwayland does not
install any header files.

Add the dataonly directive to pkgsconfig.generate() which will remove
the default "." subdir and ensures that includedir is not set inside the
pkgconfig file. Additionally enforce the install directory to
$libdir/pkgconfig, since it otherwise will be installed to
$datadir/pkgconfig, which precludes programs from finding the pkgconfig
because share/pkgconfig is usually not included in the search path.

The resulting pkgconfig does not contain an includedir:

  prefix=/nix/store/p7xhdzl65hfhzf36vxykzp2i9cyy7y6c-xwayland-23.2.6

  exec_prefix=${prefix}
  xwayland=/nix/store/p7xhdzl65hfhzf36vxykzp2i9cyy7y6c-xwayland-23.2.6/bin/Xwayland
  have_glamor=true
  have_eglstream=true
  have_initfd=true
  have_listenfd=true
  have_verbose=true
  have_terminate_delay=true
  have_no_touch_pointer_emulation=true
  have_force_xrandr_emulation=true
  have_geometry=true
  have_fullscreen=true
  have_host_grab=true
  have_decorate=false
  have_enable_ei_portal=true
  have_byteswappedclients=true

  Name: Xwayland
  Description: X Server for Wayland
  Version: 23.2.6

[1]: NixOS/nixpkgs#309075 (comment)

Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1543>
externalmirrors-syncer bot pushed a commit to external-mirrors/xorg-xserver that referenced this pull request Feb 14, 2026
Before this change, the xwayland pkgconfig file will always contain an
includedir directive, even though xwayland is not a linkable shared
library:

  prefix=/nix/store/3spcjqp5zcyg8arz6dnsj59fal5yk3jy-xwayland-23.2.6
  includedir=${prefix}/include

  exec_prefix=${prefix}
  xwayland=/nix/store/3spcjqp5zcyg8arz6dnsj59fal5yk3jy-xwayland-23.2.6/bin/Xwayland
  […]
  Cflags: -I${includedir}

According to a bug reporter this trips up cmake [1], which expects that
the include directory exists, which it does not since xwayland does not
install any header files.

Add the dataonly directive to pkgsconfig.generate() which will remove
the default "." subdir and ensures that includedir is not set inside the
pkgconfig file. Additionally enforce the install directory to
$libdir/pkgconfig, since it otherwise will be installed to
$datadir/pkgconfig, which precludes programs from finding the pkgconfig
because share/pkgconfig is usually not included in the search path.

The resulting pkgconfig does not contain an includedir:

  prefix=/nix/store/p7xhdzl65hfhzf36vxykzp2i9cyy7y6c-xwayland-23.2.6

  exec_prefix=${prefix}
  xwayland=/nix/store/p7xhdzl65hfhzf36vxykzp2i9cyy7y6c-xwayland-23.2.6/bin/Xwayland
  have_glamor=true
  have_eglstream=true
  have_initfd=true
  have_listenfd=true
  have_verbose=true
  have_terminate_delay=true
  have_no_touch_pointer_emulation=true
  have_force_xrandr_emulation=true
  have_geometry=true
  have_fullscreen=true
  have_host_grab=true
  have_decorate=false
  have_enable_ei_portal=true
  have_byteswappedclients=true

  Name: Xwayland
  Description: X Server for Wayland
  Version: 23.2.6

[1]: NixOS/nixpkgs#309075 (comment)

Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1543>
(cherry picked from commit 9df084c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.