How to link setterm -powerdown to backlight? #605
Replies: 2 comments 1 reply
-
I have chased down the call chain: setterm -powerdown does this: In the kernel: The setterm_command() for 14 does this: vesa_off_interval is used in do_blank_screen where it calls the con_blank callback. For fbdev this callback is fbcon_blank() which calls fb_blank() which in turn calls the fb_blank callback fbtft_fb_blank. So the backlight subsystem is not told to turn off the backlight, which would have happened in fb_notifier_callback(). I think the solution to this problem is to have fbtft_fb_blank() return zero even if the blank callback is not set:
Ufortunately I haven't got the time to test this nor to send a patch to fix it. |
Beta Was this translation helpful? Give feedback.
-
fbtft registers a backlight device if the 'led' gpio is set. This happens in fbtft_register_backlight. Userspace controls this device by writing to the file you mentioned. Call chain: bl_power_store() -> backlight_update_status() -> fbtft_backlight_update_status() fbdev controls the backlight subsystem using the FB_EVENT_BLANK notifier event. |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for this excellent project, and for taking the time to get it merged into the kernel!
I have a Linux framebuffer console (i.e. no X11) using fb_ili9341 and everything is working fine.
I can switch the backlight off using
echo 1 > /sys/class/backlight/fb_ili9341/bl_power
(andecho 0
to turn it back on again).However even if I run
setterm -powerdown 1
to tell the console to switch off after one minute, nothing happens. I can runsetterm -blank force
and the screen will immediately blank (go black) but the backlight remains on (which is normal for-blank
but shows thesetterm
command is working correctly).Is there a way to link in the backlight control with the console's existing power saving functionality?
Beta Was this translation helpful? Give feedback.
All reactions