No hardware acceleration on Sway 1.x betas

31 views
Skip to first unread message

Christopher Williamson

unread,
Jul 14, 2018, 8:02:52 AM7/14/18
to nix-devel
Just a quick tip if anyone gets stuck with this like I did. If anyone is using the sway betas I recommend you add the following patch for now:

--- a/sway/main.c

+++ b/sway/main.c

@@ -280,11 +280,9 @@

 

  // Security:

  unsetenv("LD_PRELOAD");

-#ifdef _LD_LIBRARY_PATH

- setenv("LD_LIBRARY_PATH", _LD_LIBRARY_PATH, 1);

-#else

- unsetenv("LD_LIBRARY_PATH");

-#endif

+

+        // NixOS:

+        setenv("LD_LIBRARY_PATH", "/run/opengl-driver/lib:/run/opengl-driver-32/lib", 1);

 

  int c;

  while (1) {


Currently the new meson build does not support  setting LD_LIBRARY_PATH as a build argument and it is automatically unset as part of a security feature of sway. As such - LD_LIBRARY_PATH is never set properly with sway betas.

The bug is at https://github.com/swaywm/sway/issues/2262 - I will submit a PR to fix this properly soon.

Hope this helps!
Reply all
Reply to author
Forward
0 new messages