Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong path for brightness control on rpi 4 #149

Open
konradmoesch opened this issue Aug 5, 2023 · 4 comments
Open

wrong path for brightness control on rpi 4 #149

konradmoesch opened this issue Aug 5, 2023 · 4 comments

Comments

@konradmoesch
Copy link

Issue

Make sure you are running the latest version before reporting an issue.

Hardware

Device Connection Method Screen Mobile Device Android Auto Version
Raspberry Pi 4 4GB USB Cable Official Raspberry 7" Screen OnePlus Nord v.1.EXAMPLE

Installation Method: Install.sh and rpi.sh

Description of problem:

Brightness of official 7" Touchscreen cannot be changed, although udev rule is written.
Manual change of sys/class/backlight/10-0045/brightness works though

Expected Result:

Brightness should be changeable using the official_rpi brightness plugin

Problem-relevant steps to reproduce:

  1. start dash
  2. try changing brightness
  3. nothing happens

Additional info:

In plugins/brightness/official_rpi/official_rpi.hpp the path has to be changed to sys/class/backlight/10-0045/brightness (was/is sys/class/backlight/rpi_backlight/brightness)

More info: https://forums.raspberrypi.com/viewtopic.php?t=324587

@rsjudka
Copy link
Contributor

rsjudka commented Feb 8, 2024

hmmm I swear I thought this was fixed 😤 i know we have a couple places where we detect which pi is being used... might have to do something like that here

maybe try to enumerate displays or something fancier too

@breakingspell
Copy link
Contributor

breakingspell commented May 6, 2024

As it were, I actually ended up without the vc4-kms-v3d driver that remaps the brightness control when setting up bookworm on an Rpi4, so the mapping fell back to the previous sys/class/backlight/rpi_backlight/brightness. This meant the existing udev rule and path in plugins/brightness/official_rpi/official_rpi.hpp worked for me, but enabling the KMS driver does alter the path to 10-0045 and will require a few lines to address.

Also, I noticed rpi.sh does not properly detect 64-bit Rpi OS to set the brightness udev rule in the first place. This is already fixed in install.sh (just opened a PR for it).

Lastly, I've also found the default slider range is too narrow (76-255).
76 is still fairly bright, setting this to 25 minimum gives me a good highway dim at the bottom end of the slider.

Testing this new range along with toggling the KMS driver off and on to try and funnel in a smart fix to detect what driver/mapping is in place. It works when it's mapped correctly!

@rsjudka
Copy link
Contributor

rsjudka commented May 8, 2024

thanks for the PR, will look at it!

and thanks for the feedback on the brightness, not a dash-user so i dont know how usability of it is :)

@breakingspell
Copy link
Contributor

breakingspell commented May 8, 2024

For sure!
I think i've figured out a solution to source the proper path: less dynamic than intended, but with this specific display we know it will be only one of the two paths.

The brightness range adjustment certainly makes a difference too, I made a late drive the other night and it was perfect at 25 minimum.
I've noted it in the PR as well, but the brightness controls do apply for all displays, not just the specific RPi panel. This could be a problem for users with third party HDMI displays?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants