Skip to content
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

Crash if no background is set from tty #8348

Open
Aadniz opened this issue Sep 16, 2024 · 4 comments
Open

Crash if no background is set from tty #8348

Aadniz opened this issue Sep 16, 2024 · 4 comments
Labels
bug Not working as intended

Comments

@Aadniz
Copy link

Aadniz commented Sep 16, 2024

Please fill out the following:

Kali Linux gave no output, below is the output from NixOS. Do let me know if I did this correctly or not.

(gdb) bt full
#0  0x0000000000439100 in queue_output_config ()
No symbol table info available.
#1  0x0000000000439c1d in apply_output_config ()
No symbol table info available.
#2  0x0000000000422ca8 in handle_new_output ()
No symbol table info available.
#3  0x00007f390def8a0c in wl_signal_emit_mutable () from /nix/store/m9rnwifkvpbxj48x7q6iwg6yjf9d6slw-wayland-1.22.0/lib/libwayland-server.so.0
No symbol table info available.
#4  0x00007f390def8a0c in wl_signal_emit_mutable () from /nix/store/m9rnwifkvpbxj48x7q6iwg6yjf9d6slw-wayland-1.22.0/lib/libwayland-server.so.0
No symbol table info available.
#5  0x00007f390de25dc3 in scan_drm_connectors () from /nix/store/bakgf35lb0bvqfy6221nyy2jd9q056zy-wlroots-0.17.3/lib/libwlroots.so.12
No symbol table info available.
#6  0x00007f390de222c3 in backend_start () from /nix/store/bakgf35lb0bvqfy6221nyy2jd9q056zy-wlroots-0.17.3/lib/libwlroots.so.12
No symbol table info available.
#7  0x00007f390de30be5 in multi_backend_start () from /nix/store/bakgf35lb0bvqfy6221nyy2jd9q056zy-wlroots-0.17.3/lib/libwlroots.so.12
No symbol table info available.
#8  0x000000000041e488 in server_start ()
No symbol table info available.
#9  0x0000000000411fea in main ()
No symbol table info available.
  • Description:
  1. Fresh install of Kali Linux (what I used)
  2. sudo apt install sway
  3. mkdir ~/.config/sway
  4. sudo cp /etc/sway/config ~/.config/sway/config
  5. Edit the config, comment out the line output * bg /run/current-system/sw/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
  6. Enter tty
  7. Execute sway

Issue also appear on NixOS

@Aadniz Aadniz added the bug Not working as intended label Sep 16, 2024
@Nefsen402
Copy link
Member

The output commit logic has since been rewritten on master. Please see if master fixes the issue. 1.9 is unlikely to get a bugfix release.

wkral added a commit to wkral/home-nix that referenced this issue Sep 19, 2024
@Aadniz
Copy link
Author

Aadniz commented Sep 29, 2024

Testing this now, having a bit trouble compiling from source. This machine has an intel CPU.

$ ninja -C build/                                                                 
ninja: Entering directory `build/'
[112/687] Compiling C object subprojects/libdrm/intel/libdrm_intel.so.1.123.0.p/intel_bufmgr.c.o
FAILED: subprojects/libdrm/intel/libdrm_intel.so.1.123.0.p/intel_bufmgr.c.o 
cc -Isubprojects/libdrm/intel/libdrm_intel.so.1.123.0.p -Isubprojects/libdrm/intel -I../subprojects/libdrm/intel -Isubprojects/libdrm -I../subprojects/libdrm -I../subprojects/libdrm/include/drm -fvisibility=hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O0 -g -include /home/chiya/Downloads/sway/build/subprojects/libdrm/config.h -fPIC -pthread -Wsign-compare -Werror=undef -Werror=implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing=2 -Winit-self -Winline -Wshadow -Wdeclaration-after-statement -Wold-style-definition -Wno-unused-parameter -Wno-attributes -Wno-long-long -Wno-missing-field-initializers -MD -MQ subprojects/libdrm/intel/libdrm_intel.so.1.123.0.p/intel_bufmgr.c.o -MF subprojects/libdrm/intel/libdrm_intel.so.1.123.0.p/intel_bufmgr.c.o.d -o subprojects/libdrm/intel/libdrm_intel.so.1.123.0.p/intel_bufmgr.c.o -c ../subprojects/libdrm/intel/intel_bufmgr.c
In file included from ../subprojects/libdrm/intel/intel_bufmgr.c:34:
../subprojects/libdrm/include/drm/i915_drm.h:2233:1: error: packed attribute is unnecessary for ‘i915_context_engines_load_balance’ [-Werror=packed]
 2233 | } __attribute__((packed));
      | ^
../subprojects/libdrm/include/drm/i915_drm.h:2271:1: error: packed attribute is unnecessary for ‘i915_context_engines_bond’ [-Werror=packed]
 2271 | } __attribute__((packed));
      | ^
../subprojects/libdrm/include/drm/i915_drm.h:2399:1: error: packed attribute is unnecessary for ‘i915_context_engines_parallel_submit’ [-Werror=packed]
 2399 | } __attribute__((packed));
      | ^
../subprojects/libdrm/include/drm/i915_drm.h:2473:1: error: packed attribute is unnecessary for ‘i915_context_param_engines’ [-Werror=packed]
 2473 | } __attribute__((packed));
      | ^
cc1: all warnings being treated as errors
[117/687] Compiling C object subprojects/libdrm/intel/libdrm_intel.so.1.123.0.p/intel_bufmgr_fake.c.o
FAILED: subprojects/libdrm/intel/libdrm_intel.so.1.123.0.p/intel_bufmgr_fake.c.o 
cc -Isubprojects/libdrm/intel/libdrm_intel.so.1.123.0.p -Isubprojects/libdrm/intel -I../subprojects/libdrm/intel -Isubprojects/libdrm -I../subprojects/libdrm -I../subprojects/libdrm/include/drm -fvisibility=hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O0 -g -include /home/chiya/Downloads/sway/build/subprojects/libdrm/config.h -fPIC -pthread -Wsign-compare -Werror=undef -Werror=implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing=2 -Winit-self -Winline -Wshadow -Wdeclaration-after-statement -Wold-style-definition -Wno-unused-parameter -Wno-attributes -Wno-long-long -Wno-missing-field-initializers -MD -MQ subprojects/libdrm/intel/libdrm_intel.so.1.123.0.p/intel_bufmgr_fake.c.o -MF subprojects/libdrm/intel/libdrm_intel.so.1.123.0.p/intel_bufmgr_fake.c.o.d -o subprojects/libdrm/intel/libdrm_intel.so.1.123.0.p/intel_bufmgr_fake.c.o -c ../subprojects/libdrm/intel/intel_bufmgr_fake.c
In file included from ../subprojects/libdrm/intel/intel_bufmgr_fake.c:47:
../subprojects/libdrm/include/drm/i915_drm.h:2233:1: error: packed attribute is unnecessary for ‘i915_context_engines_load_balance’ [-Werror=packed]
 2233 | } __attribute__((packed));
      | ^
../subprojects/libdrm/include/drm/i915_drm.h:2271:1: error: packed attribute is unnecessary for ‘i915_context_engines_bond’ [-Werror=packed]
 2271 | } __attribute__((packed));
      | ^
../subprojects/libdrm/include/drm/i915_drm.h:2399:1: error: packed attribute is unnecessary for ‘i915_context_engines_parallel_submit’ [-Werror=packed]
 2399 | } __attribute__((packed));
      | ^
../subprojects/libdrm/include/drm/i915_drm.h:2473:1: error: packed attribute is unnecessary for ‘i915_context_param_engines’ [-Werror=packed]
 2473 | } __attribute__((packed));
      | ^
../subprojects/libdrm/intel/intel_bufmgr_fake.c: In function ‘alloc_block’:
../subprojects/libdrm/intel/intel_bufmgr_fake.c:424:61: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  424 |         struct block *block = (struct block *)calloc(sizeof *block, 1);
      |                                                             ^
../subprojects/libdrm/intel/intel_bufmgr_fake.c:424:61: note: earlier argument should specify number of elements, later size of each element
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.

Followed steps here for Debian: https://github.com/swaywm/sway/wiki/Development-Setup

@sahinf
Copy link
Contributor

sahinf commented Oct 4, 2024

Weird those warnings should not be treated as errors

0$ for i in {0..9}; do git show HEAD~$i:meson.build | rg Werror; done
  '-Wsign-compare', '-Werror=undef', '-Werror=implicit-function-declaration',
  '-Wsign-compare', '-Werror=undef', '-Werror=implicit-function-declaration',
  '-Wsign-compare', '-Werror=undef', '-Werror=implicit-function-declaration',
  '-Wsign-compare', '-Werror=undef', '-Werror=implicit-function-declaration',
  '-Wsign-compare', '-Werror=undef', '-Werror=implicit-function-declaration',
  '-Wsign-compare', '-Werror=undef', '-Werror=implicit-function-declaration',
  '-Wsign-compare', '-Werror=undef', '-Werror=implicit-function-declaration',
  '-Wsign-compare', '-Werror=undef', '-Werror=implicit-function-declaration',
  '-Wsign-compare', '-Werror=undef', '-Werror=implicit-function-declaration',
  '-Wsign-compare', '-Werror=undef', '-Werror=implicit-function-declaration',

and I can compile with those warnings. What if you try ninja -C build CFLAGS="-Wno-error"

@Aadniz
Copy link
Author

Aadniz commented Oct 6, 2024

I got it to compile after upgrading the system. Now it won't launch because DRM is disabled at compile-time.

00:00:00.011 [ERROR] [wlr] [backend/backend.c:284] Cannot create DRM backend: disabled at compile-time
00:00:00.011 [ERROR] [wlr] [backend/backend.c:428] Failed to open any DRM device
00:00:00.052 [ERROR] [sway/server.c:229] Unable to create backend

With the subprojects/libdrm cloned, it still shows drm-backend : NO when running meson build/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

3 participants