/gbmonctl

CLI control utility for Gigabyte M32U monitors over USB (to not use OSD sidekick)

Primary LanguageGo

Gigabyte Monitor control

Introduction

A CLI tool to change monitor settings over USB to the Gigabyte M32U

Supported monitors

  • Gigabyte M32U

In theory any Gigabyte Monitor that uses a Realtek HID device (presumably the M28U also uses this) to control it over OSD sidekick should have the same protocol, but this is the only one I own.

To install:

You’ll need libhidapi and libudev – on Debians that’s apt install libhidapi-dev libudev-dev, and on darwin you can use brew install hidapi

go install github.com/kelvie/gbmonctl@latest

To use:

~ ~/go/bin/gbmonctl
ERROR: -prop or -propNum is required

Usage of gbmonctl:
  -n    Dry run: test commands and print instead
  -prop string
        Property to set. Available properties:
                brightness (0-100)
                contrast (0-100)
                sharpness (0-10)
                low-blue-light (0-10)
                        Blue light reduction. 0 means no reduction.
                kvm-switch (0-1)
                        Switch KVM to device 0 or 1
                colour-mode (0-3)
                        0 is cool, 1 is normal, 2 is warm, 3 is user-defined.
                rgb-red (0-255)
                        Red value -- only works if colour-mode is set to 3
                rgb-green (0-255)
                        Green value -- only works if colour-mode is set to 3
                rgb-blue (0-255)
                        Blue value -- only works if colour-mode is set to 3
  -propNum uint
        Property number to set instead of -prop
  -val int
        Value to set property to (default -1)

Examples:

# Set brightness to 50
gbmonctl -prop brightness -val 50

# Set contrast to 50
gbmonctl -prop contrast -v 50

# Set sharpness to 5
gbmonctl -prop sharpness -v 5

# Set colour temperature to 2700K for nighttime
gbmonctl -prop colour-mode -val 3
gbmonctl -prop rgb-red -val 100
gbmonctl -prop rgb-green -val 66
gbmonctl -prop rgb-blue -val 35

When using propNum, I don’t recommend using values that are out of the ranges listed, and this program doesn’t check, so I’m not liable for monitor damage that occurs from this.

Other notes

fwupd seems to delete the hidraw device that this uses, so you will have to disable fwupd and re-plug in your monitor (hit the KVM switch on the side), see kelvie#1

TO-DO

  • Get the rest of the commands
  • Make more user friendly