Opened 4 months ago

Last modified 4 months ago

#14254 new enhancement

Brightness setting in Screen does not persist across reboots

Reported by: closequarters Owned by: axeld
Priority: normal Milestone: R1
Component: Preferences/Screen Version: R1/Development
Keywords: screen brightness Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

On my Lenovo Thinkpad T430, when I adjust the Brightness setting in the Screen preflet, it does change to the level I set. However, after I reboot my machine, the brightness returns to the full intensity. Until Haiku has an auto-brightness manager, the brightness should be saved in the appropriate settings file upon close of the Screen preflet. When starting up, Haiku should read the setting and apply the brightness setting that was previously being used.

Change History (2)

comment:1 Changed 4 months ago by pulkomandy

Yes, currently the setting is just read back from the video card, there is no storage anywhere. This should probably be stored in the screenmode settings and restored by app_server when setting the video mode.

comment:2 Changed 4 months ago by closequarters

Patch posted: https://review.haiku-os.org/c/haiku/+/362

Note, I started out saving the brightness into the Screen mode settings, which are stored in the kernel/drivers/vesa file. However, upon investigating when that file is loaded, it appears it's loaded by the vesa driver during the booting process. I wasn't sure if setting the brightness there made sense, since at that point in the boot process I am thinking the intel extreme driver isn't loaded yet (not sure).

After looking for other areas of the system in which restoring the brightness setting made sense, I found the Desktop class, which is created by the app_server during the final stages of startup. This seemed like a more suitable location to load and restore brightness since we know all the necessary drivers are ready at this time, but it's still before the user can do anything in the system.

So the Screen preferences app writes the brightness to the Screen_settings file, and then the Desktop reads it back and sets it if applicable.

Note: See TracTickets for help on using tickets.