Sven's {b}logbuch

Themen rund um die Informationstechnik

  • Home
  • Kategorien
    • DIY
    • Hardware
      • Laptop
      • Monitor
      • PC
      • Server
      • Tablet
      • Other
    • Linux
      • Application
      • Bash
      • Gnome Shell Extension
      • Python
      • Other
    • Windows
      • Application
      • Powershell
      • Other
  • Über Mich
  • Kontakt
  • Impressum

Monitor-Control

Gnome Shell Extension
12. Januar 2022

Gnome Shell Extension

Ein Gnome Shell Extension um Einstellungen am Monitor über DDC mittels DDCutil zu übermitteln. Somit können je nach Monitor Hersteller und Modell, Dinge wie Helligkeit, Kontrast, Lautstärke etc. vom Gnome Shell Extension bzw. Desktop aus, eingestellt werden.

Voraussetzungen

  • Gnome 40+
  • ddcutil
  • i2c-dev Kernel Modul

Installation

ZIP Paket herunterladen und im folgenden Verzeichnis entpacken: /home/[USER]/.local/share/gnome-shell/extensions Und ggf. das vom entpacken erstellte Verzeichnis wie folgt umbenennen: Monitor-Control@sven.kramer Einstellungen im Extension Manager setzen

Beschreibung

Welche Möglichkeiten der Monitor bietet, wird wie folgt ermittelt:

ddcutil capabilities

Die Ausgabe sieht beispielsweise bei meinem Gigabyte M28U wie folgt aus:

Model: GIGABYTE
MCCS version: 2.2
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: E3 (Capabilities Reply)
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: 06 (Restore factory geometry defaults)
Feature: 08 (Restore color defaults)
Feature: 0B (Color temperature increment)
Feature: 0C (Color temperature request)
Feature: 10 (Brightness)
Feature: 12 (Contrast)
Feature: 14 (Select color preset)
Values:
01: sRGB
02: Display Native
04: 5000 K
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: 52 (Active control)
Feature: 60 (Input Source)
Values:
01: VGA-1
03: DVI-1
0f: DisplayPort-1
11: HDMI-1
Feature: 87 (Sharpness)
Feature: AC (Horizontal frequency)
Feature: AE (Vertical frequency)
Feature: B2 (Flat panel sub-pixel layout)
Feature: B6 (Display technology type)
Feature: C6 (Application enable key)
Feature: C8 (Display controller type)
Feature: CA (OSD/Button Control)
Feature: CC (OSD Language)
Values:
01: Chinese (traditional, Hantai)
02: English
03: French
04: German
06: Japanese
0a: Spanish
0d: Chinese (simplified / Kantai)
Feature: D6 (Power mode)
Values:
01: DPM: On, DPMS: Off
04: DPM: Off, DPMS: Off
05: Write only value to turn off display
Feature: DF (VCP Version)
Feature: FD (Manufacturer specific feature)
Feature: FF (Manufacturer specific feature)

Für uns sind die VCP-Features interessant, allerdings zum jetzigen Zeitpunkt nur solche Features, welche mit MIN, CURRENT und MAX Werte einzustellen sind. Ich persönlich nutze die Features 10, 12, 87. Dies sind Helligkeit, Kontrast, und Schärfe. Die Ausgabe der einzelnen Features sieht dann wie folgt aus:

ddcutil getvcp 10
VCP code 0x10 (Brightness ): current value = 49, max value = 100
ddcutil getvcp 12
VCP code 0x12 (Contrast ): current value = 49, max value = 100
ddcutil getvcp 87
VCP code 0x87 (Sharpness ): current value = 8, max value = 10

Wie aus den drei Ausgaben zu entnehmen ist, sind bei den ersten beiden Einstellungsbereiche von 0-100 möglich, während beim Sharpness lediglich ein Bereich von 0-10 möglich ist.
Wenn mehr als ein Monitor erkannt wurde, oder aber die Option ‚Show only panel menu instead of status menu items‘ aktiv ist, denn werden die Monitore in einem separaten Menü zusammen gefasst.

Folgende Optionen stehen in der Extension derzeitig zur Verfügung:

  • Debug Mode
    Produziert Meldungen in der Gnome Log
  • Show icons in statusarea
    Zeigt zu den Einstellungsreglern im Systemmenü zusätzlich Icons im Statusfeld (rechts oben), diese können auch mittels Mousehover mit dem Mausrad eingestellt werden, ohne das Menü zu öffnen. Diese Option ist nur funktionell, wenn ein einzelner Monitor betrieben wird, oder aber bei mehreren Monitoren die Option ‚Feature controls all monitor simultaneously‘ aktiv ist
  • Feature controls all monitor simultaneously
    Für alle Monitore ein Regler pro Feature. Sobald beispielsweise die Helligkeit eingestellt wird, wird diese Einstellung an allen Monitoren übermittelt. Sinnvoll wenn man beispielsweise drei gleiche Monitore parallel betreibt.
  • Show only panel menu instead of status menu items
    Anstelle Regler im Statusmenu, wird ein eigenes Panelmenü verwendet

Eine Anmerkung bezüglich den Icons die im Statusmenü vorangestellt sind: Diese liegen im Extension Verzeichnis unter „icons“ im SVG 16×16 Pixel Format vor. Die Extension sucht beispielsweise beim Eintrag „brightness“, das Icon „brightness.svg“ im „icons“ Verzeichnis. Sollte ein Icon nicht gefunden werden, wird ein generelles „missing“ Icon benutzt, in diesem Falle müsste ein eigenes Icon für das Feature erstellt werden.

Und eine weitere Anmerkung bezüglich zwei Helligkeitsregler im Statusmenü: Sollte dies der Fall sein, so wird einer der Helligkeitsregler vermutlich vom Gnome selbst stammen, meist ist dieser sogar ohne Funktion. Dies lässt sich im Grub mittels Kernel Parameter abstellen:
In /etc/default/grub acpi_backlight=none​ wie folgt eintragen:
GRUB_LINUX_DEFAULT="quiet acpi_backlight=none"

Wenn was schief läuft

Die Gnome Shell Extension ist bei mir produktiv im Einsatz, aber falls es doch mal haken sollte:

Debug im Extension aktivieren und die Gnome Log durchsuchen:
journalctl -xe /usr/bin/gnome-shell | grep Monitor-Control

Frage & Antwort

Warum ist diese Extension nicht im Gnome Extension Verzeichnis aufgelistet?
Gnome Extensions lade ich erst in das Gnome Extension Verzeichnis hoch, sobald diese den alpha / beta Status verlassen haben, aus meiner Sicht robust genug sind. Dies geht auch mit den Gnome Extension Developer Richtlinien einher.

In Planung

  • Multimonitor Support First attempt is done
  • Support more features, not only range setting features
  • Scrollable statusarea icons
  • Code cleanup

Bilder

Download & Changelog

Icon

Monitor-Control 1.2.1   13.98 KB   3. Februar 2022  

  • Added Gnome 42 Compatibility
  • Added monitor detection by opening extension preferences
  • Added first attempt for multimonitor support (needs more testing)
  • Added ‚one to rule them all‘ feature, each feature controls all monitors simultaneously
Download


Schreibe einen Kommentar Antworten abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Sven’s {b}logbuch by S. Kramer

Diese Website verwendet Cookies um Dienste anzubieten und Zugriffe zu analysieren. Deine IP-Adresse und dein User-Agent werden zusammen mit Messwerten zur Leistung und Sicherheit freigegeben. So können Nutzungsstatistiken generiert, Missbrauchsfälle erkannt und behoben und die Qualität des Dienstes gewährleistet werden.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
immer aktiv
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDauerBeschreibung
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SPEICHERN & AKZEPTIEREN