GithubHelp home page GithubHelp logo

davidhi7 / ddcci-plasmoid Goto Github PK

View Code? Open in Web Editor NEW
365.0 365.0 11.0 1.06 MB

KDE Plasma widget to adjust the brightness of multiple external monitors

License: MIT License

Python 50.22% QML 29.61% Shell 20.17%

ddcci-plasmoid's People

Contributors

alikates avatar catericka avatar davidhi7 avatar vistaus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ddcci-plasmoid's Issues

externally-managed-environment: Install ddcci-plasmoid-backend through pipx instead of pip

Hi @davidhi7 ,

It is no longer possible to install ddcci-plasmoid-backend via pip, due to the externally-managed-environment change.

Thanks for adding the pipx support for ddcci-plasmoid-backend.

Installing it via pipx install ddcci-plasmoid-backend works.

But the Display Brightness widget then throws an error message saying:

  • /usr/bin/python3: No module named ddcci-plasmoid-backend

When installing ddcci-plasmoid-backend via pipx, does the "Backend executable command:" line in the Display Brightness widget general settings need to be changed to make it work?

By default it is set to python3 -m ddcci_plasmoid_backend, but this does not work.

Regards

Feature request: make this great widget System Tray aware?

Title says it all. I have many monitors on my workstation and this widget has great practical value for me. My only complaint is an aesthetic one: it looks awkward on the panel when next to the system tray.

ddcci-plasmoid-systemtray-Screenshot_20230414_093808

I don't know what it entails, but would it be possible to make ddcci-plasmoid a system tray component, so that its display enablement/disablement would be available in the system tray config panel, and its panel icon would be grouped with the rest of the system tray items?

system-tray-config-Screenshot_20230414_094345

Please consider a low priority feature request, but a prized one.

Suggestion: allow brute forcing ddcutil commands to "fix" issues on Samsung displays

Hi there, this one will require some explanation.
So I have an older Samsung monitor, specifically 24" CF390. The issue is that DDC/CI communication works sporadically (it's just nowhere near consistent) (similar issue here).

So, the fix:
If you try enough times, at some point, you will get a proper output. As such running all ddcutil commands until one is successful fixes the issue with my display. I did a very basic modification your code and it works. However I'm not experienced enough to implement this properly, so this issue.

If this would be implemented, something like --force option could be used with ddcci_plasmoid_backend to enable this functionality.

my code (only subprocess_wrapper and async_subprocess_wrapper require modification):

# Wrap sync and async subprocess calls for mocking
def subprocess_wrapper(cmd: str) -> CommandOutput:
    logger.debug('Execute command: `' + cmd + '`')
    proc = subprocess.run(cmd.split(' '), capture_output=True)
    stdout = proc.stdout.decode()
    while "DDC communication failed" in stdout:
        proc = subprocess.run(cmd.split(' '), capture_output=True)
        stdout = proc.stdout.decode()
        #print(stdout)
        stderr = proc.stderr.decode()
        command_output = {
            'returnCode': proc.returncode,
            'stdout': stdout,
            'stderr': stderr,
        }

    log_subprocess_output(cmd, command_output)
    if proc.returncode > 0:
        raise subprocess.CalledProcessError(returncode=proc.returncode, cmd=cmd, output=stdout, stderr=stderr)
    return command_output


async def async_subprocess_wrapper(cmd: str) -> CommandOutput:
    logger.debug('Execute command: `' + cmd + '`')
    proc = await asyncio.subprocess.create_subprocess_shell(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    # it's safe to assume that the return code is not None at this point
    return_code: int = 1 if proc.returncode is None else proc.returncode
    stdout, stderr = await proc.communicate()
    stdout = stdout.decode()
    while "DDC communication failed" in stdout:
        proc = await asyncio.subprocess.create_subprocess_shell(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        # it's safe to assume that the return code is not None at this point
        return_code: int = 1 if proc.returncode is None else proc.returncode
        stdout, stderr = await proc.communicate()
        stdout = stdout.decode()
        stderr = stderr.decode()
        command_output = {
            'returnCode': return_code,
            'stdout': stdout,
            'stderr': stderr,
        }

    log_subprocess_output(cmd, command_output)
    if proc.returncode > 0:
        raise subprocess.CalledProcessError(returncode=proc.returncode, cmd=cmd, output=stdout, stderr=stderr)
    return command_output

Widget not showing display name

I followed the instructions and i don't see my external display name in the widget. However, i can adjust using manual commands.

image

Error when doing pip install

Hi, there is this error when I run the command "pip install ddcci-plasmoid-backend" :

ERROR: Could not find a version that satisfies the requirement ddcci-plasmoid-backend (from versions: none)
ERROR: No matching distribution found for ddcci-plasmoid-backend

pip3 --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

Including this plasmoid cause Plasma to stop rendering the Task Bar.

How to reproduce :

  • Install DDCCI Plasmoid
  • Add it to the taskbar
  • Kill and relaunch Plasma
  • Taskbar is no longer visible
  • If the plasma config is change to what it was before adding it, the taskbar is visible again.

System information :

Linux version 6.6.9-arch1-1
plasmashell 5.27.10

Monitors detected, but sliding the brightness slider does nothing

$ ddcutil detect
Display 1
   I2C bus:  /dev/i2c-12
   DRM connector:           card1-DP-1
   EDID synopsis:
      Mfg id:               HKC - UNK
      Model:                27E3Q
      Product code:         10038  (0x2736)
      Serial number:        0000000000001
      Binary serial number: 1 (0x00000001)
      Manufacture year:     2023,  Week: 9
   VCP version:         2.1

Looking at the code, it seems to execute:

$ ddcutil setvcp --bus 12 10 <brightness value>

indeed the command doesn't work on my external monitor. The one that works is this:

$ xrandr --output DP-1 --brightness 0.2

I don't know what's wrong with the ddcutil command.

Feature Request: changeable widget width when in panel

I use your great plasmoid in panel left to system tray. I also have Command Output widget running. The ddcci-plasmoid consumes more width in the panel which makes it look a little odd (I'm a little picky with this ;) ). While I can adjust Command Output plasmoid width in the config ddcci comes with no option / a fixed width. I couldn't even fugure out where to play around in qml code.

Would be great if this can be adjusted or if you can give me a hint where to reduce width to e. g. 80%.

Thanks.

image

Error in widget, "Unsupported operand type(s) for |: 'type' and 'type'" - Possibly Conda related

Python version 3.9.12
ddcutil version 1.4.1

ddcutil detect output

   I2C bus:  /dev/i2c-6
   DRM connector:           card0-DP-1
   EDID synopsis:
      Mfg id:               ACR - Acer Technologies
      Model:                XB271HU
      Product code:         1168  (0x0490)
      Serial number:        #ASNnbwQFBgfd
      Binary serial number: 1663072682 (0x632079aa)
      Manufacture year:     2016,  Week: 32
   VCP version:         2.2

Display 2
   I2C bus:  /dev/i2c-7
   DRM connector:           card0-DP-2
   EDID synopsis:
      Mfg id:               GSM - Goldstar Company Ltd (LG)
      Model:                27GN950
      Product code:         23450  (0x5b9a)
      Serial number:        206NTVS7U671
      Binary serial number: 266671 (0x000411af)
      Manufacture year:     2022,  Week: 6
   VCP version:         2.1

The standalone and system tray widgets both display the same error, which is also seen when running python -m ddcci_plasmoid_backend --debug detect (excluding initial DEBUG line)

DEBUG __main__: Running version 0.1.5 in debug mode
Traceback (most recent call last):
  File "/home/fargonaut/dev/dependencies/anaconda/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/fargonaut/dev/dependencies/anaconda/anaconda3/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/fargonaut/.local/lib/python3.9/site-packages/ddcci_plasmoid_backend/__main__.py", line 97, in <module>
    main()
  File "/home/fargonaut/.local/lib/python3.9/site-packages/ddcci_plasmoid_backend/__main__.py", line 28, in main
    def handle_error(error: str | subprocess.CalledProcessError) -> NoReturn:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

I'm worried it's a conda issue, something I honestly don't know much about, but so far hasn't caused issues with other python scripts. I thought I'd run it by here before I dig deeper.

I looked at #12, but I'm not sure there's a parallel solution here. Any thoughts?

Feature Request - Integration with KDE shortcut system

I have limited knowledge about the KDE shortcut system so please correct me if I'm wrong, but to my understanding it is possible to add custom actions to the "shortcut" section, similar to what latte dock and spectacle did. Therefore it would be nice if this add-on implement actions that allow users to map key sequences of choice to "brightness up" and "brightness down", making the adjustment easier (just like the media keys for audio volume adjustment). It would also be nice if, when the key sequence for bright adjustment is triggered, a pop-up message can be displayed to indicate the adjusted brightness (again, just like the media keys for volume adjustment).

Supported monitor missing ("duplicate" serial numbers?)

This widget is working great, and is a nice improvement over the built-in control.

Issue: it appears to be detecting/showing controls for only two of my three monitors. The third monitor (Display 3 in below output) works with the built-in plasma display brightness control but is missing from this widget.

output of ddcutil detect:

Display 1
   I2C bus:  /dev/i2c-4
   DRM connector:           card0-DP-2
   EDID synopsis:
      Mfg id:               GSM - Goldstar Company Ltd (LG)
      Model:                E2442
      Product code:         XXXXX  (0xXXXX)
      Serial number:        XXXXXXXXXXXX
      Binary serial number: XXXXXX (0xXXXXXXXX)
      Manufacture year:     2013,  Week: 1
   VCP version:         2.1

Display 2
   I2C bus:  /dev/i2c-6
   DRM connector:           card0-HDMI-A-1
   EDID synopsis:
      Mfg id:               GSM - Goldstar Company Ltd (LG)
      Model:                E2342
      Product code:         XXXXX  (0xXXXX)
      Serial number:        
      Binary serial number: XXXXXXXX (0xXXXXXXXX)
      Manufacture year:     2011,  Week: 1
   VCP version:         2.1

Display 3
   I2C bus:  /dev/i2c-8
   DRM connector:           card0-DP-1
   EDID synopsis:
      Mfg id:               PHL - Philips Consumer Electronics Company
      Model:                PHL 243V7
      Product code:         XXXXX  (0xXXXX)
      Serial number:        
      Binary serial number: XXXXX (0xXXXXXXXX)
      Manufacture year:     2020,  Week: 30
   VCP version:         2.2

image

Looking at this code snippet:

# monitors connected to DisplayPort may appear twice. This is apparently related to DisplayPort MST.
# Since the EDID data of both entries is identical, we simply remove duplicate monitors based on their serial
# number
serial_number = get_EDID_value(child, 'Serial number')
if serial_number in found_serial_numbers:
logger.debug(
f'{get_EDID_value(child, "Model")} id={get_monitor_id(child)}: Duplicate monitor found and removed'

I suspect this may have something to do with two of the monitors having no Serial number? (though they do both have a Binary serial number).

Monitor requirements

What monitors should have to make the plasmoid work with them? I have 2 monitors (and 1 projector). They have DCC/CI option enabled, yet ddcutil detect describe them all as "Invalid display"

Invalid display
   I2C bus:  /dev/i2c-3
   DRM connector:           card0-DP-1
   EDID synopsis:
      Mfg id:               BNQ - UNK
      Model:                BenQ GW2760HS
      Product code:         30922  (0x78ca)
      Serial number:        F4E01278SL0
      Binary serial number: 21573 (0x00005445)
      Manufacture year:     2014,  Week: 16
   DDC communication failed

Invalid display
   I2C bus:  /dev/i2c-6
   DRM connector:           card0-HDMI-A-1
   EDID synopsis:
      Mfg id:               NLK - UNK
      Model:                MStar Demo
      Product code:         48  (0x0030)
      Serial number:        
      Binary serial number: 1 (0x00000001)
      Manufacture year:     2014,  Week: 10
   DDC communication failed

Invalid display
   I2C bus:  /dev/i2c-7
   DRM connector:           card0-DVI-D-1
   EDID synopsis:
      Mfg id:               DEL - Dell Inc.
      Model:                DELL E2211H
      Product code:         41074  (0xa072)
      Serial number:        NJ91T24I22KB
      Binary serial number: 842156866 (0x32324b42)
      Manufacture year:     2012,  Week: 16
   DDC communication failed

What am I missing?

Monitor not detected, regression 0.1.10 (0.1.9 works)

  1. ddcutil detect is able to detect the monitors
  2. ddcci_plasmoid_backend detect does see the monitors but bails with ddcci_plasmoid_backend.__main__: a coroutine was expected, got [{'id': 1, 'name': 'LG HDR 4K', 'bus_id': 6, 'brightness': 60}, {'id': 2, 'name': 'LG HDR 4K', 'bus_id': 7, 'brightness': 100}]
  3. ddcci_plasmoid_backend -d set-brightness 6 99 works
  4. same result with ddcutil 1.4.2 and 2.0.0

I am aware of #45, but this is different as the getvcp call works and returns: VCP 10 C 60 100

Regression was introduced with 0.1.10 as version 0.1.9 works as expected.

$ /nix/store/bjjnvhpwri8f9p04k19j2pqhi3sdjx55-ddcci_plasmoid_backend-0.1.10/bin/ddcci_plasmoid_backend -d detect
DEBUG ddcci_plasmoid_backend.__main__: backend version: 0.1.10
DEBUG ddcci_plasmoid_backend.__main__: ddcutil version: 2.0.0
DEBUG ddcci_plasmoid_backend.__main__: argv: /nix/store/bjjnvhpwri8f9p04k19j2pqhi3sdjx55-ddcci_plasmoid_backend-0.1.10/bin/ddcci_plasmoid_backend -d detect
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil detect`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil detect: 0
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil detect: Display 1
   I2C bus:  /dev/i2c-6
   DRM connector:           card0-DP-1
   EDID synopsis:
      Mfg id:               GSM - Goldstar Company Ltd (LG)
      Model:                LG HDR 4K
      Product code:         30471  (0x7707)
      Serial number:        
      Binary serial number: 211020 (0x0003384c)
      Manufacture year:     2023,  Week: 8
   VCP version:         2.1

Display 2
   I2C bus:  /dev/i2c-7
   DRM connector:           card0-DP-2
   EDID synopsis:
      Mfg id:               GSM - Goldstar Company Ltd (LG)
      Model:                LG HDR 4K
      Product code:         30471  (0x7707)
      Serial number:        
      Binary serial number: 210958 (0x0003380e)
      Manufacture year:     2023,  Week: 8
   VCP version:         2.1
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil detect: 

DEBUG ddcci_plasmoid_backend.ddcci: Found 2 entries at root level
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil getvcp --bus 6 --brief 10`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil getvcp --bus 6 --brief 10: 0
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil getvcp --bus 6 --brief 10: VCP 10 C 60 100
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil getvcp --bus 6 --brief 10: 

DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil getvcp --bus 7 --brief 10`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil getvcp --bus 7 --brief 10: 0
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil getvcp --bus 7 --brief 10: VCP 10 C 100 100
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil getvcp --bus 7 --brief 10: 

DEBUG ddcci_plasmoid_backend.__main__: a coroutine was expected, got [{'id': 1, 'name': 'LG HDR 4K', 'bus_id': 6, 'brightness': 60}, {'id': 2, 'name': 'LG HDR 4K', 'bus_id': 7, 'brightness': 100}]
{"command": "detect", "error": "Failed to fetch monitor data"}

$ /nix/store/bjjnvhpwri8f9p04k19j2pqhi3sdjx55-ddcci_plasmoid_backend-0.1.10/bin/ddcci_plasmoid_backend -d set-brightness 6 99
DEBUG ddcci_plasmoid_backend.__main__: backend version: 0.1.10
DEBUG ddcci_plasmoid_backend.__main__: ddcutil version: 2.0.0
DEBUG ddcci_plasmoid_backend.__main__: argv: /nix/store/bjjnvhpwri8f9p04k19j2pqhi3sdjx55-ddcci_plasmoid_backend-0.1.10/bin/ddcci_plasmoid_backend -d set-brightness 6 99
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil setvcp --bus 6 10 99`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil setvcp --bus 6 10 99: 0
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil setvcp --bus 6 10 99: 
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil setvcp --bus 6 10 99: 

{"command": "set-brightness", "value": {"bus_id": 6, "brightness": 99}}

Option to disable search for duplicate monitors (Bug - only one display is shown if they have the same model/serial number)

I have 2 relatively cheap 4k panels of the same model, but I am only shown 1 monitor for which to adjust brightness.

ddcci

I'm guessing (without having looked at the code) this has to do with the fact that they have the same serial number.

Display 1
   I2C bus:  /dev/i2c-6
   DRM connector:           card0-DP-1
   EDID synopsis:
      Mfg id:               HKC - UNK
      Model:                N07
      Product code:         10019  (0x2723)
      Serial number:        0000000000001
      Binary serial number: 0 (0x00000000)
      Manufacture year:     2023,  Week: 4
   VCP version:         2.1

Display 2
   I2C bus:  /dev/i2c-7
   DRM connector:           card0-DP-2
   EDID synopsis:
      Mfg id:               HKC - UNK
      Model:                N07
      Product code:         10019  (0x2723)
      Serial number:        0000000000001
      Binary serial number: 0 (0x00000000)
      Manufacture year:     2023,  Week: 4
   VCP version:         2.1

Just to add - this machine used to have 2 identical Dell monitors, but with those I could adjust the brightness of each monitor individually as expected.

Screen Brightness dimming automatically upon playing Youtube Videos

So, I've noticed my screen dimming noticeably below the intended setting whenever I play a Youtube Video. After closing the video, I need to click within the widgets brightness slider again on the same spot it was originally left on in order for the monitor to brighten up again.

I use an Nvidia GPU btw, and otherwise the widget works great.

Support `--noverify` option

I have one display which requires the --noverify option in order to accept the brightness value.
I would propose adding text field in the configuration window to pass additional arguments to ddcutil.

Monitor not detected

This monitor is detected by ddcutil detect, and I am able to control the brightness with ddcutil setvcp 10 <value>, but python3 -m ddcci_plasmoid_backend detect returns: {"command": "detect", "value": []}

Debug Log:

DEBUG __main__: backend version: 0.1.8
DEBUG __main__: ddcutil version: 1.4.1
DEBUG __main__: argv: /home/ezra/.local/lib/python3.11/site-packages/ddcci_plasmoid_backend/__main__.py --debug-log /tmp/dddebug detect
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil detect`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil detect: 0
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil detect: Invalid display
   I2C bus:  /dev/i2c-17
   DRM connector:           card2-eDP-2
   EDID synopsis:
      Mfg id:               TMX - Thermotrex Corporation
      Model:                TL140ADXP01
      Product code:         5249  (0x1481)
      Serial number:        
      Binary serial number: 0 (0x00000000)
      Manufacture year:     2021,  Week: 29
   DDC communication failed
   This is an eDP laptop display. Laptop displays do not support DDC/CI.

Display 1
   I2C bus:  /dev/i2c-19
   DRM connector:           card2-DP-3
   EDID synopsis:
      Mfg id:               GGL - Google Inc.
      Model:                GOOGLE JN32A
      Product code:         58156  (0xe32c)
      Serial number:        00110082
      Binary serial number: 16843009 (0x01010101)
      Manufacture year:     2020,  Week: 11
   VCP version:         2.1
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil detect: 

DEBUG ddcci_plasmoid_backend.ddcci: Found 2 entries at root level
DEBUG ddcci_plasmoid_backend.ddcci: Key Invalid display does not match pattern for valid display, so skip it
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil getvcp --bus 19 --brief 10`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil getvcp --bus 19 --brief 10: 1
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil getvcp --bus 19 --brief 10: VCP 10 ERR
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil getvcp --bus 19 --brief 10: 

DEBUG __main__: Command 'ddcutil getvcp --bus 19 --brief 10' returned non-zero exit status 1.
DEBUG __main__: Detected 0 working monitor busses, 1 non-working bus.

Unable to adjust multiple (all) monitors simultaneously

Hi @davidhi7 ,

Thanks a lot for this useful app.

When using more than one monitor, ddcci-plasmoid requires to adjust multiple sliders, one after another.

It would be more convenient if there would be an option to allow to adjust multiple (all) monitors simultaneously, i.e. with one slider that controls multiple (all) monitors.

Regards

running pip install --user ddcci-plasmoid-backend give an error that I can't get arround

EDIT: Nevermind
I ran pip install ddcci-plasmoid-backend --break-system-packages and it worked. Could you please add that in the readme file for arch users, or whomever you think would get this message?

I used to be able to install it just fine, but now the system is not liking pip and it throws this error when I run pip install ddcci-plasmoid-backend

This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
   python-xyz', where xyz is the package you are trying to
   install.
   
   If you wish to install a non-Arch-packaged Python package,
   create a virtual environment using 'python -m venv path/to/venv'.
   Then use path/to/venv/bin/python and path/to/venv/bin/pip.
   
   If you wish to install a non-Arch packaged Python application,
   it may be easiest to use 'pipx install xyz', which will manage a
   virtual environment for you. Make sure you have python-pipx
   installed via pacman.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

I Have installed pip and tried - still failed
I have used pipx (it was suggested when I searched) - still failed
Not sure what else I can do to install the ddcci-plasmoid-backend . It is not available anywhere to install

Ignore specific monitors

Hi,

is it possible to ignore certain monitors in the widget? I have an issue with internal display which flickers everytime DDC is used, so this widget causes this flicker every minute.

Is it possible to ignore a display so it is not queried at all? There are no settings for this available in the widget nor any option in the backend as far as I can see.

IMO it would be sufficient to add some flags to the backend, so I could add them in the widget settings.

Sometimes im getting an error

% ddcci_plasmoid_backend detect
Traceback (most recent call last):
  File "/home/sandorex/.local/bin/ddcci_plasmoid_backend", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/sandorex/.local/pipx/venvs/ddcci-plasmoid-backend/lib/python3.11/site-packages/ddcci_plasmoid_backend/__main__.py", line 102, in main
    print(json.dumps({
          ^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode
    return _iterencode(o, 0)
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 180, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type CalledProcessError is not JSON serializable

Screenshot_20230713_211803

Concurrently executed ddcutil getvcp lead to sporadic undetected monitor

I have two identical monitors and only one of them is detected. The issue seems to be the concurrently executed ddcutil getvcp which lead to an error which renders one monitor undetected.

Output from python3 -m ddcci_plasmoid_backend -d detect:

DEBUG __main__: backend version: 0.1.8
DEBUG __main__: ddcutil version: 1.4.1
DEBUG __main__: argv: /home/christian-anke/.local/lib/python3.11/site-packages/ddcci_plasmoid_backend/__main__.py -d detect
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil detect`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil detect: 0
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil detect: Invalid display
   I2C bus:  /dev/i2c-12
   DRM connector:           card0-eDP-1
   EDID synopsis:
      Mfg id:               SHP - Sharp Corporation
      Model:                
      Product code:         5329  (0x14d1)
      Serial number:        
      Binary serial number: 0 (0x00000000)
      Manufacture year:     2020,  Week: 4
   DDC communication failed
   This is an eDP laptop display. Laptop displays do not support DDC/CI.

Phantom display
   I2C bus:  /dev/i2c-13
   DRM connector:           card0-DP-1
   EDID synopsis:
      Mfg id:               MSI - Microstep
      Model:                MSI G241
      Product code:         15268  (0x3ba4)
      Serial number:        
      Binary serial number: 803 (0x00000323)
      Manufacture year:     2021,  Week: 14
   DDC communication failed
   Use non-phantom device bus /dev/i2c-16

Display 1
   I2C bus:  /dev/i2c-16
   DRM connector:           card0-DP-4
   EDID synopsis:
      Mfg id:               MSI - Microstep
      Model:                MSI G241
      Product code:         15268  (0x3ba4)
      Serial number:        
      Binary serial number: 803 (0x00000323)
      Manufacture year:     2021,  Week: 14
   VCP version:         2.1

Display 2
   I2C bus:  /dev/i2c-17
   DRM connector:           card0-DP-5
   EDID synopsis:
      Mfg id:               MSI - Microstep
      Model:                MSI G241
      Product code:         15268  (0x3ba4)
      Serial number:        
      Binary serial number: 120 (0x00000078)
      Manufacture year:     2020,  Week: 44
   VCP version:         2.1
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil detect: 

DEBUG ddcci_plasmoid_backend.ddcci: Found 4 entries at root level
DEBUG ddcci_plasmoid_backend.ddcci: Key Invalid display does not match pattern for valid display, so skip it
DEBUG ddcci_plasmoid_backend.ddcci: Key Phantom display does not match pattern for valid display, so skip it
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil getvcp --bus 16 --brief 10`
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil getvcp --bus 17 --brief 10`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil getvcp --bus 16 --brief 10: 1
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil getvcp --bus 16 --brief 10: No monitor detected on bus /dev/i2c-16
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil getvcp --bus 16 --brief 10: 

DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil getvcp --bus 17 --brief 10: 1
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil getvcp --bus 17 --brief 10: VCP 10 C 100 100
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil getvcp --bus 17 --brief 10: 

DEBUG __main__: Command 'ddcutil getvcp --bus 16 --brief 10' returned non-zero exit status 1.
DEBUG __main__: Detected 1 working monitor bus, 1 non-working bus.
{"command": "detect", "value": [{"id": 2, "name": "MSI G241", "bus_id": 17, "brightness": 100}]}

And this can be reproduced with simple shell: ddcutil getvcp --bus 16 --brief 10 & ddcutil getvcp --bus 17 --brief 10

[1] 16898
No monitor detected on bus /dev/i2c-16
VCP 10 C 100 100
[1]+  Exit 1                  ddcutil getvcp --bus 16 --brief 10

Were as executing them in sequence makes the error safely disappear: ddcutil getvcp --bus 16 --brief 10; ddcutil getvcp --bus 17 --brief 10

VCP 10 C 100 100
VCP 10 C 100 100

It might be better to avoid the async execution here.

Monitor detection issue after updating ddcutil to 2.0.0

After ddcutil got updated to 2.0.0, the plasmoid is no longer detecting my monitor.
The output of ddcutil detect

busno=6, Feature 0x41 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
busno=6, Feature 0xdd should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
busno=6, Feature 0x00 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
Display 1
   I2C bus:  /dev/i2c-6
   DRM connector:           card1-DP-1
   EDID synopsis:
      Mfg id:               DEL - Dell Inc.
      Model:                DELL P2418D
      Product code:         53441  (0xd0c1)
      Serial number:        
      Binary serial number: 
      Manufacture year:     2019,  Week: 4
   VCP version:         2.1

The output of ddcci_plasmoid_backend -d detect

DEBUG ddcci_plasmoid_backend.__main__: backend version: 0.1.8
DEBUG ddcci_plasmoid_backend.__main__: ddcutil version: 2.0.0
DEBUG ddcci_plasmoid_backend.__main__: argv: /home/oleksandr/.local/bin/ddcci_plasmoid_backend -d detect
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil detect`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil detect: 0
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil detect: busno=6, Feature 0x41 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
busno=6, Feature 0xdd should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
busno=6, Feature 0x00 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
Display 1
   I2C bus:  /dev/i2c-6
   DRM connector:           card1-DP-1
   EDID synopsis:
      Mfg id:               DEL - Dell Inc.
      Model:                DELL P2418D
      Product code:         53441  (0xd0c1)
      Serial number:        
      Binary serial number: 
      Manufacture year:     2019,  Week: 4
   VCP version:         2.1
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil detect: 

DEBUG ddcci_plasmoid_backend.ddcci: Found 4 entries at root level
DEBUG ddcci_plasmoid_backend.ddcci: Key busno=6, Feature 0x41 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64 does not match pattern for valid display, so skip it
DEBUG ddcci_plasmoid_backend.ddcci: Key busno=6, Feature 0xdd should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64 does not match pattern for valid display, so skip it
DEBUG ddcci_plasmoid_backend.ddcci: Key busno=6, Feature 0x00 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64 does not match pattern for valid display, so skip it
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil getvcp --bus 6 --brief 10`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil getvcp --bus 6 --brief 10: 1
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil getvcp --bus 6 --brief 10: busno=6, Feature 0x41 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
busno=6, Feature 0xdd should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
busno=6, Feature 0x00 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
VCP 10 C 40 100
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil getvcp --bus 6 --brief 10: 

DEBUG ddcci_plasmoid_backend.__main__: too many values to unpack (expected 5)
DEBUG ddcci_plasmoid_backend.__main__: Detected 0 working monitor busses, 1 non-working bus.
{"command": "detect", "value": []}

I suspect the issue might be caused by unexpected warnings which are present in the output. But I'm not sure if this is something that should be addressed in ddcutil, or maybe ddcci_plasmoid_backend can simply ignore them

Widget not showing any monitors but an error

I am having some strange issue with this widget. Installed it following the instructions on the repo but getting "Unable to parse error response" error on the widget itself. When trying to run "ddcutil detect" I get output as follows:

Invalid display
I2C bus: /dev/i2c-5
DRM connector: card0-eDP-1
EDID synopsis:
Mfg id: LEN - Lenovo Group Limited
Model:
Product code: 16570 (0x40ba)
Serial number:
Binary serial number: 0 (0x00000000)
Manufacture year: 2018, Week: 0
DDC communication failed
This is an eDP laptop display. Laptop displays do not support DDC/CI.
Display 1
I2C bus: /dev/i2c-6
DRM connector: card0-DP-1
EDID synopsis:
Mfg id: GSM - Goldstar Company Ltd (LG)
Model: LG HDR 4K
Product code: 30471 (0x7707)
Serial number:
Binary serial number: 538649 (0x00083819)
Manufacture year: 2020, Week: 7
VCP version: 2.1

I am also able to change settings of the monitor using ddcutil and dddcontrol. I got the same error both under Manjaro and Kubuntu

Unexpected ddcutil output with nvidia card

I own an nvidia GT440 and and ddcutil outputs this additional string each time it runs:
(is_nvidia_einval_bug ) nvida/i2c-dev bug encountered. Forcing future io I2C_IO_STRATEGY_FILEIO. Retrying

The code which parses the output of ddcutil fails when it encounters the nvidia warning.
To make it work on my machine I patched async_subprocess_wrapper and subprocess_wrapper functions:
stdout = stdout.decode().replace('(is_nvidia_einval_bug ) nvida/i2c-dev bug encountered. Forcing future io I2C_IO_STRATEGY_FILEIO. Retrying\n', '')

Feature Request - support integrating into system tray

You're a real life-saver - this is great!!

What I would like if possible is to have the applet show in the system tray rather than having to take up a whole "row" on my panel (see attached).

Screenshot_20230410_100455

I'm not sure if all that's needed is a metadata.desktop file with X-Plasma-NotificationArea=true.

Unable to parse error response

I, have nvidia rtx A4000 so I copied this file : 90-nvidia-i2c.conf

   Driver "nvidia"
   Identifier "Dev0"
   Option     "RegistryDwords"  "RMUseSwI2c=0x01; RMI2cSpeed=100"
   # solves problem of i2c errors with nvidia driver
   # per https://devtalk.nvidia.com/default/topic/572292/-solved-does-gddccontrol-work-for-anyone-here-nvidia-i2c-monitor-display-ddc/#4309293
EndSection

to

/usr/share/ddcutil/data

and this is the final result :
image

Add support for contrast...

I love this widget. It's very useful.

It would be great if I could also change the contrast on my monitor somehow. Or if this is supported already, if it was made more clear how to do it in the documenation.

Thanks

Feature request - set the brigntess levels for different periods of the day

Hi, thanks for creating this plasmoid.

I'd like to be able to set the brightness to different levels depending on the time of day. This may be similar to how when Plasma's Night Color Switching times setting is configured with the Custom times option the user can enter Begin night color at: and Start day color at: values.

I often find that although the custom times I have set for Night Color have kicked in my monitor is still way too bright in the afternoon/evening and I have to turn the brightness down. I think a set-and-forget option to handle this automatically would be a great addition.

Support for dimming integrated screens (Laptop monitors, etc)

I'm not a huge nerd on linux, so forgive me for sounding foolish if this is already possible;

I already have the plugin installed, it functions beautifully on my DDC/CI monitor- though the extra functionality of being able to change my laptop screen brightness in the same menu would also be incredibly nice- perhaps similarly to how Monitorian on windows handles this?

A plugin I found that does this is Display Brightness Control, which can actually put the display brightness below what it typically is.

Anyways~! Just thought I'd put all this out there!~ Love your program. I'm glad it's on the plugin store! (Been looking for something like this for KDE for a while)

"OSError: [Errno 25]: Inappropriate ioctl for device" in widget

On my machine (Arch Linux, KDE Plasma 5.27.4, X11), the backend script throws the following error on os.getlogin() at line 46 of __main__.py, when run by the widget.

image

This does not occur when running the backend script from a terminal. Seems that the problem would stem from os.getlogin() being called outside a login shell.

Using os.environ["USER"] instead of os.getlogin() is a more robust way of getting the current login username according to a couple of threads online, such as https://stackoverflow.com/a/48346349. Making this modification resolves the issue for me.

Btw, thanks for making this! It's just what I've been looking for.

Feature request - increase/decrease brightness with mouse wheel

First of all, you did a great job with your widget, it should definitely be included in plasma by default! I was looking for a widget like this for so long, tried many, but none of them worked like yours. Very simple and easy but does its job perfectly!

I have a feature request that's common for plasma widgets. It's the ability to increase/decrease the value by pointing the mouse to the tray icon and scrolling with the mouse wheel. We see this feature in the audio devices widget or the battery and brightness widget so it would be really beneficial to have it standardized in your widget also. It saves from unnecessary clicking :-)

Unable to parse error message

I've got another unable to parse error message error.
What's notable is that my second display does not have a serial number, I think that might be related.

python3.10 -m ddcci_plasmoid_backend --debug detect
DEBUG __main__: Run in debug mode
DEBUG __main__: Command: detect
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil detect`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil detect: 0
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil detect: Invalid display
   I2C bus:             /dev/i2c-2
   EDID synopsis:
      Mfg id:           ENC
      Model:            FS2434
      Serial number:    25670074
      Manufacture year: 2014
      EDID version:     1.3
   DDC communication failed

Display 1
   I2C bus:             /dev/i2c-4
   EDID synopsis:
      Mfg id:           GSM
      Model:            24MB56
      Serial number:    
      Manufacture year: 2012
      EDID version:     1.3
   VCP version:         2.1

Display 2
   I2C bus:             /dev/i2c-7
   EDID synopsis:
      Mfg id:           BNQ
      Model:            ZOWIE XL LCD
      Serial number:    9AJ01919SL0
      Manufacture year: 2018
      EDID version:     1.4
   VCP version:         2.2
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil detect: Open failed for /dev/usb/hiddev4: errno=EACCES(13): Permission denied
Open failed for /dev/usb/hiddev5: errno=EACCES(13): Permission denied

DEBUG ddcci_plasmoid_backend.ddcci: Found 3 entries at root level
DEBUG ddcci_plasmoid_backend.ddcci: Key Invalid display does not match pattern for valid display, so skip it
Traceback (most recent call last):
  File "/usr/lib64/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/user/.local/lib/python3.10/site-packages/ddcci_plasmoid_backend/__main__.py", line 49, in <module>
    result = asyncio.run(ddcci.detect())
  File "/usr/lib64/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/user/.local/lib/python3.10/site-packages/ddcci_plasmoid_backend/ddcci.py", line 79, in detect
    binary_serial_number=get_EDID_value(child, 'Binary serial number')
  File "/home/user/.local/lib/python3.10/site-packages/ddcci_plasmoid_backend/ddcci.py", line 97, in get_EDID_value
    return node.child_by_key['EDID synopsis'].child_by_key[value].value
KeyError: 'Binary serial number'
ddcutil detect
   I2C bus:             /dev/i2c-2
   EDID synopsis:
      Mfg id:           ENC
      Model:            FS2434
      Serial number:    25670074
      Manufacture year: 2014
      EDID version:     1.3
   DDC communication failed

Display 1
   I2C bus:             /dev/i2c-4
   EDID synopsis:
      Mfg id:           GSM
      Model:            24MB56
      Serial number:    
      Manufacture year: 2012
      EDID version:     1.3
   VCP version:         2.1

Display 2
   I2C bus:             /dev/i2c-7
   EDID synopsis:
      Mfg id:           BNQ
      Model:            ZOWIE XL LCD
      Serial number:    9AJ01919SL0
      Manufacture year: 2018
      EDID version:     1.4
   VCP version:         2.2

python backend with conda

Thanks David for taking the time to do what I had planned for a long time.

I solved the issue myself, but posting it for others.

The symptoms:

When installing the plamoid (and the python backend) on my system (openSuse TW) with conda, the plasmoid was not able to find the python module (the error in the plasmoid is "Unable to parse error message").

The problem:

This is because with conda installed, the python used by default is the python from your "base" environment. However in my case, because the base environment was python3.7 and ddcci_plasmoid_backend requires 3.10, pip installed it in the system python (in /usr/lib/python3.10/).

The solution

Update the conda "base" environement to 3.10 (conda update -n base python) and this time pip installs in the right location.

Discussion

This is not a super elegant solution anyways, as it doesn't make much sense to install the backend for a plasmoid in a user-specific conda env, so I'm kind of opening the discussion here:
how can we get the plasmoid to run using the system python (ie /usr/bin/python) so that we can just conda deactivate && pip install ddcci_plasmoid_backend or even better, have a rpm package containing the whole plasmoid ?

Support for setting --sleep-multiplier values

I would like to properly implement support for setting --sleep-multiplier 2.0 in the ddcci calls, e.g. ddcutil getvcp -d 1 -v --sleep-multiplier 2.0 10. This sleep multiplier is required to communicate with my HP z27 monitor from an AMD-based laptop.

What would be the best way to go about implementing this?

Ubuntu 22.04 - i2c included in Kernel instead of module

The command on the readme doesn't show i2c-dev to be loaded if it's compiled into the kernel.
lsmod doesn't return anything, despite i2c-dev being ready to use:

$ lsmod | grep i2c_dev
$ grep I2C_CHARDEV /boot/config-$(uname -r)
CONFIG_I2C_CHARDEV=y
$

It took me a while to understand that I was looking for another error.
Please include a note on the readme.
More about this on a question on askubuntu.com.

Incorrect selection of tiled monitor

When I use ddcci_plasmoid_backend on my tiled LG 5K monitor, the wrong "submonitor" seems to be selected for control:

$ ddcci_plasmoid_backend -d detect
DEBUG ddcci_plasmoid_backend.__main__: backend version: 0.1.6
DEBUG ddcci_plasmoid_backend.__main__: ddcutil version: 1.4.1
DEBUG ddcci_plasmoid_backend.__main__: argv: /usr/bin/ddcci_plasmoid_backend -d detect
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil detect`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil detect: 0
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil detect: Invalid display
   I2C bus:  /dev/i2c-16
   DRM connector:           card0-eDP-1
   EDID synopsis:
      Mfg id:               SHP - Sharp Corporation
      Model:
      Product code:         5399  (0x1517)
      Serial number:
      Binary serial number: 0 (0x00000000)
      Manufacture year:     2021,  Week: 10
   DDC communication failed
   This is an eDP laptop display. Laptop displays do not support DDC/CI.

Display 1
   I2C bus:  /dev/i2c-19
   DRM connector:           card0-DP-3
   EDID synopsis:
      Mfg id:               GSM - Goldstar Company Ltd (LG)
      Model:                LG HDR 5K
      Product code:         30497  (0x7721)
      Serial number:        106NTWGDP049
      Binary serial number: 465049 (0x00071899)
      Manufacture year:     2021,  Week: 6
   VCP version:         Detection failed

Display 2
   I2C bus:  /dev/i2c-20
   DRM connector:           card0-DP-4
   EDID synopsis:
      Mfg id:               GSM - Goldstar Company Ltd (LG)
      Model:                LG HDR 5K
      Product code:         30497  (0x7721)
      Serial number:        106NTWGDP049
      Binary serial number: 465049 (0x00071899)
      Manufacture year:     2021,  Week: 6
   VCP version:         2.1
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil detect:

DEBUG ddcci_plasmoid_backend.ddcci: Found 3 entries at root level
DEBUG ddcci_plasmoid_backend.ddcci: Key Invalid display does not match pattern for valid display, so skip it
DEBUG ddcci_plasmoid_backend.ddcci: LG HDR 5K id=2: Duplicate monitor found and removed
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil getvcp --bus 19 --brief 10`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil getvcp --bus 19 --brief 10: 1
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil getvcp --bus 19 --brief 10: VCP 10 ERR
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil getvcp --bus 19 --brief 10:

DEBUG ddcci_plasmoid_backend.__main__: Command 'ddcutil getvcp --bus 19 --brief 10' returned non-zero exit status 1.
DEBUG ddcci_plasmoid_backend.__main__: Detected 0 working monitor busses, 1 non-working bus.
{"command": "detect", "value": []}

The first display is my laptop screen, which is correctly ignored. Then the second and third represent the tiled monitor. However, only the second display has VCP enabled, but it is excluded as a duplicate. Of course, that is exactly the one that you would want to get picked.

Maybe the solution is to ignore displays that have "VCP version: Detection failed"?

pip unable to install due to externally managed environment

Attempting to run pip install ddcci-plasmoid-backend, this error comes up:

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
    python-xyz', where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Arch-packaged Python package,
    create a virtual environment using 'python -m venv path/to/venv'.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.
    
    If you wish to install a non-Arch packaged Python application,
    it may be easiest to use 'pipx install xyz', which will manage a
    virtual environment for you. Make sure you have python-pipx
    installed via pacman.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

I am aware that i can pass --break-system-packages but I am unsure if this package has the potential to break anything managed by pacman/yay on my system, or break python in the process. Is this package safe to install via pip, or should I work on getting this installed by pacman somehow despite the fact that a pacman equivalent does not exist

Feature Request - respond automatically to display changes

My use case:

When plugging my laptop into a USB type-C dock with attached displays, I have to manually click refresh in the applet for the display(s) to appear. Ideally I would like it to already have done the refresh when a monitor is plugged in.

It should be possible to listen to the dbus event that is triggered on a new display connection and then simply do a refresh once.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.