! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
don't set idle brightness if it would be higher than current one
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Evgeni Golov 2011-05-12 14:21:36 CEST
Hi,

running 1.0.10 on Debian Sid on a Thinkpad X201s (thus hit by #7541, but that does not matter here). The machine has 16 possible brightness levels (0-15).
Xfpm is set to dim to "20%" (whatever that means exactly in levels) if the machine is idle for 120 seconds.
That if fine most of the time, but not if my current brightness is at level 0. In that case my screen will become *brighter* (set to level 2 or something) when the idle timeout kicks in. This is obviously wrong :)

There are two possible ways to "fix" that:
1. set to idle_brightness (20%) only when current is more:
   set_idle_brightness() {
      if current_brightness > idle_brightness {
         set_brightness(idle_brightness)
      }
   }
2. always set to 20% of the current:
   set_idle_brightness {
      new_brightness = current_brightness * idle_brightness_percent
      set_brightness(new_brightness)
   }

I would prefer number 2, but I bet others would differ :)

Thanks for your work
Regards
Evgeni Golov
Comment 1 Hubert Hesse 2011-06-07 00:01:18 CEST
Created attachment 3723 
Implementing the 2nd method

the +0.5 is for rounding up . So 20% of Level 4 will result in new Level 1 not 0
Comment 2 Ali Abdallah editbugs 2011-06-27 16:57:02 CEST
Thanks for the report, i choosed the 1 solution as this will please everybody.

Bug #7609

Reported by:
Evgeni Golov
Reported on: 2011-05-12
Last modified on: 2011-06-27

People

Assignee:
Ali Abdallah
CC List:
0 users

Version

Version:
1.0.10

Attachments

Implementing the 2nd method (706 bytes, patch)
2011-06-07 00:01 CEST , Hubert Hesse
no flags

Additional information