FedeDP / Clightd

A linux bus interface that lets you change screen brightness, compute captured webcam frames brightness and change screen temperature.
GNU General Public License v3.0
83 stars 10 forks source link

Core dump on external screen dpms off #116

Open PanAeon opened 2 months ago

PanAeon commented 2 months ago

Hi, when my external screen turns off the clightd spams dmesg with segfaults and restarts. After the screen turns on it's no longer available.

Journalctl log:

Aug 06 13:22:16 nixos systemd[1]: Starting Bus service to manage various screen related properties (gamma, dpms, backlight)...
Aug 06 13:22:16 nixos systemd[1]: Started Bus service to manage various screen related properties (gamma, dpms, backlight).
Aug 06 13:22:16 nixos clightd[2131299]: ddca_get_display_info_list2 called before ddca_init2() or ddca_init()
Aug 06 13:22:16 nixos libddcutil[2131299]: Initializing libddcutil.  ddcutil version: 2.1.4, shared library: /nix/store/kav7v0aiwinkhy254izxrbj2128av414-ddcutil-2.1.4/lib/libddcutil.so.5.1.2
Aug 06 13:22:18 nixos libddcutil[2131299]: busno=7, sleep-multiplier =  1.00. Testing for supported feature 0x10 returned Error_Info[DDCRC_RETRIES in ddc_write_read_with_retry, causes: DDCRC_DDC_DATA(10)]
Aug 06 13:22:18 nixos libddcutil[2131299]: Library initialization complete.
Aug 06 13:22:41 nixos clightd[2131299]: Failed to copy frame
Aug 06 13:22:41 nixos kernel: clightd[2131299]: segfault at 8 ip 000000000041379e sp 00007ffd27247730 error 4 in clightd[406000+e000] likely on CPU 0 (core 0, socket 0)
Aug 06 13:22:41 nixos kernel: Code: 4d 85 e4 74 21 4c 89 e7 e8 4f 33 ff ff 41 b8 01 00 00 00 31 d2 4c 89 e7 89 c1 be 01 00 00 00 31 c0 e8 36 2e ff ff 48 8b 7b 10 <48> 8b 47 08 48 85 c0 74 14 48 8b 53 18 48 89 c7 48 63 72 10 e8 79
Aug 06 13:22:41 nixos systemd[1]: Started Process Core Dump (PID 2131410/UID 0).
Aug 06 13:22:41 nixos systemd-coredump[2131411]: [🡕] Process 2131299 (clightd) of user 0 dumped core.

                                                 Module libpcre2-8.so.0 without build-id.
                                                 Module libXdmcp.so.6 without build-id.
                                                 Module libXau.so.6 without build-id.
                                                 Module libjansson.so.4 without build-id.
                                                 Module libz.so.1 without build-id.
                                                 Module libffi.so.8 without build-id.
                                                 Module libXrender.so.1 without build-id.
                                                 Module libxcb.so.1 without build-id.
                                                 Module libcap.so.2 without build-id.
                                                 Module libusb-1.0.so.0 without build-id.
                                                 Module libddcutil.so.5 without build-id.
                                                 Module libXext.so.6 without build-id.
                                                 Module libdrm.so.2 without build-id.
                                                 Module libXrandr.so.2 without build-id.
                                                 Module libX11.so.6 without build-id.
                                                 Module libsystemd.so.0 without build-id.
                                                 Module libjpeg.so.62 without build-id.
                                                 Module libmodule.so.5 without build-id.
                                                 Module libudev.so.1 without build-id.
                                                 Module clightd without build-id.
                                                 Stack trace of thread 2131299:
                                                 Module libmodule.so.5 without build-id.
                                                 Module libudev.so.1 without build-id.
                                                 Module clightd without build-id.
                                                 Stack trace of thread 2131299:
                                                 #0  0x000000000041379e get_frame_brightness (clightd + 0x1379e)
                                                 #1  0x000000000040d016 method_getbrightness (clightd + 0xd016)
                                                 #2  0x00007fd0bd063887 object_find_and_run (libsystemd.so.0 + 0x3a887)
                                                 #3  0x00007fd0bd064efb bus_process_object (libsystemd.so.0 + 0x3befb)
                                                 #4  0x00007fd0bd079728 bus_process_internal (libsystemd.so.0 + 0x50728)
                                                 #5  0x00000000004099bb receive (clightd + 0x99bb)
                                                 #6  0x00007fd0bd20eab3 run_pubsub_cb (libmodule.so.5 + 0x5ab3)
                                                 #7  0x00007fd0bd20e171 recv_events (libmodule.so.5 + 0x5171)
                                                 #8  0x00007fd0bd20e3fd modules_ctx_loop_events (libmodule.so.5 + 0x53fd)
                                                 #9  0x00000000004071ff main (clightd + 0x71ff)
                                                 #10 0x00007fd0bcac310e __libc_start_call_main (libc.so.6 + 0x2a10e)
                                                 #11 0x00007fd0bcac31c9 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2a1c9)
                                                 #12 0x0000000000407a25 _start (clightd + 0x7a25)

                                                 Stack trace of thread 2131301:
                                                 #0  0x00007fd0bcb9562f __poll (libc.so.6 + 0xfc62f)
                                                 #1  0x00007fd0bcd7cb3f linux_udev_event_thread_main (libusb-1.0.so.0 + 0x13b3f)
                                                 #2  0x00007fd0bcb27272 start_thread (libc.so.6 + 0x8e272)
                                                 #3  0x00007fd0bcba2dec __clone3 (libc.so.6 + 0x109dec)
                                                 ELF object binary architecture: AMD x86-64
Aug 06 13:22:41 nixos systemd[1]: clightd.service: Main process exited, code=dumped, status=11/SEGV
Aug 06 13:22:41 nixos systemd[1]: clightd.service: Failed with result 'core-dump'.
Aug 06 13:22:41 nixos systemd[1]: systemd-coredump@4565-2131410-0.service: Deactivated successfully.
Aug 06 13:22:46 nixos systemd[1]: clightd.service: Scheduled restart job, restart counter is at 10.