Desktop control of external monitor settings with ddcutil and vdu_controls

@malcolmlewis just the webui.

So the suggested project is utilities - all the small tools for the shell

@mchnz ok, Iā€™ll branch and clean it up, but you might consider getting osc installed and using that?

I just installed spec-cleaner. Iā€™ll can easily run that.

OSC seems to have a lot of dependencies, and itā€™s not clear from the documentation whether it will drag even more things onto my desktop machine to do builds. Iā€™ve been hesitant to jump in just to package up a python script. I may setup a VM so I donā€™t need to overly pollute my desktop installation.

@malcolmlewis I installed and ran spec-cleaner. One thing I noticed is that it removed the changelog entries. Are changelogs in spec files no longer a thing?

You need spec2changelog script first, let me clean up here and just submit to you :wink:

OK, thanks.

Iā€™m not familiar with submit on the Build Service, could be interesting.

Iā€™ve got a book I need to read, Iā€™ll go outside and take a break :smile:

@mchnz here you go: Request 1060315: Submit vdu_controls - openSUSE Build Service Iā€™m not familiar with pkg build or fedora man page installs, but can get some one to review and help fixā€¦

Thanks. The pkg build worked some time back, but mysteriously stopped working in more recent times.

Seemed to work OK with Fedora earlier - another mystery.

@mchnz itā€™s just the man page install for Fedora, will sort that out.

In the page page there is a submit package option on the left, hit that and complete as follows;

Hit the submit button at the bottomā€¦

I have at least one Fedora user (and possibly others have not given feedback) who downloads the package from the Build Service. I only just fixed it for Fedora a a couple of days back (wrong font dependencies), so itā€™s unfortunate that its broken again so soon.

Iā€™ve done the submit - thanks for the help.

I still see it in Forums Feedback.

@malcolmlewis I figured it out. On Fedora ext_man is not defined.

According to https://en.opensuse.org/openSUSE:Build_Service_prjconf, it should be defined in a prjconf macro, but I just added the definition to the spec file.

Plus I moved the desktop file into the tar proper so there is now only source0.

@mchnz ok, for Fedora itā€™s just a ā€œ*ā€ instead of the macro. Lets wait for review, then can show how to branch, update and submit :wink:

@mchnz Accepted Show utilities / vdu_controls - openSUSE Build Service

1 Like

Iā€™ve released vdu_controls v1.9.2: Mr Smooth.

This version adds the ability to smoothly step the transition from one Preset to another. This is particularly useful for Presets triggered by solar elevation because the adjustment for the changing lighting conditions can be made gradually.

Optional Smooth Value Transitions for presets (issue #29) :

  • The Presets Dialog now includes an option to set a Preset to Transition Smoothly.
  • The tray icon, main panel, and Preset Dialog indicate when a smooth transition is in progress.
  • Transitions are performed by a non-GUI thread, the GUI remains accessible during smooth transitions.
  • A smooth transition can be interrupted by moving the controls being transitioned or invoking a different preset.

The following screenshot shows the additions to the Presets Dialog, explanations follow:

Screenshot_20230223_144147

  1. Transition Smoothly selector:
    • Never transition smoothly,
    • On schedule according to solar elevation,
    • Always by elevation or manual selection on the context menu.
  2. Transition step seconds between stepping the controls (for making the transition even more gradual).
  3. Transition summary type, step-seconds column/button, the button can be used to manually invoke a transition.
    ā–¹Transition On schedule
    ā–øTransition Always

Although transition step sleep speed allows the sleep seconds to be set as low as zero seconds, the effective step interval is limited by actual DDC/CI response times. The achievable step interval for a single monitor setup is likely to be is between 1 and 2 seconds per step, and the time increases linearly for each additional monitor.

Thanks to the help from @malcolmlewis, vdu_controls is now available as an utilities:experimental/development package for OpenSUSE (plus the existing community release for Fedora):

Repos: https://software.opensuse.org/package/vdu_controls
Github: https://github.com/digitaltrails/vdu_controls

As do I.

useless filler due to 20 character minimum post size (quotes donā€™t count towards minimum)

I messed up on that one. I thought I had moved it, but there was a needed extra step that I missed at the time.

vdu_controls 1.10: light-sensor auto brightness adjustment

Features in this release:

  • Added hardware lux metering options from a GY30/BH1750+arduino lux sensor, UNIX-fifo, executable-script.
  • Lux-to-brightness profiles for automatic brightness adjustment.
  • Improved Preset Dialog.

Full details in the the 1.10 Release notes at github

Here is a screenshot of the new LuxDialog for configuring per-VDU automatic brightness adjustment:

lux-profiles
There is a new Global-Setting Lux Metering Enabled, if set, the above dialog will be available from the normal Context-Menu:

Links:

https://software.opensuse.org/package/vdu_controls
https://github.com/digitaltrails/vdu_controls

Light sensor options include a DIY GY30/BH1750+Arduino or DIY scripts. Two sample scripts are included to generate approximate lux values from a Logitech Webcam C270. For further details on hardware options see:

https://github.com/digitaltrails/vdu_controls/blob/master/Lux-metering.md

There have been 4 releases since the post announcing 1.10, full details at:

Github: https://github.com/digitaltrails/vdu_controls/releases

OpenSUSE software: https://software.opensuse.org/package/vdu_controls
This is an experimental/unofficial/development package.

The highlights:

  • A starter set of icons for Presets is now included.
  • Windows, widgets, and icons are now sized relative to each userā€™s default font-size as a way to automatically adjust for desktop DPI and scaling.
  • Menu shortcuts are now available via the ALT key, plus there is a global F1 (help) and F10 (main menu) shortcuts.
  • Sliders are now clickable (for quick value changes).
  • Several options have been added to better integrate with tray use, including for monochrome theming.
  • There are several additional indications of which Preset is active (if any).
  • Numerous small UI improvements.
  • A beta release webcam lux-meter sample-scripts/vlux-meter.py is included for those that want to experiment with automatic brightness control without building a hardware meter. It runs out of the system tray by default. Hereā€™s a screenshot of the metering interface:

  1. Approximate lux value is calculated based on mapping the current webcam brightness:
    • the value is written to output FIFO $HOME/.cache/vlux_fifo
    • the FIFO can read by vdu_controls.
  2. Brightness to Lux mapping sliders with guidance on appropriate values for different ambient conditions.
  3. Selected video device.
  4. Mouse selected brightness sampling crop area, pick a target crop most suitable for measuring ambient light levels.
  5. System tray icon.

More info on webcam lux metering is available at github. Plus the same page includes details for a DIY super-cheap/super-easy/accurate Audino-based meter.

1 Like

Version 2.0 of vdu_controls is now available as an official package for Tumbleweed.

Version 2.0 delivers two major new features:

Ambient-Light-Level slider

Iā€™ve added an Ambient-Light-Level slider - one slider for adjusting brightness on all displays.

300111457-615c0419-0abb-4d55-a8d8-43ffd4f99930

This slider works with the existing Lux Options that allow you to define a ambient-light to brightness mapping for each display (the existing lux options need to be enabled).

Iā€™ve added an immediate-lighting-check button (stopwatch icon in bottom toolbar) and a corresponding context-menu item (when lux options are enabled).

D-Bus Interface for up to 10x faster response times.

Iā€™ve written a related service: ddcutil-service, a D-Bus wrapper for libddcutil . If ddcutil-service is available, vdu_controls will use it instead of the ddcutil command. Version 1.0.0 of ddcuitl-service is now available as an official package for Tumbleweed.

Because the service stays running and initialized it can be up to ten times faster than issuing ddcutil commands. Control-sliders are far more responsive and act more smoothly. Restoring Presets and refreshing the interface are also much faster. The service is implemented in C which eliminates the previous shell+exec overheads incurred when running ddcutil commands.

The service provides some event detection capabilities. Depending on hardware, drivers and cabling, vdu_controls may now receive signals from the service for hotplug and DPMS events. Exactly which events are supported is subject to GPU, GPU driver limitations (AMD generally works out of the box). At a minimum, the service can fallback to polled hotplug detection (defaulting to a 30 second poll, minimum 10 seconds, so change detection by polling is not exactly swift).

The service is not tied to vdu_controls. The service provides access to libddcutil from any language that can communicate with D-Bus. Even shell scripts may access the service via commands such as bustctl and dbus-send:

# Get info about the service:
busctl --user tree com.ddcutil.DdcutilService
busctl --user introspect com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject
busctl --user call com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject com.ddcutil.DdcutilInterface Detect u "0"
# Get brightness (VCP code 16) for monitor 1, then set it to 50:
busctl --user call com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject com.ddcutil.DdcutilInterface GetVcp isyu "1" "" "16" "0"
busctl --user call com.ddcutil.DdcutilService /com/ddcutil/DdcutilObject com.ddcutil.DdcutilInterface SetVcp isyqu "1" "" "16" "50"  "0"

For those interested in implementing simple D-Bus services using glib dbus-glib, the source code for ddcutil-service is a single C file that demonstrates implementing method-calls, property getters/setters, and signals, plus it also demonstrates how to marshall and unmarshall structures, arrays, dictionaries and how to handle generate error-messages. It draws together knowledge from a wide range of examples I managed to find across the web.