Skip to content

fix: backlight leds subsystem (#2848), sway/ipc reconnect (#3166), ethernet unplug regression (#4364)#5167

Merged
Alexays merged 3 commits into
masterfrom
fix/bug-batch
Jul 4, 2026
Merged

fix: backlight leds subsystem (#2848), sway/ipc reconnect (#3166), ethernet unplug regression (#4364)#5167
Alexays merged 3 commits into
masterfrom
fix/bug-batch

Conversation

@Alexays

@Alexays Alexays commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Three contained bug fixes from the tracker triage (distinct modules, one commit each).

  • backlight: keyboard backlights not found (backlight module device option not working as expected #2848) — the backlight module only enumerated/monitored the udev backlight subsystem, so leds-class devices (white:kbd_backlight, platform::kbd_backlight) were never discovered. Now matches the leds subsystem too in both the enumeration and the live udev monitor. Automatic device selection still prefers a backlight-subsystem device (a leds device only wins when named explicitly or when no screen backlight exists), and the login1 SetBrightness DBus call now passes the selected device's actual subsystem (it previously hardcoded "backlight", which would target the wrong device for an LED). Man pages noted.

  • sway/ipc: no reconnect after disconnect (Waybar freezing and high CPU load when there's lots of window events #3166) — when sway closes the event socket after its send buffer overflows under an event flood, recv hit EOF and threw; the worker immediately re-invoked it → threw again → tight loop = modules stuck + high CPU. The IPC client now reconnects on disconnect: 2s backoff (kills the CPU spin), re-opens the event socket, replays the subscriptions, and resumes; a shutdown flag lets the worker exit cleanly on teardown. Mirrors the niri backend reconnect.

  • network: ethernet cable-unplug no longer detected (format-disconnected does not work with Ethernet #4364, regression) — PR fix: network module not displaying rfkill state #4190 (rfkill "disabled" state) moved the rfkill check to the top of getNetworkState(); because the network module always instantiates a WLAN killswitch, a wired ethernet module then reported "disabled" on carrier loss whenever the system's WLAN radio was rfkill-blocked, so a pulled cable looked connected instead of disconnected. Now the rfkill-disabled branch is gated on the interface actually being wireless (/sys/class/net/<if>/phy80211), restoring cable-unplug detection while preserving fix: network module not displaying rfkill state #4190's wifi behavior.

Alexays added 3 commits July 4, 2026 13:43
The backlight module only enumerated and monitored the udev "backlight"
subsystem, so keyboard-backlight LEDs in the "leds" class (e.g.
white:kbd_backlight, platform::kbd_backlight) were never discovered and
the module fell back to the default when pointed at one.

Enumerate and monitor the "leds" subsystem in addition to "backlight".
Those LEDs expose the same brightness/max_brightness attributes, so the
read path is unchanged. Each device now records its subsystem so the
login1 SetBrightness call targets the correct one. Automatic device
selection still prefers a "backlight" device and only falls back to a
"leds" device when named explicitly or when no screen backlight exists.

Fixes #2848.
…ning

When sway's event-subscription send buffer overflows during an event
flood, sway closes the client connection. The sway IPC event worker
(SleeperThread running handleEvent -> recv) then threw on every
iteration and the SleeperThread immediately re-invoked it, leaving the
sway modules broken while busy-looping on a dead socket and pegging a
CPU.

Mirror the niri backend's reconnect loop: on a read/EOF/parse error from
the event socket, close the old connection, back off for a couple of
seconds (so we don't busy-spin), re-open the socket and replay the same
subscriptions, then resume. A running_ flag set at the start of teardown
makes the worker bail out cleanly instead of reconnecting to a socket
that is being closed on purpose. The IPC message protocol and event
parsing are unchanged.

Fixes #3166.
PR #4190 (merged as 93d85a0) reworked getNetworkState() so the rfkill
"disabled" state is evaluated whenever the module has no carrier. Because
the module always watches an RFKILL_TYPE_WLAN switch, a wired ethernet
module whose cable is unplugged (carrier lost) would return "disabled"
instead of "disconnected" whenever the system's WLAN radio happened to be
rfkill-blocked. With no format-disabled configured, that state falls back
to plain "format", so the interface kept looking connected after unplug.

rfkill only concerns wireless radios, so only honor it when there is no
interface at all or the current interface is actually wireless (detected
via /sys/class/net/<if>/phy80211 or /wireless). A wired interface that
lost its carrier now correctly reports "disconnected", while wifi rfkill
display from #4190 is preserved.

Fixes #4364.
@Alexays Alexays merged commit 1471cb2 into master Jul 4, 2026
20 checks passed
@Alexays Alexays deleted the fix/bug-batch branch July 4, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant