Public bug reported:

[ Impact ]
Changing screen brightness in a Resolute UKUI X11 session can crash
ukui-settings-daemon when it uses the gamma-manager backend. The release
build logged three SIGILL crashes within seconds in
GmWorkThread::screenBrightnessChangedSignal(). When the daemon repeatedly
exits, the global shortcuts it handles can stop working.

The patch adds the missing return values in the gamma worker's brightness
notification and color interpolation code, and in the notification setup
chain.

[ Test Plan ]
1. On Resolute with 4.0.10.0-0ubuntu1 installed, use UKUI X11 with
   the gamma-manager backend, a connected primary display and core dump
   collection enabled. Note the daemon PID and current brightness.
   Set a different brightness value.

   busctl --user call org.ukui.SettingsDaemon /GlobalBrightness
org.ukui.SettingsDaemon.Brightness setPrimaryBrightness u 45

   Check coredumpctl for a new SIGILL in screenBrightnessChangedSignal().
2. Install ukui-settings-daemon and ukui-settings-daemon-common from
   resolute-proposed. Record their versions and start a new UKUI session.
   Repeat the brightness change. The screen and brightness readout
   should follow the new value. The same daemon PID should stay alive
   for 60 seconds without a new SIGILL.
3. Check that a volume key still works and that turning night color on
   and off changes the screen tint. Restore the original settings.

[ Where problems could occur ]
A problem in the notification code could leave clients showing a stale
brightness value. A problem in the gamma worker could leave the actual
brightness or screen tint out of sync with the settings.

[ Other Info ]
Debian #1146577 reports the same crash. The Resolute patch backports
the gamma-manager changes from commit 61e4d99. Stonking and Tenacious
both ship the fix in 4.0.10.2-0ubuntu1.

https://bugs.debian.org/1146577
https://gitee.com/openkylin/ukui-settings-daemon/commit/61e4d9963902e6237e9d95e5913a3687c115fbce

** Affects: ukui-settings-daemon (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2173820

Title:
  [SRU] ukui-settings-daemon crashes with SIGILL when changing
  brightness on Resolute

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ukui-settings-daemon/+bug/2173820/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to