linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Anders Kaseorg <andersk@MIT.EDU>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Jani Nikula <jani.nikula@linux.intel.com>
Cc: linux-acpi@vger.kernel.org, intel-gfx@lists.freedesktop.org
Subject: Re: PROBLEM: Native backlight regressed from logarithmic to linear scale
Date: Tue, 29 Jul 2014 11:46:13 +0200	[thread overview]
Message-ID: <53D76D65.6030704@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1407212333200.44274@all-night-tool.MIT.EDU>

Hi,

On 07/22/2014 06:32 AM, Anders Kaseorg wrote:
> [1.] One line summary of the problem:    
> 
> Native backlight regressed from logarithmic to linear scale
> 
> [2.] Full description of the problem/report:
> 
> With the new default of video.use_native_backlight=0 (commit 
> v3.16-rc1~30^2~2^3), my Thinkpad T510 backlight has become very difficult 
> to control near the low end of the scale.  The lowest setting now turns 
> the backlight completely off, but the second-lowest setting is too bright.  
> Meanwhile, the difference between the highest several settings is nearly 
> imperceptible.
> 
> This happened because /sys/class/backlight/acpi_video0/brightness (which 
> has now disappeared) used a different scale than 
> /sys/class/intel_backlight/brightness; the relationship between 
> acpi_video0 and intel_backlight was not linear.  I measured the exact 
> relationship as follows:
> 
> acpi    intel
> 0       52
> 1       87
> 2       139
> 3       174
> 4       226
> 5       261
> 6       313
> 7       435
> 8       591
> 9       800
> 10      1078
> 11      1461
> 12      1914
> 13      2557
> 14      3358
> 15      4437
> 
> The relationship is close to logarithmic; a good fit is intel = 
> 60*(4/3)^acpi, or acpi = log_{4/3} (intel/60).  It’s well known that 
> perceived brightness varies logarithmically with physical luminance 
> (Fechner’s law), so it’s no surprise that the acpi_video0 scale was more 
> useful.
> 
> Since the kernel no longer uses ACPI to do this translation, it should do 
> the translation itself.

I've been thinking a bit about this, and I believe that the right answer
here is to do the linear to logarithmic mapping in user-space. The intel
backlight interface has a type of raw, clearly signalling to userspace that
it is a raw "untranslated" interface, as such any fanciness such as
creating a logarithmic scale should be done in userspace IMHO.

Regards,

Hans
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2014-07-29  9:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-22  4:32 PROBLEM: Native backlight regressed from logarithmic to linear scale Anders Kaseorg
2014-07-22 12:24 ` Rafael J. Wysocki
2014-07-29  9:46 ` Hans de Goede [this message]
2014-07-29 10:14   ` [Intel-gfx] " Anders Kaseorg
2014-07-29 10:38     ` Daniel Vetter
2014-08-08  9:38       ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53D76D65.6030704@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andersk@MIT.EDU \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).