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

Automatic brightness control #188

Closed
mgrouch opened this issue Jul 20, 2022 · 3 comments
Closed

Automatic brightness control #188

mgrouch opened this issue Jul 20, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@mgrouch
Copy link

mgrouch commented Jul 20, 2022

Ideas:

OpenCPN/OpenCPN#2740

OpenCPN/OpenCPN#2427

https://github.com/jonls/redshift

@mgrouch mgrouch added the enhancement New feature or request label Jul 20, 2022
@mgrouch
Copy link
Author

mgrouch commented Jul 25, 2022

@mgrouch
Copy link
Author

mgrouch commented Jul 25, 2022

Somehow pibright works under TwisterOS but doesn't work in BBN

TwisterOS settings:


pi@raspberrypi:~ $ lsmod
Module                  Size  Used by
cmac                   16384  1
rfcomm                 49152  16
bnep                   20480  2
hci_uart               40960  1
btbcm                  16384  1 hci_uart
bluetooth             393216  39 hci_uart,bnep,btbcm,rfcomm
ecdh_generic           16384  2 bluetooth
ecc                    40960  1 ecdh_generic
fuse                  126976  3
cdc_acm                24576  0
joydev                 20480  0
sg                     28672  0
hid_multitouch         24576  0
vc4                   253952  6
cec                    49152  1 vc4
brcmfmac              327680  0
v3d                    73728  7
drm_kms_helper        241664  3 vc4
gpu_sched              45056  1 v3d
brcmutil               20480  1 brcmfmac
sha256_generic         16384  0
cfg80211              761856  1 brcmfmac
rfkill                 32768  7 bluetooth,cfg80211
bcm2835_codec          36864  0
drm                   520192  17 v3d,vc4,gpu_sched,drm_kms_helper
bcm2835_isp            32768  0
v4l2_mem2mem           36864  1 bcm2835_codec
bcm2835_v4l2           40960  0
videobuf2_dma_contig    20480  2 bcm2835_isp,bcm2835_codec
bcm2835_mmal_vchiq     28672  3 bcm2835_isp,bcm2835_codec,bcm2835_v4l2
videobuf2_vmalloc      16384  1 bcm2835_v4l2
videobuf2_memops       16384  2 videobuf2_dma_contig,videobuf2_vmalloc
videobuf2_v4l2         32768  4 bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
videobuf2_common       61440  5 bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
raspberrypi_hwmon      16384  0
videodev              249856  6 bcm2835_isp,bcm2835_codec,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
mc                     45056  6 bcm2835_isp,bcm2835_codec,videobuf2_common,videodev,v4l2_mem2mem,videobuf2_v4l2
snd_bcm2835            28672  4
vc_sm_cma              32768  2 bcm2835_isp,bcm2835_mmal_vchiq
drm_panel_orientation_quirks    16384  1 drm
rpivid_mem             16384  0
snd_soc_core          225280  1 vc4
snd_compress           20480  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_pcm               106496  5 snd_compress,vc4,snd_pcm_dmaengine,snd_bcm2835,snd_soc_core
snd_timer              32768  1 snd_pcm
snd                    77824  13 snd_compress,snd_timer,snd_bcm2835,snd_soc_core,snd_pcm
syscopyarea            16384  1 drm_kms_helper
nvmem_rmem             16384  0
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
backlight              20480  1 drm
uio_pdrv_genirq        16384  0
uio                    20480  1 uio_pdrv_genirq
binfmt_misc            20480  1
ip_tables              28672  0
x_tables               32768  1 ip_tables
ipv6                  495616  44


pi@raspberrypi:~ $ cat /boot/config.txt 
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
gpu_mem=128



pi@raspberrypi:~ $ cat /boot/cmdline.txt 
console=serial0,115200 console=tty1 root=PARTUUID=42dbb780-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

pi@raspberrypi:~ $ tvservice -s
state 0xa [HDMI CUSTOM RGB full unknown AR], 1280x800 @ 60.00Hz, progressive

seems pibright works by modifying style CSS for Gtk3 dynamically

@mgrouch
Copy link
Author

mgrouch commented May 1, 2024

Some more docs

https://wiki.archlinux.org/title/backlight

rockowitz/ddcutil#356

Switching backlight off seems work on pi5 Bookworm

xset dpms force off

ddcutil will fail to set some VCP features if there is a feature enabled on the monitor which already automatically adjusts them (e.g. Dynamic Contrast Ratio or BenQ's Eye Care technology) or Auto Dodge.

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

No branches or pull requests

1 participant