[SOLVED] Backlight of built-in display goes on-and-off after changing brightness (intel gpu)

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
PatrikT
Level 1
Level 1
Posts: 4
Joined: Tue Mar 05, 2024 10:27 am

[SOLVED] Backlight of built-in display goes on-and-off after changing brightness (intel gpu)

Post by PatrikT »

Hello!

After fresh installation, brightness of the built-in display is at maximum. If I decrease brightness to 50%, it goes 2 seconds full black, then 2 seconds max brightness and the cycle repeats. If I set it to 25%, it goes 3 seconds full black and 1 second max brightness etc. If I set to 100% again, the on-and-off cycle stops and the display stays on all the time. Can you help me please?

It's a Lenovo IdeaPad Flex 5 laptop with Linux Mint Cinnamon 21.3 (I also tried Ubuntu 23.10, Ubuntu 22.04, Ubuntu 20.04 and Xubuntu all had the same issue).
I used to have Ubuntu 20.04 and brightness control used to work (nvidia card turned off). Now it doesn't work with 20.04 either (maybe something got upgraded?). Brightness control works properly if I dual boot to Windows of course.

1) I have disabled my nvidia graphics card in the BIOS menu, so this is strictly related to integrated intel graphics
2) I'm changing brightness like this:

Code: Select all

echo 40000000 | sudo tee /sys/class/backlight/intel_backlight/brightness
(40000000 for 50% because /sys/class/backlight/intel_backlight/max_brightness is around 80000000)
3) I upgraded kernel from 5.15 to 6.5.0-oem, it did not help
4) I have updated BIOS firmware recently, it did not help

System:

Code: Select all

System:  Host: p-IdeaPad-Flex-5 Kernel: 6.5.0-1015-oem x86_64 bits: 64
    Desktop: Cinnamon 6.0.4 Distro: Linux Mint 21.3 Virginia
Machine:
  Type: Convertible System: LENOVO product: 81X3 v: IdeaPad Flex 5 15IIL05
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0J40700 WIN
    serial: <superuser required> UEFI: LENOVO v: ECCN46WW date: 08/23/2023
Battery:
  ID-1: BAT0 charge: 26.7 Wh (59.5%) condition: 44.9/52.5 Wh (85.6%)
    volts: 11.8 min: 11.5
CPU:
  Info: quad core Intel Core i5-1035G1 [MT MCP] speed (MHz): avg: 400
    min/max: 400/3600
Graphics:
  Device-1: Intel Iris Plus Graphics G1 driver: i915 v: kernel
  Device-2: Acer Integrated Camera type: USB driver: uvcvideo
  Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: modesetting
    unloaded: fbdev,vesa gpu: i915 resolution: 1920x1080~60Hz
  OpenGL: renderer: Mesa Intel UHD Graphics (ICL GT1)
    v: 4.6 Mesa 23.2.1-1ubuntu3.1~22.04.2
Network:
  Device-1: Intel Ice Lake-LP PCH CNVi WiFi driver: iwlwifi
Drives:
  Local Storage: total: 476.94 GiB used: 10.68 GiB (2.2%)
Info:
  Processes: 258 Uptime: 37m Memory: 7.42 GiB used: 1.12 GiB (15.0%)
  Shell: Bash inxi: 3.3.13
Maybe I could try an older xserver-xorg-video-intel driver? Unfortunately I don't know how to do that, apt offers only a single version of this package.
Last edited by PatrikT on Fri Mar 22, 2024 12:34 am, edited 1 time in total.
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Backlight of built-in display goes on-and-off after changing brightness (intel gpu)

Post by SMG »

PatrikT wrote: Tue Mar 05, 2024 11:13 amMaybe I could try an older xserver-xorg-video-intel driver? Unfortunately I don't know how to do that, apt offers only a single version of this package.
Welcome to the forum, PatrikT.

That driver is only meant for quite old hardware which is not what you have. Yours is more the quite new hardware.
PatrikT wrote: Tue Mar 05, 2024 11:13 am1) I have disabled my nvidia graphics card in the BIOS menu, so this is strictly related to integrated intel graphics
What are your BIOS options? Usually the options are Discrete (Nvidia only) or Switchable (Intel & Nvidia) so how are you selecting Intel only?

Does brightness work if you boot to a live session of Linux Mint 21.3 Cinnamon (Edge) Edition ISO?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
PatrikT
Level 1
Level 1
Posts: 4
Joined: Tue Mar 05, 2024 10:27 am

Re: Backlight of built-in display goes on-and-off after changing brightness (intel gpu)

Post by PatrikT »

What are your BIOS options? Usually the options are Discrete (Nvidia only) or Switchable (Intel & Nvidia) so how are you selecting Intel only?
In the BIOS I have Graphic Device: "Switchable Graphics" or "UMA only" options, so I choose "UMA only", the help says "Enable integrated graphic controller only".
Does brightness work if you boot to a live session of Linux Mint 21.3 Cinnamon (Edge) Edition ISO?
No, I tried that (Edge edition live USB) and brightness is broken the same way.

Since then I also tried adding ppa:kisak/kisak-mesa and upgrading all packages from there (it should include intel drivers). After that, brightness of the display was still at 100% but this time trying to change it (with keyboard) did not do anything. In Power Management GUI, the "Brightness" tab was visible again (it was hidden before), it showed 0% brightness, trying to change brightness in the GUI had no effect. /sys/class/backlight/ was now empty.
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Backlight of built-in display goes on-and-off after changing brightness (intel gpu)

Post by SMG »

PatrikT wrote: Mon Mar 11, 2024 4:30 pm
What are your BIOS options? Usually the options are Discrete (Nvidia only) or Switchable (Intel & Nvidia) so how are you selecting Intel only?
In the BIOS I have Graphic Device: "Switchable Graphics" or "UMA only" options, so I choose "UMA only", the help says "Enable integrated graphic controller only".
There are a few Lenovos with the UMA option. I understand what you selected.
PatrikT wrote: Mon Mar 11, 2024 4:30 pmSince then I also tried adding ppa:kisak/kisak-mesa and upgrading all packages from there (it should include intel drivers).
Intel drivers are in the kernel. They are not in a Mesa PPA.

Have you tried the acpi_backlight=vendor kernel parameter? You can use the following information How to add a kernel parameter to temporarily or permanently add the parameter. When you add it temporarily, it adds it only for that current boot cycle, so if, for any reason, it seems to cause issues or it does not work, all you need to do is reboot to clear it. If you need more details than that topic provides, just let us know.

I also suggest checking on the Lenovo community forum to see if others have run into this issue.

I did a quick search of Intel drm bugs with "backlight" in the name and found these.

Here is one which sounds similar to your issue https://gitlab.freedesktop.org/drm/intel/-/issues/8187 although it is for older hardware.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
PatrikT
Level 1
Level 1
Posts: 4
Joined: Tue Mar 05, 2024 10:27 am

Re: Backlight of built-in display goes on-and-off after changing brightness (intel gpu)

Post by PatrikT »

Code: Select all

Have you tried the acpi_backlight=vendor kernel parameter?
I've tried that now and the other options as well, same issue.

Code: Select all

Here is one which sounds similar to your issue https://gitlab.freedesktop.org/drm/intel/-/issues/8187 although it is for older hardware.
I've compiled the 6.5.0 kernel with that patch, it did not have any effect.

I've tried different kernels ranging from 5.4 to 6.9 and all had the same backlight problem. I tried the exact same Ubuntu version I had before (20.04.2) - backlight used to work there, now it's not working with this version either. I even installed Arch linux, same issue.

Since it doesn't work with the exact same OS/Kernel it used to work, what else could it be?
- Hardware is working since it's fine dual booting to Windows 10
- Could BIOS be related? I updated BIOS after the new Linux installation had broken backlight, not before that, so I'm a bit sceptical. I can try if you think it's related, as it stands Lenovo provides only the latest BIOS so I would have to ask a service to downgrade it.
- Any other ideas?
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Backlight of built-in display goes on-and-off after changing brightness (intel gpu)

Post by SMG »

PatrikT wrote: Tue Mar 05, 2024 11:13 am2) I'm changing brightness like this:

Code: Select all

echo 40000000 | sudo tee /sys/class/backlight/intel_backlight/brightness
Does this mean the function keys for brightness and the controls in Linux Mint for brightness are not working? Why did you decide to change brightness by this method?
PatrikT wrote: Sun Mar 17, 2024 10:54 am

Code: Select all

Have you tried the acpi_backlight=vendor kernel parameter?
I've tried that now and the other options as well, same issue.
Did you try the i915.enable_psr=0 kernel parameter?

I don't know if what is described here Lenovo Flex 5 boots up but screen won't turn on after closing lid during BIOS update a week ago might help.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
PatrikT
Level 1
Level 1
Posts: 4
Joined: Tue Mar 05, 2024 10:27 am

Re: Backlight of built-in display goes on-and-off after changing brightness (intel gpu)

Post by PatrikT »

Wow, resetting BIOS settings to default fixed it! Now even using the brightness keys to adjust brightness works properly. I have no clue how is it related since there is no setting related to screen brightness in the BIOS.

Thank you so much SMG, helping me not to give up!

Interestingly, max_backlight value is now just 87272. Before, I did try lower values than this and they had the same buggy effect.

To answer your last questions:
Does this mean the function keys for brightness and the controls in Linux Mint for brightness are not working? Why did you decide to change brightness by this method?
When I pressed + brightness, the slider showed about 2% brightness max, when I pressed - brightness, it showed 0%. After this, the screen just started flickering the same way.
The reason I chose the method to set brightness value directly was to get closer to the driver, reduce the amount of software involved.

i915.enable_psr=0 didn't help
and Lenovo "Novo" button wasn't what I needed (it has Recovery to recover the OS, not BIOS reset)
I just went to the BIOS, selected "Load default settings" and hit "Exit saving changes"
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Backlight of built-in display goes on-and-off after changing brightness (intel gpu)

Post by SMG »

PatrikT wrote: Fri Mar 22, 2024 12:33 am Wow, resetting BIOS settings to default fixed it! Now even using the brightness keys to adjust brightness works properly. I have no clue how is it related since there is no setting related to screen brightness in the BIOS.
Thanks for letting us know what worked. I would not have suspected that to be a possible solution.
PatrikT wrote: Fri Mar 22, 2024 12:33 amThank you so much SMG, helping me not to give up!
You're welcome. I've been known to do that because I tend not to give up. :mrgreen:
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Post Reply

Return to “Graphics Cards & Monitors”