Package Details: wlroots-nvidia 0.17.4-1

Git Clone URL: https://aur.archlinux.org/wlroots-nvidia.git (read-only, click to copy)
Package Base: wlroots-nvidia
Description: Modular Wayland compositor library, with fix for nvidia flickering
Upstream URL: https://gitlab.freedesktop.org/wlroots/wlroots
Licenses: MIT
Conflicts: wlroots, wlroots-git
Provides: libwlroots.so, wlroots
Submitter: kplant
Maintainer: kplant
Last Packager: kplant
Votes: 6
Popularity: 0.061885
First Submitted: 2022-08-20 15:26 (UTC)
Last Updated: 2024-06-29 17:47 (UTC)

Dependencies (23)

Required by (56)

Sources (3)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

raku-cat commented on 2024-06-25 10:02 (UTC) (edited on 2024-06-25 10:04 (UTC) by raku-cat)

@chrisco23 The easiest way would be to manually build the package rather than an aur helper.
Clone the aur repo somewhere:
git clone ssh://aur@aur.archlinux.org/wlroots-nvidia.git && cd wlroots-nvidia
Add the contents of the below patch to a file named whatever you want (using libliftoff-fix.patch in the following example), and then edit the PKGBUILD to include this patch.
Edit the source section like so:

source=(
    "$wl_pkgname-$pkgver.tar.gz::https://gitlab.freedesktop.org/wlroots/wlroots/-/releases/$pkgver/downloads/wlroots-$pkgver.tar.gz"
    "https://gitlab.freedesktop.org/wlroots/wlroots/-/releases/$pkgver/downloads/wlroots-$pkgver.tar.gz.sig"
    "wlroots-nvidia-screenshare.patch"
    "libliftoff-fix.patch"
)

Add the patch below the existing one in prepare():

prepare() {
    patch --directory="$wl_pkgname-$pkgver" --forward --strip=0 \
        --input="$srcdir/wlroots-nvidia-screenshare.patch"
    patch --directory="$wl_pkgname-$pkgver" --forward --strip=0 \
        --input="$srcdir/libliftoff-fix.patch"
}

Run updpkgsums to update the checksums in the PKGBUILD, then build and install with makepkg -i.

chrisco23 commented on 2024-06-24 01:58 (UTC) (edited on 2024-06-24 02:28 (UTC) by chrisco23)

@raku-cat oops had posted wrong filename. Can you please give me a little more detail? I've never tried to patch an AUR package. In fact I can't remember the last time I even used "patch". Years and years. Getting old/no memory.

if it matters I'm using sway and yay.

raku-cat commented on 2024-06-17 06:36 (UTC)

Was getting the same error as @chrisco23 compiling wlroots, adapted the patch mentioned here: https://bugs.gentoo.org/933460#c5 which allowed it to compile:

--- backend/drm/libliftoff.c    2024-04-26 13:32:52.000000000 -0500
+++ backend/drm/libliftoff.c    2024-06-16 20:40:31.124834546 -0500
@@ -7,6 +7,7 @@

 #include "backend/drm/drm.h"
 #include "backend/drm/iface.h"
+#include "config.h"

 static bool init(struct wlr_drm_backend *drm) {
    // TODO: lower log level
@@ -436,7 +437,11 @@
        goto out;
    }

-   int ret = liftoff_output_apply(crtc->liftoff, req, flags);
+#if HAVE_LIBLIFTOFF_0_5
+   int ret = liftoff_output_apply(crtc->liftoff, req, flags, NULL);
+#else
+    int ret = liftoff_output_apply(crtc->liftoff, req, flags);
+#endif
    if (ret != 0) {
        wlr_drm_conn_log(conn, test_only ? WLR_DEBUG : WLR_ERROR,
            "liftoff_output_apply failed: %s", strerror(-ret));
--- backend/drm/meson.build 2024-04-26 13:32:52.000000000 -0500
+++ backend/drm/meson.build 2024-06-16 20:41:20.699571207 -0500
@@ -47,6 +47,7 @@

 if libliftoff.found()
    wlr_files += files('libliftoff.c')
+   internal_config.set10('HAVE_LIBLIFTOFF_0_5', libliftoff.version().version_compare('>=0.5.0'))
 endif

 features += { 'drm-backend': true }

chrisco23 commented on 2024-06-08 21:25 (UTC)

I cannot update to this latest.

../wlroots-0.17.3/backend/drm/libliftoff.c: In function ‘crtc_commit’:
../wlroots-0.17.3/backend/drm/libliftoff.c:439:19: error: too few arguments to function ‘liftoff_output_apply’
  439 |         int ret = liftoff_output_apply(crtc->liftoff, req, flags);
      |                   ^~~~~~~~~~~~~~~~~~~~
In file included from ../wlroots-0.17.3/backend/drm/libliftoff.c:3:
/usr/include/libliftoff.h:85:1: note: declared here
   85 | liftoff_output_apply(struct liftoff_output *output, drmModeAtomicReq *req,
      | ^~~~~~~~~~~~~~~~~~~~
[214/350] Compiling C object libwlroots.so.12.p/backend_wayland_output.c.o
ninja: build stopped: subcommand failed.

teamgeist commented on 2024-03-22 09:54 (UTC)

I also experience flickering on the external monitor, no matter what renderer I set. The only way to solve it for me is downgrading sway and using wlroots0.16-nvidia. I am also using the proprietary nvidia drivers though.

asklow commented on 2024-03-11 02:20 (UTC) (edited on 2024-03-11 02:22 (UTC) by asklow)

Strange. Then it's probably my setup issue. I'll try to purge pkgcache, orphaned files & try again.

Oh mine's 1660Super. I'm using nvidia-dkms (which is proprietary). Need to be on dkms caz I use zen kernel.

kplant commented on 2024-03-11 02:19 (UTC)

@asklow which card are you using? I've tried both a 2080 ti and 4090.

Though I've only tried the "nvidia-open" package and not "nvidia".

kplant commented on 2024-03-11 02:18 (UTC)

Yeah sure. I removed sway, wlroots-nvidia, and wlroots0.16 to be paranoid.

Installed sway, then wlroots-nvidia which removed wlroots. Restarted everything and do not have any issues.

I've tried both explicitly setting WLR_RENDERER="gles2" and not setting that environment variable, both yield the same result of no artifacting.

asklow commented on 2024-03-11 01:50 (UTC) (edited on 2024-03-11 01:57 (UTC) by asklow)

Yup. Simon thrown away the issue like it's NVIDIA bug.

Well, as you explained this introduces a blocking call which waits for GPU operations to complete. This is very much a performance regression. There is no reason why this should be necessary, glFlush introduces a synchronization barrier, which is supposed to be waited on by the buffer consumer via implicit synchronization. NACK, sorry, this is a NVIDIA bug.

I still don't understand why this package still ain't working for me. Have reinstalled the whole sway stack many times. Can you once test it by reinstall on your side ?

kplant commented on 2024-03-11 01:00 (UTC)

@asklow not sure, my PR was rejected before I ever made this patch.

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3671