LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-02-2021, 01:31 PM   #1
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Laptop backlight dims to zero on boot with kernel 5.14.0


I am going to assume this is some how caused by kernel 5.14.0 since the problem only started occurring after that upgrade. The laptop I have is an nvidia/AMD vega graphics hybrid, the problem is during boot once amdgpudrmfb takes over the backlight of the laptop drops to 0 and is barely visible. As a workaround for now I added this to rc.local

Code:
echo 255 > /sys/class/backlight/amdgpu_bl0/brightness
This will bring the backlight back up to max, but this was not necessary before 5.14.0. Any ideas on how to fix this are appreciated. Here is some dmesg output. I didn't find anything useful in it though
Code:
[    6.324280] [drm] amdgpu kernel modesetting enabled.
[    6.330234] amdgpu: Virtual CRAT table created for CPU
[    6.331078] amdgpu: Topology: Add CPU node
[    6.331926] fb0: switching to amdgpudrmfb from EFI VGA
[    6.332815] amdgpu 0000:06:00.0: vgaarb: deactivate vga console
[    6.332839] amdgpu 0000:06:00.0: enabling device (0006 -> 0007)
[    6.332884] amdgpu 0000:06:00.0: amdgpu: Trusted Memory Zone (TMZ) feature enabled
[    6.334177] amdgpu 0000:06:00.0: amdgpu: Fetched VBIOS from VFCT
[    6.334180] amdgpu: ATOM BIOS: 113-RENOIR-026
[    6.334623] amdgpu 0000:06:00.0: amdgpu: VRAM: 512M 0x000000F400000000 - 0x000000F41FFFFFFF (512M used)
[    6.334626] amdgpu 0000:06:00.0: amdgpu: GART: 1024M 0x0000000000000000 - 0x000000003FFFFFFF
[    6.334628] amdgpu 0000:06:00.0: amdgpu: AGP: 267419648M 0x000000F800000000 - 0x0000FFFFFFFFFFFF
[    6.334670] [drm] amdgpu: 512M of VRAM memory ready
[    6.334672] [drm] amdgpu: 3072M of GTT memory ready.
[    6.335443] amdgpu 0000:06:00.0: amdgpu: PSP runtime database doesn't exist
[    7.040261] amdgpu 0000:06:00.0: amdgpu: RAS: optional ras ta ucode is not available
[    7.047797] amdgpu 0000:06:00.0: amdgpu: RAP: optional rap ta ucode is not available
[    7.047808] amdgpu 0000:06:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available
[    7.048940] amdgpu 0000:06:00.0: amdgpu: SMU is initialized successfully!
[    7.159638] kfd kfd: amdgpu: Allocated 3969056 bytes on gart
[    7.173434] amdgpu: HMM registered 512MB device memory
[    7.173493] amdgpu: SRAT table not found
[    7.173498] amdgpu: Virtual CRAT table created for GPU
[    7.173819] amdgpu: Topology: Add dGPU node [0x1636:0x1002]
[    7.173834] kfd kfd: amdgpu: added device 1002:1636
[    7.173845] amdgpu 0000:06:00.0: amdgpu: SE 1, SH per SE 2, CU per SH 18, active_cu_number 26
[    7.176896] fbcon: amdgpu (fb0) is primary device
[    7.218403] amdgpu 0000:06:00.0: [drm] fb0: amdgpu frame buffer device
[    7.223883] amdgpu 0000:06:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
[    7.223907] amdgpu 0000:06:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[    7.223929] amdgpu 0000:06:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[    7.223946] amdgpu 0000:06:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
[    7.223963] amdgpu 0000:06:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
[    7.223980] amdgpu 0000:06:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
[    7.223997] amdgpu 0000:06:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
[    7.224014] amdgpu 0000:06:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
[    7.224031] amdgpu 0000:06:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
[    7.224048] amdgpu 0000:06:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
[    7.224065] amdgpu 0000:06:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
[    7.224089] amdgpu 0000:06:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
[    7.224106] amdgpu 0000:06:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
[    7.224123] amdgpu 0000:06:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
[    7.224140] amdgpu 0000:06:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
[    7.225750] [drm] Initialized amdgpu 3.42.0 20150101 for 0000:06:00.0 on minor 1
 
Old 09-02-2021, 02:35 PM   #2
Zexuo
Member
 
Registered: Mar 2015
Location: Florida
Distribution: Slackware
Posts: 64

Rep: Reputation: Disabled
This started happening on my AMD laptop (with AMD GPU) with the 5.14.0 update as well. It returns to normal brightness after resuming from suspend. Funny enough, xbacklight does not recognize any outputs with the backlight property on this machine, but I can control the brightness with xrander --brightness. The xrander command uses the dimmed level as the baseline and won't restore full brightness until the machine resumes from suspend.

This problem did not manifest on my Intel laptop.
 
Old 09-02-2021, 02:49 PM   #3
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Original Poster
Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Thanks for the report, glad to know I am not the only one. I may start checking the kernel mailing lists to see if I can find anything.
 
Old 09-02-2021, 03:37 PM   #4
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
For my intel backlight I use this /etc/udev/rules.d/ file
Code:
# 81-backlight.rules:
#
#    Set the initial backlight level.
#    When present, use the 'acpi_video0' control in preference to
#    the vendor 'intel_backlight' control.
#

SUBSYSTEM!="backlight", GOTO="backlight_end"
ACTION!="add", GOTO="backlight_end"

KERNEL=="intel_backlight", TEST!="/sys/class/backlight/acpi_video0/brightness", ATTR{brightness}="364"

KERNEL=="acpi_video0", ATTR{brightness}="39"

LABEL="backlight_end"
You could modify it to suit your amd hardware.

Still doesn't explain why yours is being set to 0 all of a sudden, but it's a little less crude than a rc.local hack.
 
4 members found this post helpful.
Old 09-02-2021, 03:39 PM   #5
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Original Poster
Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Quote:
Originally Posted by GazL View Post
For my intel backlight I use this /etc/udev/rules.d/ file
Code:
# 81-backlight.rules:
#
#    Set the initial backlight level.
#    When present, use the 'acpi_video0' control in preference to
#    the vendor 'intel_backlight' control.
#

SUBSYSTEM!="backlight", GOTO="backlight_end"
ACTION!="add", GOTO="backlight_end"

KERNEL=="intel_backlight", TEST!="/sys/class/backlight/acpi_video0/brightness", ATTR{brightness}="364"

KERNEL=="acpi_video0", ATTR{brightness}="39"

LABEL="backlight_end"
You could modify it to suit your amd hardware.

Still doesn't explain why yours is being set to 0 all of a sudden, but it's a little less crude than a rc.local hack.
Thanks, I'll modify it and report back.
 
Old 09-02-2021, 04:18 PM   #6
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,356

Rep: Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067
Here is mine

Code:
$ cat /etc/udev/rules.d/30-amdgpu-bl.rules
KERNEL=="card0", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/backlight/amdgpu_bl0/brightness}="255"
I had found the trick here :
https://wiki.archlinux.org/title/AMDGPU

Last edited by marav; 09-02-2021 at 04:32 PM.
 
3 members found this post helpful.
Old 09-02-2021, 05:15 PM   #7
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,356

Rep: Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067
Another workaround that works well :

in elilo.conf
Code:
image=vmlinuz
...
  append="root=/dev/nvme0n1p3 vga=normal ro resume=/dev/nvme0n1p4 quiet amdgpu.backlight=1"
 
6 members found this post helpful.
Old 09-02-2021, 05:21 PM   #8
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Original Poster
Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Thanks guys, all three of those suggestions worked. amdgpu.backlight=1 works best since there is no dimming whatsoever with that route.
 
1 members found this post helpful.
Old 09-02-2021, 05:41 PM   #9
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,356

Rep: Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067
Quote:
Originally Posted by Daedra View Post
Thanks guys, all three of those suggestions worked. amdgpu.backlight=1 works best since there is no dimming whatsoever with that route.
erf ...

There's an unwanted behaviour with amdgpu.backlight=1

Function keys ( fn+F6 & fn+F7 ) that normally decrease/increase the brightness, on my Dell laptop, don't work anymore ...

Last edited by marav; 09-02-2021 at 05:46 PM. Reason: f6 & f7
 
1 members found this post helpful.
Old 09-02-2021, 05:52 PM   #10
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Original Poster
Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Just tested on my laptop. They fn+f11/f12 keys are working in mate,kde, and xfce. In non X they don't function, but I had never tried them out side of X before so that may be normal.
 
Old 09-02-2021, 06:07 PM   #11
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,356

Rep: Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067Reputation: 4067
Quote:
Originally Posted by Daedra View Post
Just tested on my laptop. They fn+f11/f12 keys are working in mate,kde, and xfce. In non X they don't function, but I had never tried them out side of X before so that may be normal.
In KDE, no matter if my brightness is 0% or 100%, the brightness is still full

But :
Code:
root:~/ # cat /sys/class/drm/card0/device/backlight/amdgpu_bl0/{actual_brightness,brightness,max_brightness}
1
1
255
when I decrese to 0%
And
Code:
255
255
255
When I increase to 100%

But nothing change

EDIT: I'll keep my .rules file as long as it works under X/Wayland.

Last edited by marav; 09-02-2021 at 06:19 PM.
 
1 members found this post helpful.
Old 09-03-2021, 03:57 PM   #12
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Original Poster
Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Well spoke too soon. Like you, changing brightness with keyboarding was not working on battery, and the laptop was not dimming on idle. Went back to the udev rule route. Still all fixed though
 
Old 09-19-2021, 12:58 AM   #13
glats
Member
 
Registered: Mar 2012
Distribution: Artix
Posts: 35

Rep: Reputation: Disabled
I have the same problem with my thinkpad t14. Only my card is a single Renoir. Is this due to some change in the amdgpu driver or kernel?
 
Old 09-19-2021, 04:18 AM   #14
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Original Poster
Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Quote:
Originally Posted by glats View Post
I have the same problem with my thinkpad t14. Only my card is a single Renoir. Is this due to some change in the amdgpu driver or kernel?
For me it started with kernel 5.14. Not sure what commit may have caused this, but the uvdev rule posted above fixes the issue for me.
 
Old 09-30-2021, 08:55 AM   #15
thunderweasel
Member
 
Registered: Mar 2005
Distribution: Void Linux
Posts: 143

Rep: Reputation: 15
Quote:
Originally Posted by Daedra View Post
For me it started with kernel 5.14. Not sure what commit may have caused this, but the uvdev rule posted above fixes the issue for me.
I'm running Void on an Ideapad Flex 5 14ARE05, but experiencing the same thing. Issue introduced with the recent upgrade from the 5.13.9 kernel to the 5.14.8 kernel. amdgpu.backlight=1 kernel param in GRUB CMD restores full screen brightness, including in the pre-boot environment and my disk encryption password prompt, however, it breaks the functionality of the screen backlight keyboard function keys (using acpilight; the brightness - key simply turns off the display, and the brightness + key restores it to 100% full brightness with no steps inbetween; my Fn keys are mapped to exec:xbacklight -inc 10 and exec:xbacklight -dec 10; using JWM, no DE). For the time being I am using the udev rule ITT as a workaround. Screen backlight keyboard function keys work properly with correct stepping, and I get full screen brightness once the kernel has loaded, but it it is still set to its lowest brightness level during my disk encryption password prompt and the first couple lines of the boot sequence. Annoying but tolerable. On the bright side (pun semi-intended), battery life on this kernel is noticeably better.

Last edited by thunderweasel; 09-30-2021 at 09:00 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] When Linux starts monitor dims (Power Saving Mode) Broker824 Linux - Newbie 1 01-04-2011 06:00 PM
Mandriva 2010 - Laptop Function Key Dims Display, Display Auto-Brightens Oceans80 Mandriva 2 08-28-2010 06:12 PM
Screen dims during web videos sburnham79 Ubuntu 4 11-23-2008 01:15 PM
Fullscreen CLI dims out after exit X mkoco Slackware 9 02-18-2008 01:59 AM
Screen dims when it should brighten and brightens when it should dim BCarey Linux - Laptop and Netbook 4 05-07-2007 09:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration