You are not logged in.

#1 2020-08-17 19:19:21

ShipwreckSiren
Member
Registered: 2020-04-19
Posts: 3

Trying to configure screen brightness but /sys/class/backlight empty

How can I generate a backlight file in order to control screen brightness? My /sys/class/backlight directory is empty.

I'm running Arch Linux 5.8.1 with I3WM on a 2009 Macbook Pro.

This is my second install of Arch. The first one was in March when I was still new to Linux and Arch.

Basically I ended up installing Luke Smith’s LARBS script, and although I liked the aesthetic and keybindings I encountered a lot of power management issues that I couldn’t troubleshoot. With all of the configuration files added with that install I decided I wanted to just erase everything, start with a clean slate, and build up a system to my needs and preferences over time. So here I am.

Install went smooth and I’ve got a lot of power management settings now that do make some difference (thermald, powertop, tlp). My battery does still drain fast but I think it’s an issue of old laptop, old hardware, etc. Plus with Apple products proprietary software is always going to manage their hardware better. So, I’ve given up on thinking it will last as long as it did on OS X.

Anyway, im at a stage of trying to be able to control my screen brightness because that’s a huge power drain. I'm trying to configure my backlight so that I can control screen brightness with the fn keys. When I run xorg-xbacklight it can't detect any outputs with backlight property. Per the Arch Wiki I don’t think xbacklight will work on my system so I’m interested in using light to see how that goes. When I check in /sys/class/backlight I don't have any files.

I'm currently using the Nouveau driver and don't have the legacy Nvidia drivers installed. The Arch wiki says to use the proprietary legacy 340 drivers that I would need to downgrade X. I tried doing that with downgrade package but the last supported version per the wiki is 1.19 and that isn’t even listed as an option for xorg.

I couldn’t tell if the proprietary drivers were a requirement for nvidia-bl so I decided to give that a shot and when I try to install through yay I get a build error saying that I don’t have kernel files for Arch 5.7. I’m guessing the package is out of date for 5.8 which is why I can’t download it with 5.8. Am I supposed to have 5.7 and does having both 5.7 and 5.8 cause an issue?

How can I generate a file in my backlight directory? I’m not sure if I’m supposed to have one or if Nouveau should have installed one.

Offline

#2 2020-08-17 20:19:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Trying to configure screen brightness but /sys/class/backlight empty

Please post the output of `find /sys/devices/ -name brightness`

ShipwreckSiren wrote:

How can I generate a backlight file in order to control screen brightness?

You don't.  Or if you did, it wouldn't do anything useful.  The "files" there are managed by the relevant device drivers and will be present when the driver is working properly.

ShipwreckSiren wrote:

... nvidia-bl so I decided to give that a shot and when I try to install through yay I get a build error saying that I don’t have kernel files for Arch 5.7. I’m guessing the package is out of date for 5.8 which is why I can’t download it with 5.8. Am I supposed to have 5.7 and does having both 5.7 and 5.8 cause an issue?

The package requires linux>=5.8 (edit: oops, it's 3.8, that's ancient).  The problem is almost certainly just that you are still running an older kernel (e.g., haven't rebooted since an update).  Does the version in `uname -a` match that in `pacman -Q linux`?  Please post the output of each of these?

If they match, then try building the package with makepkg (not yay), and post the actual error output here in code tags.

Last edited by Trilby (2020-08-17 22:25:27)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2020-08-17 21:36:08

ShipwreckSiren
Member
Registered: 2020-04-19
Posts: 3

Re: Trying to configure screen brightness but /sys/class/backlight empty

Trilby wrote:

Please post the output of `find /sys/devices/ -name brightness` The package requires linux>=5.8.  The problem is almost certainly just that you are still running an older kernel (e.g., haven't rebooted since an update).  Does the version in `uname -a` match that in `pacman -Q linux`?  Please post the output of each of these?

If they match, then try building the package with makepkg (not yay), and post the actual error output here in code tags.

Thank you for the reply. I have posted below the outputs for the three that were requested. I haven't tried the makepkg yet and will have to read the wiki on it. Is that the same as building from source? Please let me know if I need to adjust any formatting. Thank you!

Find /sys/devices/ -name brightness
/sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
/sys/devices/pci0000:00/0000:00:04.0/usb3/3-6/3-6:1.0/0003:05AC:0236.0004/input/input11/input11::scrolllock/brightness
/sys/devices/pci0000:00/0000:00:04.0/usb3/3-6/3-6:1.0/0003:05AC:0236.0004/input/input11/input11::capslock/brightness
/sys/devices/pci0000:00/0000:00:04.0/usb3/3-6/3-6:1.0/0003:05AC:0236.0004/input/input11/input11::numlock/brightness
/sys/devices/pci0000:00/0000:00:04.0/usb3/3-6/3-6:1.0/0003:05AC:0236.0004/input/input11/input11::kana/brightness
/sys/devices/pci0000:00/0000:00:04.0/usb3/3-6/3-6:1.0/0003:05AC:0236.0004/input/input11/input11::compose/brightness
uname -a:
Linux Arch-Siren 5.8.1-arch1-1 #1 SMP PREEMPT Wed, 12 Aug 2020 18:50:43 +0000 x86_64 GNU/Linux
pacman -Q linux
linux 5.8.1.arch1-1
yay -S nvidia-bl

:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1]  nvidia-bl-0.17.3-10

  1 nvidia-bl                                (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> n
:: PKGBUILD up to date, Skipping (1/1): nvidia-bl
  1 nvidia-bl                                (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> n
:: (1/1) Parsing SRCINFO: nvidia-bl
==> Making package: nvidia-bl 0.17.3-10 (Mon 17 Aug 2020 03:05:56 PM MDT)
==> Retrieving sources...
  -> Found nvidia_bl.c
  -> Found Makefile
  -> Found nvidia_bl.conf
  -> Found nvidia_bl_ml.conf
==> Validating source files with md5sums...
    nvidia_bl.c ... Passed
    Makefile ... Passed
    nvidia_bl.conf ... Passed
    nvidia_bl_ml.conf ... Passed
==> Making package: nvidia-bl 0.17.3-10 (Mon 17 Aug 2020 03:05:58 PM MDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found nvidia_bl.c
  -> Found Makefile
  -> Found nvidia_bl.conf
  -> Found nvidia_bl_ml.conf
==> Validating source files with md5sums...
    nvidia_bl.c ... Passed
    Makefile ... Passed
    nvidia_bl.conf ... Passed
    nvidia_bl_ml.conf ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
==> Sources are ready.
==> Making package: nvidia-bl 0.17.3-10 (Mon 17 Aug 2020 03:06:02 PM MDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
make -C /usr/lib/modules/5.8.1-arch1-1/build SUBDIRS=/home/shipwreck-siren/.cache/yay/nvidia-bl/src modules
make[1]: Entering directory '/usr/lib/modules/5.8.1-arch1-1/build'
mkdir: cannot create directory ‘.tmp_20937’: Permission denied
mkdir: cannot create directory ‘.tmp_20939’: Permission denied
mkdir: cannot create directory ‘.tmp_20941’: Permission denied
mkdir: cannot create directory ‘.tmp_20943’: Permission denied
mkdir: cannot create directory ‘.tmp_20945’: Permission denied
mkdir: cannot create directory ‘.tmp_20947’: Permission denied
mkdir: cannot create directory ‘.tmp_20950’: Permission denied
mkdir: cannot create directory ‘.tmp_20952’: Permission denied
mkdir: cannot create directory ‘.tmp_20954’: Permission denied
mkdir: cannot create directory ‘.tmp_20956’: Permission denied
mkdir: cannot create directory ‘.tmp_20958’: Permission denied
mkdir: cannot create directory ‘.tmp_20960’: Permission denied
mkdir: cannot create directory ‘.tmp_20962’: Permission denied
mkdir: cannot create directory ‘.tmp_20964’: Permission denied
mkdir: cannot create directory ‘.tmp_20966’: Permission denied
mkdir: cannot create directory ‘.tmp_20968’: Permission denied
mkdir: cannot create directory ‘.tmp_20970’: Permission denied
mkdir: cannot create directory ‘.tmp_20972’: Permission denied
mkdir: cannot create directory ‘.tmp_20974’: Permission denied
mkdir: cannot create directory ‘.tmp_20976’: Permission denied
mkdir: cannot create directory ‘.tmp_20978’: Permission denied
mkdir: cannot create directory ‘.tmp_20980’: Permission denied
mkdir: cannot create directory ‘.tmp_20982’: Permission denied
mkdir: cannot create directory ‘.tmp_20984’: Permission denied
mkdir: cannot create directory ‘.tmp_20989’: Permission denied
mkdir: cannot create directory ‘.tmp_20991’: Permission denied
mkdir: cannot create directory ‘.tmp_20993’: Permission denied
mkdir: cannot create directory ‘.tmp_20995’: Permission denied
mkdir: cannot create directory ‘.tmp_20997’: Permission denied
mkdir: cannot create directory ‘.tmp_20999’: Permission denied
mkdir: cannot create directory ‘.tmp_21001’: Permission denied
mkdir: cannot create directory ‘.tmp_21003’: Permission denied
mkdir: cannot create directory ‘.tmp_21005’: Permission denied
mkdir: cannot create directory ‘.tmp_21007’: Permission denied
mkdir: cannot create directory ‘.tmp_21009’: Permission denied
mkdir: cannot create directory ‘.tmp_21011’: Permission denied
mkdir: cannot create directory ‘.tmp_21014’: Permission denied
mkdir: cannot create directory ‘.tmp_21016’: Permission denied
mkdir: cannot create directory ‘.tmp_21018’: Permission denied
mkdir: cannot create directory ‘.tmp_21020’: Permission denied
mkdir: cannot create directory ‘.tmp_21022’: Permission denied
mkdir: cannot create directory ‘.tmp_21024’: Permission denied
mkdir: cannot create directory ‘.tmp_21026’: Permission denied
mkdir: cannot create directory ‘.tmp_21028’: Permission denied
mkdir: cannot create directory ‘.tmp_21030’: Permission denied
mkdir: cannot create directory ‘.tmp_21032’: Permission denied
mkdir: cannot create directory ‘.tmp_21034’: Permission denied
mkdir: cannot create directory ‘.tmp_21036’: Permission denied
mkdir: cannot create directory ‘.tmp_21038’: Permission denied
mkdir: cannot create directory ‘.tmp_21040’: Permission denied
mkdir: cannot create directory ‘.tmp_21042’: Permission denied
mkdir: cannot create directory ‘.tmp_21044’: Permission denied
mkdir: cannot create directory ‘.tmp_21046’: Permission denied
mkdir: cannot create directory ‘.tmp_21048’: Permission denied
mkdir: cannot create directory ‘.tmp_21052’: Permission denied
scripts/Makefile.build:44: arch/x86/entry/syscalls/Makefile: No such file or directory
make[2]: *** No rule to make target 'arch/x86/entry/syscalls/Makefile'.  Stop.
make[1]: *** [arch/x86/Makefile:217: archheaders] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.8.1-arch1-1/build'
make: *** [Makefile:11: default] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
error making: nvidia-bl

Offline

#4 2020-08-17 22:29:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Trying to configure screen brightness but /sys/class/backlight empty

ShipwreckSiren wrote:

I haven't tried the makepkg yet and will have to read the wiki on it. Is that the same as building from source?

Please do read the wiki.  Makepkg builds from source only when yay would.  Yay is an unsupported wrapper for makepkg.  If you don't know how to use makepkg at all, stop using yay ASAP and read the AUR wiki page.

But in this case, the error is in the yay output - though you should still confirm that you get the same error from makepkg.  And the error is completely different from what you reported in your first post.  I just confirmed that I get the same result from makepkg with that AUR package.  But as noted in my edit above - it seems it has not been touched in 4 years.  I just successfully build nvidia-bl-dkms, you should probably use that instead (though I can't test the actual dkms build - there is a comment on the AUR page saying this is failing too).

Last edited by Trilby (2020-08-17 22:36:47)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB