I tried Ubuntu Mate 19.10 live on my testing system (AMD Ryzen 5 2500U
with Radeon Vega Graphics - seems to be the same AMD CPU on your Acer),
and brightness control works without any problems even though
actual_brightness has a fixed and higher value.

The below is the latest function can be ftrace'd before setting
brightness on my AMD platform.

https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c#L418

See result of using kprobe-perf (needs to be installed) with writing max
(255) to brightness

$ sudo kprobe-perf 'p:dce_abm_set_backlight_level_pwm $arg1 $arg2 $arg3 $arg4 
$arg5 '
Tracing kprobe dce_abm_set_backlight_level_pwm. Ctrl-C to end.
             tee-2074  [001] ....  1009.569878: 
dce_abm_set_backlight_level_pwm: (dce_abm_set_backlight_level_pwm+0x0/0x410 
[amdgpu]) arg1=0xffff9874e0928900 arg2=0xffff arg3=0x0 arg4=0x0 arg5=0x0

Note the arg2 = 0xffff (max brightness) and arg5 = 0 (no
"use_smooth_brightness")

If you observe the same behaiours but different results, the Acer
hardware may have something special that needs attention either from
Acer or from AMD...

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1861925

Title:
  BrightnessOutofRange: Actual brightness for amdgpu_bl0 not in range
  0..255

Status in linux package in Ubuntu:
  Incomplete

Bug description:
  Hi,

  I have a acer aspire a315-41 laptop, it has BIOS 1.15, Ubuntu 19.10,
  Kernel stock 5.3, and 5.5.0. I have a problem with the Backlight. I
  can not control.

  According to: https://wiki.ubuntu.com/Kernel/Debugging/Backlight

  It is : Backlight control does not work, but there are entries in
  /sys/class/backlight.

  The problem is as far I could find:

  sanya@Aspire-A315-41:/sys/class/backlight/amdgpu_bl0$ cat brightness
  135
  sanya@Aspire-A315-41:/sys/class/backlight/amdgpu_bl0$ cat actual_brightness
  43500
  sanya@Aspire-A315-41:/sys/class/backlight/amdgpu_bl0$ cat max_brightness
  255

  The brightness read from the HW is not in the range, and when I change
  the brightness by the keys the value in the brightness file changes
  too, but the actual_brightness is stuck at the value 43500...

  I have tried all the steps mentioned in
  https://wiki.ubuntu.com/Kernel/Debugging/Backlight

  Actually I have tried all these kernel startup parameter variants
  without luck:

  GRUB_CMDLINE_LINUX_DEFAULT=""
  #GRUB_CMDLINE_LINUX_DEFAULT="video.use_native_backlight=1"
  #GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi="
  #GRUB_CMDLINE_LINUX_DEFAULT="video.use_bios_initial_backlight=0"
  #GRUB_CMDLINE_LINUX_DEFAULT="amdgpu.dcfeaturemask=0x4 amdgpu.abmlevel=2"
  #GRUB_CMDLINE_LINUX_DEFAULT="acpi_backlight=video amdgpu.abmlevel=1"
  #GRUB_CMDLINE_LINUX_DEFAULT="i8042.nopnp acpi_osi=Linux acpi_backlight=vendor"
  #GRUB_CMDLINE_LINUX_DEFAULT="i8042.nopnp acpi_osi=! acpi_osi=\"Windows 2009\" 
acpi_backlight=vendor"
  #GRUB_CMDLINE_LINUX_DEFAULT="i8042.nopnp acpi_osi=! acpi_osi=\"Windows 2009\" 
acpi_backlight=video"
  #GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=! acpi_osi=\"Windows 2009\" 
acpi_backlight=vendor"
  #GRUB_CMDLINE_LINUX_DEFAULT="i8042.nopnp acpi_osi=! acpi_osi=\"Windows 2009\" 
acpi_backlight=vendor"
  #GRUB_CMDLINE_LINUX_DEFAULT="i8042.nopnp acpi_osi=! acpi_osi=\"Windows 2009\" 
acpi_backlight=vendor"

  I guess the fwts has found also this as an error:

  autobrightness: Automated LCD brightness test.
  
--------------------------------------------------------------------------------
  Test 1 of 2: Test for maximum and actual brightness.
  PASSED: Test 1, Maximum brightness for amdgpu_bl0 is 255 which is sane.
  FAILED [HIGH] BrightnessOutofRange: Test 1, Actual brightness for amdgpu_bl0 
not
  in range 0..255.

  Test 2 of 2: Change actual brightness.
  FAILED [MEDIUM] BrightnessMismatch: Test 2, 256 brightness levels did not 
match
  the brightnesss level just set for backlight amdgpu_bl0.
  The failed brightness levels were: 0-255.

  It would be great if someone could help set the HW brightness back to
  the normal range.

  If you need any more debug files please let me know!

  Thanks,
  Regards,
  Sandor

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1861925/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to