digitaltrails / vdu_controls

VDU controls - a control panel for monitor brightness/contrast/...
GNU General Public License v3.0
116 stars 4 forks source link

How to disable the Initializer-Preset? #95

Closed denilsonsa closed 1 week ago

denilsonsa commented 2 weeks ago

How can I disable this new feature introduced in 2.1.0?

Added a VDU Initializer-Preset feature to provide a replacement for dead NVRAM. This also provides a way to restore settings not persisted in VDU NVRAM. A VDU's initializer-preset is automatically run if the target VDU is present at startup or is subsequently detected. Any preset that has a name that matches a VDU model and serial-number will be treated as an Initializer-Preset.


My system: two AOC 27" displays of the same model (thus, in the presets I use the combination of the model name and the serial number).

Those displays are connected to two computers: a Linux PC running vdu_controls, and a Mac laptop used for work.

My vdu_controls configuration: https://github.com/denilsonsa/dotfiles/tree/master/gui/.config/vdu_controls

I'm also using midi-pipewire-volume to map a MIDI knob to control the brightness/contrast of the displays. It's very useful. Some other people may end up using midi2input instead.


The problem: every time the display turns off and then turns back on, or every time I switch the input between the two computers, vdu_controls tries to "helpfully" restore one of the presets. Unfortunately, this means it overwrites the manually changed brightness/contrast that I had set up using either midi-pipewire-volume, or using the Mac laptop. Not only this is inconvenient (the display was never on the same brightness I previously left it), but it also goes against the supposed NVRAM degradation prevention (because I had to manually fix/change the brightness/contrast several times today, many more times than I usually do).

(Excuse me if anything in this message doesn't make sense, I'm writing it in a hurry between other tasks.)

digitaltrails commented 2 weeks ago

The configuration you linked has no presets where the VDU model and serial are embedded in the name. But presuming you do have a preset such as Preset_Q27P1B_GNXJ7HA015309.conf, could you just renamed it to Preset_Q27P1B_GNXJ7HA015309_default.conf or similar?

As initializer presets are new and relatively unused, I'm happy to consider changing the implementation to match names such as Preset_Q27P1B_GNXJ7HA015309_init.conf should there be a convincing argument to do so.

If you don't have such a named preset, then perhaps you are encountering a different issue or bug.

denilsonsa commented 1 week ago
ls -l ~/.config/vdu_controls/ ```console $ ls -l -rw-r--r-- 1 denilson denilson 837 2023-01-19 08:56 all.weather -rw-r--r-- 1 denilson denilson 744 2023-01-19 08:56 bad.weather -rw-r--r-- 1 denilson denilson 17 2024-10-07 18:18 current_preset.txt -rw-r--r-- 1 denilson denilson 39 2023-01-19 08:56 good.weather lrwxrwxrwx 1 denilson denilson 65 2024-05-29 00:29 Preset_A-darkest-0-0.conf -> ../../dotfiles/gui/.config/vdu_controls/Preset_A-darkest-0-0.conf lrwxrwxrwx 1 denilson denilson 65 2024-05-29 00:29 Preset_B-darker-0-25.conf -> ../../dotfiles/gui/.config/vdu_controls/Preset_B-darker-0-25.conf lrwxrwxrwx 1 denilson denilson 63 2024-05-29 00:29 Preset_C-dark-0-50.conf -> ../../dotfiles/gui/.config/vdu_controls/Preset_C-dark-0-50.conf lrwxrwxrwx 1 denilson denilson 71 2024-05-29 00:29 Preset_D-medium-dark-25-50.conf -> ../../dotfiles/gui/.config/vdu_controls/Preset_D-medium-dark-25-50.conf lrwxrwxrwx 1 denilson denilson 73 2024-05-29 00:29 Preset_E-medium-bright-50-50.conf -> ../../dotfiles/gui/.config/vdu_controls/Preset_E-medium-bright-50-50.conf lrwxrwxrwx 1 denilson denilson 66 2024-05-29 00:29 Preset_F-bright-75-50.conf -> ../../dotfiles/gui/.config/vdu_controls/Preset_F-bright-75-50.conf lrwxrwxrwx 1 denilson denilson 69 2024-05-29 00:29 Preset_G-brighter-100-50.conf -> ../../dotfiles/gui/.config/vdu_controls/Preset_G-brighter-100-50.conf lrwxrwxrwx 1 denilson denilson 51 2024-05-29 00:29 Q27P1B.conf -> ../../dotfiles/gui/.config/vdu_controls/Q27P1B.conf -rw-r--r-- 1 denilson denilson 921 2024-10-07 09:06 vdu_controls.conf ```

I also tried running vdu_controls --debug. I got a bunch of messages while starting up:

vdu_controls --debug ``` 18:51:39 INFO: VDU Controls 2.1.0 /usr/bin/vdu_controls 18:51:39 INFO: python-locale: ('en_GB', 'UTF-8') Qt-locale: en_GB 18:51:39 INFO: app-style: fusion (detected a dark theme) 18:51:39 INFO: Looking for config file '/home/denilson/.config/vdu_controls/vdu_controls.conf' 18:51:39 INFO: Using config file '/home/denilson/.config/vdu_controls/vdu_controls.conf' 18:51:39 INFO: Logging to stdout 18:51:39 DEBUG: config: vdu_controls.conf [metadata] version = 2.1.0 18:51:39 DEBUG: config: vdu_controls.conf [metadata] timestamp = 2024-10-07 09:06:41.569083+02:00 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] system-tray-enabled = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] hide-on-focus-out = no 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] translations-enabled = no 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] weather-enabled = no 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] schedule-enabled = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] lux-options-enabled = no 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] splash-screen-enabled = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] warnings-enabled = no 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] smart-window = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] monochrome-tray-enabled = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] mono-light-tray-enabled = no 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] debug-enabled = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] syslog-enabled = no 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] dbus-client-enabled = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] dbus-signals-enabled = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] location = 52.4531,4.8136,Zaanstad 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] protect-nvram = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-globals] adjust-for-dpi = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-widgets] brightness = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-widgets] contrast = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-widgets] audio-volume = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-widgets] audio-mute = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-widgets] audio-treble = no 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-widgets] audio-bass = no 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-widgets] audio-mic-volume = no 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-widgets] input-source = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-widgets] power-mode = no 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-widgets] osd-language = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-widgets] color-preset = no 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-widgets] color-temperature = yes 18:51:39 DEBUG: config: vdu_controls.conf [vdu-controls-widgets] enable-vcp-codes = 14 18:51:39 DEBUG: config: vdu_controls.conf [ddcutil-parameters] sleep-multiplier = 1.00 18:51:39 DEBUG: config: vdu_controls.conf [ddcutil-parameters] ddcutil-extra-args = 18:51:39 DEBUG: config: vdu_controls.conf [ddcutil-capabilities] capabilities-override = 18:51:39 INFO: Screen DP-2 18:51:39 INFO: Screen DP-1 18:51:39 DEBUG: Reserve shortcut 'P' 18:51:39 DEBUG: Reserve shortcut 'G' 18:51:39 DEBUG: Reserve shortcut 'S' 18:51:39 DEBUG: Reserve shortcut 'R' 18:51:39 DEBUG: Reserve shortcut 'T' 18:51:39 DEBUG: Reserve shortcut 'H' 18:51:39 DEBUG: Reserve shortcut 'Q' 18:51:39 INFO: native_font_height_pixels=17 18:51:39 INFO: Using monochrome app_icon: monochrome_tray=True mono_light_tray=False 18:51:39 INFO: Using system tray. 18:51:39 INFO: Configuring application (reconfiguring=False)... 18:51:39 DEBUG: configure: try to obtain application_configuration_lock 18:51:39 DEBUG: Holding application_configuration_lock 18:51:39 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_A-darkest-0-0.conf' 18:51:39 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_B-darker-0-25.conf' 18:51:39 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_C-dark-0-50.conf' 18:51:39 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_D-medium-dark-25-50.conf' 18:51:39 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_E-medium-bright-50-50.conf' 18:51:39 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_F-bright-75-50.conf' 18:51:39 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_G-brighter-100-50.conf' 18:51:39 DEBUG: Enabled callback for VDU-connectivity-change D-Bus signals 18:51:39 INFO: ddcutil version (2, 1, 4) (dynamic-sleep=True) - interface 1.0.11 (D-Bus ddcutil-service - libddcutil) 18:51:39 INFO: Using monochrome app_icon: monochrome_tray=True mono_light_tray=False 18:51:39 DEBUG: Detecting connected monitors, looping detection until it stabilises. 18:51:40 DEBUG: checking possible IDs for display 1 18:51:40 DEBUG: checking possible IDs for display 2 18:51:40 DEBUG: Unique key for vdu_number='1' manufacturer='AOC' is (model_name='Q27P1B' main_id='GNXKCHA123704') 18:51:40 DEBUG: Unique key for vdu_number='2' manufacturer='AOC' is (model_name='Q27P1B' main_id='GNXJ7HA015309') 18:51:43 DEBUG: checking possible IDs for display 1 18:51:43 DEBUG: checking possible IDs for display 2 18:51:43 DEBUG: Unique key for vdu_number='1' manufacturer='AOC' is (model_name='Q27P1B' main_id='GNXKCHA123704') 18:51:43 DEBUG: Unique key for vdu_number='2' manufacturer='AOC' is (model_name='Q27P1B' main_id='GNXJ7HA015309') 18:51:43 INFO: Number of detected monitors is stable at 2 (loop=2) 18:51:43 INFO: Initializing controls for vdu_number='1' vdu_model_name='Q27P1B' self.vdu_stable_id='Q27P1B_GNXKCHA123704' 18:51:43 DEBUG: WorkerThread: init VduControllerAsyncSetter from thread_pid()=357795 18:51:43 INFO: env VDU_CONTROLS_UI_IDLE_SECS=0.5 18:51:43 DEBUG: checking for config file '/home/denilson/.config/vdu_controls/Q27P1B_GNXKCHA123704.conf' 18:51:43 DEBUG: checking for config file '/home/denilson/.config/vdu_controls/Q27P1B.conf' 18:51:43 DEBUG: WorkerThread: class_name='VduControllerAsyncSetter' running in thread_pid()=357816 > 18:51:43 INFO: Using config file '/home/denilson/.config/vdu_controls/Q27P1B.conf' 18:51:43 DEBUG: config: Q27P1B.conf [metadata] version = 1.8.3 18:51:43 DEBUG: config: Q27P1B.conf [metadata] timestamp = 2023-01-11 09:30:00.982106+01:00 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] brightness = yes 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] contrast = yes 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] audio-volume = yes 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] audio-mute = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] audio-treble = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] audio-bass = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] audio-mic-volume = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] input-source = yes 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] power-mode = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] osd-language = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] color-preset = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] color-temperature = yes 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] enable-vcp-codes = 14 18:51:43 DEBUG: config: Q27P1B.conf [ddcutil-parameters] sleep-multiplier = 0.75 18:51:43 DEBUG: config: Q27P1B.conf [ddcutil-parameters] ddcutil-extra-args = 18:51:43 DEBUG: config: Q27P1B.conf [ddcutil-capabilities] capabilities-override = Model: Q27P1 MCCS version: 2.1 Commands: Op Code: 01 (VCP Request) Op Code: 02 (VCP Response) Op Code: 03 (VCP Set) Op Code: 07 (Timing Request) Op Code: 0C (Save Settings) Op Code: F3 (Capabilities Request) VCP Features: Feature: 02 (New control value) Feature: 04 (Restore factory defaults) Feature: 05 (Restore factory brightness/contrast defaults) Feature: 08 (Restore color defaults) Feature: 10 (Brightness) Feature: 12 (Contrast) Feature: 14 (Select color preset) Values: 01: sRGB 05: 6500 K 06: 7500 K 08: 9300 K 0b: User 1 Feature: 16 (Video gain: Red) Feature: 18 (Video gain: Green) Feature: 1A (Video gain: Blue) Feature: 60 (Input Source) Values: 01: VGA 02: VGA (switch to) 03: DVI (switch to) 04: DVI (switch to) 05: INCORRECT 0f: DisplayPort (switch to) 11: HDMI (switch to) 300: DVI/HDMI (read-only) 301: DVI/HDMI (read-only) 302: DVI/HDMI (read-only) 305: DisplayPort (read-only) Feature: 62 (Audio speaker volume) Feature: 6C (Video black level: Red) Feature: 6E (Video black level: Green) Feature: 70 (Video black level: Blue) Feature: C8 (Display controller type) Feature: C9 (Display firmware level) Feature: B0 (Settings) Feature: B6 (Display technology type) Feature: D6 (Power mode) Feature: DF (VCP Version) Feature: F8 (Manufacturer specific feature) 18:51:43 DEBUG: Removed Q27P1B audio-mute - not supported by VDU 18:51:43 DEBUG: Removed Q27P1B audio-treble - not supported by VDU 18:51:43 DEBUG: Removed Q27P1B audio-bass - not supported by VDU 18:51:43 DEBUG: Removed Q27P1B audio-mic-volume - not supported by VDU 18:51:43 DEBUG: Removed Q27P1B osd-language - not supported by VDU 18:51:43 DEBUG: Removed Q27P1B color-temperature - not supported by VDU 18:51:43 INFO: Initializing controls for vdu_number='2' vdu_model_name='Q27P1B' self.vdu_stable_id='Q27P1B_GNXJ7HA015309' 18:51:43 DEBUG: checking for config file '/home/denilson/.config/vdu_controls/Q27P1B_GNXJ7HA015309.conf' 18:51:43 DEBUG: checking for config file '/home/denilson/.config/vdu_controls/Q27P1B.conf' 18:51:43 INFO: Using config file '/home/denilson/.config/vdu_controls/Q27P1B.conf' 18:51:43 DEBUG: config: Q27P1B.conf [metadata] version = 1.8.3 18:51:43 DEBUG: config: Q27P1B.conf [metadata] timestamp = 2023-01-11 09:30:00.982106+01:00 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] brightness = yes 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] contrast = yes 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] audio-volume = yes 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] audio-mute = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] audio-treble = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] audio-bass = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] audio-mic-volume = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] input-source = yes 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] power-mode = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] osd-language = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] color-preset = no 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] color-temperature = yes 18:51:43 DEBUG: config: Q27P1B.conf [vdu-controls-widgets] enable-vcp-codes = 14 18:51:43 DEBUG: config: Q27P1B.conf [ddcutil-parameters] sleep-multiplier = 0.75 18:51:43 DEBUG: config: Q27P1B.conf [ddcutil-parameters] ddcutil-extra-args = 18:51:43 DEBUG: config: Q27P1B.conf [ddcutil-capabilities] capabilities-override = Model: Q27P1 MCCS version: 2.1 Commands: Op Code: 01 (VCP Request) Op Code: 02 (VCP Response) Op Code: 03 (VCP Set) Op Code: 07 (Timing Request) Op Code: 0C (Save Settings) Op Code: F3 (Capabilities Request) VCP Features: Feature: 02 (New control value) Feature: 04 (Restore factory defaults) Feature: 05 (Restore factory brightness/contrast defaults) Feature: 08 (Restore color defaults) Feature: 10 (Brightness) Feature: 12 (Contrast) Feature: 14 (Select color preset) Values: 01: sRGB 05: 6500 K 06: 7500 K 08: 9300 K 0b: User 1 Feature: 16 (Video gain: Red) Feature: 18 (Video gain: Green) Feature: 1A (Video gain: Blue) Feature: 60 (Input Source) Values: 01: VGA 02: VGA (switch to) 03: DVI (switch to) 04: DVI (switch to) 05: INCORRECT 0f: DisplayPort (switch to) 11: HDMI (switch to) 300: DVI/HDMI (read-only) 301: DVI/HDMI (read-only) 302: DVI/HDMI (read-only) 305: DisplayPort (read-only) Feature: 62 (Audio speaker volume) Feature: 6C (Video black level: Red) Feature: 6E (Video black level: Green) Feature: 70 (Video black level: Blue) Feature: C8 (Display controller type) Feature: C9 (Display firmware level) Feature: B0 (Settings) Feature: B6 (Display technology type) Feature: D6 (Power mode) Feature: DF (VCP Version) Feature: F8 (Manufacturer specific feature) 18:51:43 DEBUG: Removed Q27P1B audio-mute - not supported by VDU 18:51:43 DEBUG: Removed Q27P1B audio-treble - not supported by VDU 18:51:43 DEBUG: Removed Q27P1B audio-bass - not supported by VDU 18:51:43 DEBUG: Removed Q27P1B audio-mic-volume - not supported by VDU 18:51:43 DEBUG: Removed Q27P1B osd-language - not supported by VDU 18:51:43 DEBUG: Removed Q27P1B color-temperature - not supported by VDU 18:51:43 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_A-darkest-0-0.conf' 18:51:43 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_B-darker-0-25.conf' 18:51:43 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_C-dark-0-50.conf' 18:51:43 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_D-medium-dark-25-50.conf' 18:51:43 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_E-medium-bright-50-50.conf' 18:51:43 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_F-bright-75-50.conf' 18:51:43 DEBUG: Reading preset file '/home/denilson/.config/vdu_controls/Preset_G-brighter-100-50.conf' 18:51:43 INFO: splash_message: 'DDC ID 1\nQ27P1B:GNXKCHA123704' 18:51:43 DEBUG: vcp_value_changed: Q27P1B_GNXKCHA123704 vcp_code='10' 91 origin=EXTERNAL 18:51:43 DEBUG: vcp_value_changed: Q27P1B_GNXKCHA123704 vcp_code='12' 50 origin=EXTERNAL 18:51:43 DEBUG: vcp_value_changed: Q27P1B_GNXKCHA123704 vcp_code='14' 5 origin=EXTERNAL 18:51:43 DEBUG: vcp_value_changed: Q27P1B_GNXKCHA123704 vcp_code='60' 773 origin=EXTERNAL 18:51:43 DEBUG: vcp_value_changed: Q27P1B_GNXKCHA123704 vcp_code='62' 100 origin=EXTERNAL 18:51:43 INFO: splash_message: 'DDC ID 2\nQ27P1B:GNXJ7HA015309' 18:51:44 DEBUG: vcp_value_changed: Q27P1B_GNXJ7HA015309 vcp_code='10' 91 origin=EXTERNAL 18:51:44 DEBUG: vcp_value_changed: Q27P1B_GNXJ7HA015309 vcp_code='12' 50 origin=EXTERNAL 18:51:44 DEBUG: vcp_value_changed: Q27P1B_GNXJ7HA015309 vcp_code='14' 5 origin=EXTERNAL 18:51:44 DEBUG: vcp_value_changed: Q27P1B_GNXJ7HA015309 vcp_code='60' 773 origin=EXTERNAL 18:51:44 DEBUG: vcp_value_changed: Q27P1B_GNXJ7HA015309 vcp_code='62' 0 origin=EXTERNAL 18:51:44 DEBUG: hint_height=668 available_height=2360 self.minimumHeight()=0 18:51:44 INFO: splash_message: 'Checking Presets' 18:51:44 DEBUG: SingletonDialog exists SettingsEditor False 18:51:44 INFO: Checking intialization-preset for Q27P1B_GNXKCHA123704 18:51:44 INFO: Checking intialization-preset for Q27P1B_GNXJ7HA015309 18:51:44 DEBUG: configure: released application_configuration_lock 18:51:44 INFO: Scheduling presets reconfiguring=True 18:51:44 INFO: Will update solar elevation activations tomorrow at 2024-10-09 00:00:00+02:00 (in 308 minutes) 18:51:44 INFO: Completed configuring application ```

Then I locked my screen and pressed Esc to engage the energy saving mode (i.e. monitors are off, system is still awake). I waited a few seconds and then moved my mouse to wake up my monitors again. When they wake up, I can see the brightness/contrast changing by itself (i.e. by vdu_controls) while still on the lock screen. However, no debug message is printed.

I can confirm that behavior even... Oh, wait! No way! This behavior is the same even when vdu_controls is not running! Could this behavior been introduced by something else? Maybe ddcutil-service? Or maybe KDE itself?

Looking at Journald Log, I found:

KSystemLog ``` 08/10/2024 19:13 org_kde_powerdevil Emitting DDCA_Display_Status_Event( 122908.696: DDCA_EVENT_DPMS_ASLEEP, card1-DP-1, dref: Display_Ref[bus /dev/i2c-3], io_path:/dev/i2c-3] 08/10/2024 19:13 org_kde_powerdevil Executed 1 registered callbacks. 08/10/2024 19:13 org_kde_powerdevil Emitting DDCA_Display_Status_Event( 122908.696: DDCA_EVENT_DPMS_ASLEEP, card1-DP-2, dref: Display_Ref[bus /dev/i2c-4], io_path:/dev/i2c-4] 08/10/2024 19:13 org_kde_powerdevil Executed 1 registered callbacks. 08/10/2024 19:13 kscreenlocker_greet pam_systemd_home(kde:auth): New sd-bus connection (system-bus-pam-systemd-home-366234) opened. 08/10/2024 19:13 org_kde_powerdevil Emitting DDCA_Display_Status_Event( 122910.699: DDCA_EVENT_DPMS_AWAKE, card1-DP-1, dref: Display_Ref[bus /dev/i2c-3], io_path:/dev/i2c-3] 08/10/2024 19:13 org_kde_powerdevil Executed 1 registered callbacks. 08/10/2024 19:13 org_kde_powerdevil Emitting DDCA_Display_Status_Event( 122910.699: DDCA_EVENT_DPMS_AWAKE, card1-DP-2, dref: Display_Ref[bus /dev/i2c-4], io_path:/dev/i2c-4] 08/10/2024 19:13 org_kde_powerdevil Executed 1 registered callbacks. 08/10/2024 19:13 org_kde_powerdevil dh=Display_Handle[i2c-3: fd=129], Replacing adjusted sleep multiplier 0.10 with 1.00 for SE_POST_WRITE or SE_POST_SAVE_SETTINGS 08/10/2024 19:13 org_kde_powerdevil dh=Display_Handle[i2c-4: fd=129], Replacing adjusted sleep multiplier 0.10 with 1.00 for SE_POST_WRITE or SE_POST_SAVE_SETTINGS ```

It could be caused by KDE's powerdevil. Now, I need to read its changelog to see if it's a new behavior, and figure out where to tweak it. I couldn't find anything relevant on KDE's System Settings.

digitaltrails commented 1 week ago

Yes, KDE6 introduced dimming. Somewhere under screen saving or locking there is a way to turn it off. I had to do so for my own systems. KDE6 dimming may not be the default in the future - I recently raised concerns about NVRAM overuse in their forums.

digitaltrails commented 1 week ago

The KDE Setting for dimming is under Power Management -> Display Brightness -> Dim Automatically

The discussion I mentioned is this one: powerdevil-in-plasma-6-0-and-beyond.

It was various KDE discussions that spurred to revise vdu_controls to minimize NVRAM writes.

If you're using aged monitors, perhaps review your own use of Presets with the aim of further minimizing NVRAM changes.

denilsonsa commented 1 week ago

The KDE Setting for dimming is under Power Management -> Display Brightness -> Dim Automatically

KDE System Settings

It is already off.

It seems powerdevil is trying to "helpfully" restore the last brightness setting upon detecting a display. I can read in vdu_controls that the brightness gets restored to the value from the Brightness and Color tray applet.

Brightness and Color

I should post in that thread (or in another thread). There seems to be a new behavior in the latest KDE version (well, latest in Manjaro) that I can't figure out how to turn off. Thanks for pointing me there, it is very helpful!

digitaltrails commented 1 week ago

Do you have KScreen2 (Screen Management) enabled? In the past, I've found it tries to do smart things when displays are connected and disconnected. I had to turn it off to prevent it moving windows around. It may be triggering other things too.

Disabling KScreen2 might be worth a try. This can be easily done via the Background Services application which used to be part of Settings, but is now separate, and can be found by using the launcher to search for Background Services.

digitaltrails commented 1 week ago

It seems powerdevil is trying to "helpfully" restore the last brightness setting upon detecting a display. I can read in vdu_controls that the brightness gets restored to the value from the Brightness and Color tray applet.

Somehow I'm not running the Brightness and Color tray applet. Presumably I must have disabled it in the past. Oh yeah, I see in disabled in the System Tray Settings.

denilsonsa commented 1 week ago

So, this behavior is related to KDE's powerdevil daemon, can can be disabled by:

$ systemctl --user edit plasma-powerdevil.service

→ A text editor shows up, please add:
[Service]
Environment="POWERDEVIL_NO_DDCUTIL=1"

$ systemctl --user restart plasma-powerdevil.service

This thread at KDE Discuss has more details. Since this isn't related to vdu_controls, I'm closing this issue. Thank you very much for pointing me to the right direction, and sorry for the noise here.