Bug 370924 - Brightness slider slowly "moving back" after dragging the slider thumb.
Summary: Brightness slider slowly "moving back" after dragging the slider thumb.
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Battery Monitor (show other bugs)
Version: 5.8.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-15 17:46 UTC by Rob
Modified: 2017-08-30 12:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob 2016-10-15 17:46:15 UTC
Steps to reproduce:
1. Open the battery monitor widget.
2. Click at the left side of the slider to set the initial position of the slider.
3. Wait until the brightness has changed.
4. Grab the slider thumb with the mouse, and move it to the right.

Expected:
- Upon releasing the thumb, the screen should be at its brightest setting.

Actual:
- Upon releasing the thumb, the screen is at its brightest setting (so far so good)
- AND the brightness slowly drops, while the thumb slowly moves to the left.

More info:
- When I drag the slider a couple of times back and forwards, and *click* on a point in the slider where it is moving from, then the brightness (and slider thumb) quickly switches to that setting (as expected). But within a split second, the thumb (and brightness level) jumps back to their previous position.

While testing this, I was utilizing 100% of my CPU (compiling), so that might have impacted the test results.

I am not very familiar with QML, but from inspection of applets/batterymonitor/package/contents/ui/PopupDialog.qml, it seems that there is a feedback loop between setting the attribute and updating the value again, which only ends when the brightness values have converged to the same value. When I use the mouse to drag the thumb on the slider, then I probably trigger multiple brightnessSlider value change events, which in their turn trigger the slide value change events again (I guess?).

        brightnessSlider.valueChanged.connect(function() {
            batterymonitor.screenBrightness = brightnessSlider.value
(...)
        BrightnessItem {
            id: brightnessSlider
(...)
            Connections {
                target: batterymonitor
                onScreenBrightnessChanged: brightnessSlider.value = batterymonitor.screenBrightness

Code snippets from: https://quickgit.kde.org/?p=plasma-workspace.git&a=blob&h=cd92a28ca64af518409adbad9d5fb3eeebd59a1c&hb=e7a07a154006a270149d78eeb2abd114b5ab816a&f=applets%2Fbatterymonitor%2Fpackage%2Fcontents%2Fui%2FPopupDialog.qml#l42
Comment 1 Alexander Mentyu 2017-08-29 06:29:13 UTC
Cannot confirm this bug in:

Distribution: KDE neon Developer Edition Unstable Branches
KDE Plasma Version: 5.10.90
KDE Frameworks Version: 5.37.0
Qt Version: 5.9.1
Kernel Version: 4.10.0-32-generic
Video card: Intel 4500MHD

Brightness is changing upon moving of the slider for me - not after releasing.
Comment 2 Rob 2017-08-30 12:52:05 UTC
Can't reproduce any more.

KDE framework 5.37.0
Plasmashell 5.10.5