https://bugs.kde.org/show_bug.cgi?id=489169
Jakob Petsovits <jpe...@petsovits.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED Latest Commit| |https://invent.kde.org/plas | |ma/powerdevil/-/commit/7e11 | |30ffcf7ad667272dabf83451522 | |36a38bf2a --- Comment #9 from Jakob Petsovits <jpe...@petsovits.com> --- Git commit 7e1130ffcf7ad667272dabf8345152236a38bf2a by Jakob Petsovits. Committed on 02/07/2024 at 12:03. Pushed by jpetso into branch 'master'. daemon/controllers: Reintroduce a mutex around ddca_open_display2() ddcutil keeps some global state, and in particular we've seen a crash in ddc_close_display() related to its open_displays hashmap. One likely culprit for such a crash is that brightness workers run on separate threads, one per DDCutilDisplay object, so they could get executed simultaneously when more than one external monitor is involved. A less likely, but still possible culprit is when a DDCutilDisplay constructor opens a display handle at the same time that a brightness worker sets the brightness of a different display on a different thread. We could look into combining all brightness setter calls into a single BrightnessWorker that gets shared across DDCutilDisplay objects, but this would introduce extra complexity and still wouldn't address the constructor vs. brightness setter issue. So this commit reintroduces a mutex to isolate all of these usages from each other. We had one in 5.x, which was removed in 6.0 at my (in hindsight incorrect) request: https://invent.kde.org/plasma/powerdevil/-/merge_requests/312#note_865976, https://invent.kde.org/plasma/powerdevil/-/merge_requests/312#note_867942 M +5 -1 daemon/controllers/ddcutildetector.cpp M +41 -30 daemon/controllers/ddcutildisplay.cpp M +3 -1 daemon/controllers/ddcutildisplay.h https://invent.kde.org/plasma/powerdevil/-/commit/7e1130ffcf7ad667272dabf8345152236a38bf2a -- You are receiving this mail because: You are watching all bug changes.