• Hans de Goede's avatar
    UpKbdBacklight: Fix endless loop burning 100% CPU on keyboard plugout · 04ee9afb
    Hans de Goede authored
    If an external keyboard with a backlight gets unplugged then
    up_kbd_backlight_event_io would constantly get called, burning 100% CPU.
    
    To make things worse, up_kbd_backlight_event_io would also constantly post
    DBUS events, causing gnome-shell to also become very unresponsive.
    
    This commit fixes this by returning FALSE from up_kbd_backlight_event_io
    on unplug.
    
    While at it also fix calling up_kbd_backlight_emit_change with a negative
    brightness value in other error scenarios. Specifically this fixes
    calling up_kbd_backlight_emit_change with -1 on the initial
    up_kbd_backlight_event_io call in which case up_kbd_backlight_brightness_read
    will typically fail with ENODATA.
    04ee9afb
Name
Last commit
Last update
dbus Loading commit data...
doc Loading commit data...
etc Loading commit data...
libupower-glib Loading commit data...
m4 Loading commit data...
po Loading commit data...
rules Loading commit data...
src Loading commit data...
tools Loading commit data...
.gitlab-ci.yml Loading commit data...
AUTHORS Loading commit data...
COMMITMENT Loading commit data...
COPYING Loading commit data...
HACKING Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
RELEASE Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
git.mk Loading commit data...
upower-glib.pc.in Loading commit data...