LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-25-2020, 03:30 AM   #1
AayushBhan
LQ Newbie
 
Registered: Oct 2020
Posts: 4

Rep: Reputation: Disabled
Not able to reduce Laptop Brightness on Ubuntu 20.04


I have a lenovo legion y540 with ubuntu 20.04 LTS on my ssd and windows on the hdd. I'm not able to change the brightness while in ubuntu. I've tried downloading the "Brightness Controller" but using it changes nothing.
I also tried following the following article - https://vitux.com/control-screen-brightness-from-ubuntu-terminal/


However from the above article the output given below for
Code:
xrandr | grep " connected" | cut -f1 -d " "
-
Quote:
xrandr: Failed to get size of gamma for output default
default
The output for
Code:
lspci|grep VGA
is -
Quote:
01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
I also tried
Code:
ls -l /sys/class/backlight
I got
Quote:
total 0
lrwxrwxrwx 1 root root 0 Oct 25 12:22 ideapad -> ../../devices/pci0000:00/0000:00:1f.0/PNP0C09:00/VPC2004:00/backlight/ideapad
I really need to be able to change the brightness. Any sort of help would really be appreciated. Since this is my first post I tried to give as much information as I could that came to my head, if anything else is required do let me know I would update it.

Thanks a lot.
 
Old 10-25-2020, 11:28 AM   #2
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 22 MATE, Peppermint OS-Devuan, EndeavourOS, antiX
Posts: 4,416
Blog Entries: 49

Rep: Reputation: 1644Reputation: 1644Reputation: 1644Reputation: 1644Reputation: 1644Reputation: 1644Reputation: 1644Reputation: 1644Reputation: 1644Reputation: 1644Reputation: 1644
AayushBhan,

Welcome to LQ forums.

I think you need to create or modify the /usr/share/X11/xorg.conf.d/10-nvidia.conf file.

If you don’t already have gedit, then install it:

Code:
sudo apt install gedit
Open or create the file:

Code:
sudo gedit /usr/share/X11/xorg.conf.d/10-nvidia.conf
You then need to add this line, using copy & paste to avoid typing errors:

Option "RegistryDwords" "EnableBrightnessControl=1;"

The OutputClass section should then read:

Code:
Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "RegistryDwords" "EnableBrightnessControl=1;" 
    ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection
Click on Save.
Click on Close.

Then reboot.
 
Old 10-25-2020, 01:11 PM   #3
AayushBhan
LQ Newbie
 
Registered: Oct 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hey BeachBoy,
I tried these steps but they don't seemed to have made any changes. I'm still not able to change the brightness of my screen.


Quote:
Originally Posted by beachboy2 View Post
AayushBhan,

Welcome to LQ forums.

I think you need to create or modify the /usr/share/X11/xorg.conf.d/10-nvidia.conf file.

If you don’t already have gedit, then install it:

Code:
sudo apt install gedit
Open or create the file:

Code:
sudo gedit /usr/share/X11/xorg.conf.d/10-nvidia.conf
You then need to add this line, using copy & paste to avoid typing errors:

Option "RegistryDwords" "EnableBrightnessControl=1;"

The OutputClass section should then read:

Code:
Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "RegistryDwords" "EnableBrightnessControl=1;" 
    ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection
Click on Save.
Click on Close.

Then reboot.
 
Old 10-25-2020, 07:43 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,944
Blog Entries: 28

Rep: Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357
Most of my laptops have had hardware keys or key combinations for adjusting the brightness.

What is the make/model of the laptop?
 
Old 10-26-2020, 01:36 AM   #5
AayushBhan
LQ Newbie
 
Registered: Oct 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hey FrankBell,
My laptop does have keys specifically for changing the brightness, namely - Fn+F6. However, the brightness actually doesn't change even though it shows the status bar moving up and down.
My laptop is the Lenovo Legion Y540 (15) - GTX 1650 4GB Graphics.

Quote:
Originally Posted by frankbell View Post
Most of my laptops have had hardware keys or key combinations for adjusting the brightness.

What is the make/model of the laptop?
 
Old 10-26-2020, 05:17 AM   #6
AayushBhan
LQ Newbie
 
Registered: Oct 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
After a lot of searching around on askUbuntu, I stumbled upon this https://askubuntu.com/questions/1261722/llvmpipe-llvm-10-0-0-256-bits-is-getting-detected-instead-of-nvidia

I realized I was facing this issue as well, maybe this was the cause for the brightness not being able to work with your solution(IDK). So I figured might as well try to fix that first and I just ended up installing ubuntu all over again. I was still facing the brightness issue though the above problem was fixed.
Finally your solution worked with the new installation.

Thanks a ton beachboy2. This really helped me out.


Quote:
Originally Posted by beachboy2 View Post
AayushBhan,

Welcome to LQ forums.

I think you need to create or modify the /usr/share/X11/xorg.conf.d/10-nvidia.conf file.

If you don’t already have gedit, then install it:

Code:
sudo apt install gedit
Open or create the file:

Code:
sudo gedit /usr/share/X11/xorg.conf.d/10-nvidia.conf
You then need to add this line, using copy & paste to avoid typing errors:

Option "RegistryDwords" "EnableBrightnessControl=1;"

The OutputClass section should then read:

Code:
Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "RegistryDwords" "EnableBrightnessControl=1;" 
    ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection
Click on Save.
Click on Close.

Then reboot.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Change brightness percentage that screen brightness keys increase/decrease MozillaUser3172 Slackware 5 03-24-2020 06:07 PM
Can't adjust brightness with function key and can't adjust brightness after suspend. QuarkDev Linux Deepin 2 03-19-2015 10:46 AM
Mint 15 = black screen (brightness = 0) on start up - have to manually set brightness Netnovice Linux Mint 4 01-16-2014 08:46 PM
[SOLVED] Brightness set to zero: moved to http://www.linuxquestions.org/questions/slackware-14/brightness-set Z0K4 Linux - Laptop and Netbook 5 09-15-2011 10:09 AM
Reduce Brightness Further? jsteel Linux - General 1 09-19-2009 08:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:49 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