KMilo: brightness OSD shows old value #68

Closed
opened 6 months ago by blu.256 · 4 comments
Collaborator

Basic information

  • TDE version: R14.1.1
  • Distribution: Arch Linux
  • Hardware: amd64 (Acer TravelMate laptop)

Description

When using Fn keys to control brightness, the OSD that appears shows the old brightness value.

Steps to reproduce

  1. Ensure KMilo service is running.
  2. Consecutively press the Fn combination that corresponds to the "decrease brightness" hotkey (Fn+F3 for me). Each time the brightness should decrease by 10%.
  3. Notice that the last value that appears on the OSD before the screen goes totally dark is 20%.
  4. Press the Fn combination that corresponds to the "increase brightness" hotkey (Fn+F4 for me) once.
  5. Notice how the OSD displays a value of 0%.
  6. Consecutively press the hotkey of step 3 until the OSD shows 90%.
  7. Press the hotkey once.
  8. Notice how the brightness did not change but the OSD now shows 100%.

Background

TDE/tdeutils#55 introduced improved brightness OSD feedback to KMilo. The core of that PR was to display the correct value on machines with fewer brightness steps capability and not blindly assume that logical value == actual value.

The PR introduced a DCOP call to get the actual brightness value after the brightness was modified.

Possible explanation

This issue is likely related to that change, which was part of the R14.1.1 update, because in R14.1.0 and earlier I did not encounter this issue.

It is probable that in some cases something delays the brightness change in TDEPowersave, resulting in the DCOP call returning the old brightness value.

Notes

This is probably the same issue that Roman has encountered (but the proposed patch is an unacceptable hack).

## Basic information - TDE version: R14.1.1 - Distribution: Arch Linux - Hardware: amd64 (Acer TravelMate laptop) ## Description When using Fn keys to control brightness, the OSD that appears shows the old brightness value. ## Steps to reproduce 0. Ensure KMilo service is running. 1. Consecutively press the Fn combination that corresponds to the "decrease brightness" hotkey (Fn+F3 for me). Each time the brightness should decrease by 10%. 2. Notice that the last value that appears on the OSD before the screen goes totally dark is 20%. 3. Press the Fn combination that corresponds to the "increase brightness" hotkey (Fn+F4 for me) once. 4. Notice how the OSD displays a value of 0%. 5. Consecutively press the hotkey of step 3 until the OSD shows 90%. 6. Press the hotkey once. 7. Notice how the brightness did not change but the OSD now shows 100%. ## Background TDE/tdeutils#55 introduced improved brightness OSD feedback to KMilo. The core of that PR was to display the correct value on machines with fewer brightness steps capability and not blindly assume that logical value == actual value. The PR introduced a DCOP call to get the actual brightness value after the brightness was modified. ## Possible explanation This issue is likely related to that change, which was part of the R14.1.1 update, because in R14.1.0 and earlier I did not encounter this issue. It is probable that in some cases something delays the brightness change in TDEPowersave, resulting in the DCOP call returning the old brightness value. ## Notes This is probably the same issue that Roman has encountered (but the proposed patch is an unacceptable hack).
Owner

Hi Philippe, thanks for reporting this. I can't reproduce it so I will need your help for testing. I can think of three possible explanations:

  1. the hardware is slow to update even if all the calls are sync, so physically the brightness value is changed after the call to get the new brightness
  2. there are two video cards and for some reasons the value is updated on one card and read from another. This is a stretch and I don't think it is actually the case but I don't want to rule out any possibility
  3. a bug in the changes I made. Although I checked the code several times and tested on various computers, you never know, bugs can always get into the code.

For sure the old way of using the logical value was not accurate either. I will look into this.

This is probably the same issue that Roman has encountered (but the proposed patch is an unacceptable hack).

Sounds like the same issue to me too.

Hi Philippe, thanks for reporting this. I can't reproduce it so I will need your help for testing. I can think of three possible explanations: 1. the hardware is slow to update even if all the calls are sync, so physically the brightness value is changed after the call to get the new brightness 2. there are two video cards and for some reasons the value is updated on one card and read from another. This is a stretch and I don't think it is actually the case but I don't want to rule out any possibility 3. a bug in the changes I made. Although I checked the code several times and tested on various computers, you never know, bugs can always get into the code. For sure the old way of using the logical value was not accurate either. I will look into this. > This is probably the same issue that Roman has encountered (but the proposed patch is an unacceptable hack). Sounds like the same issue to me too.
Owner

I am able to replicate this on my own real computer with Q4OS live, so I will be able to troubleshoot it.

I am able to replicate this on my own real computer with Q4OS live, so I will be able to troubleshoot it.
Owner

It's a combination of 1. and 3.
The call in kmilo is non blocking (send instead of call) and the hardware takes some time to update (60ms on this computer). Will prepare a fix.

It's a combination of 1. and 3. The call in kmilo is non blocking (`send` instead of `call`) and the hardware takes some time to update (60ms on this computer). Will prepare a fix.
MicheleC added this to the R14.1.2 release milestone 6 months ago
Owner

Solved by PR #69.

Solved by PR #69.
MicheleC closed this issue 6 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tdeutils#68
Loading…
There is no content yet.