Comments (14)
RE: quiet output, I've obviously missed the -t
option although the following warning goes to stdout instead of stderr:
VCP (aka MCCS) version for display is undetected or less than 2.0. Output may not be accurate.
VCP 10 ERR
from ddcutil.
from ddcutil.
from ddcutil.
I would expect first line (informational as you say) go to stderr and the real response VCP 10 ERR
go to stdout. So that when inside the shell I can easily get only the response for parsing e.g., pwr=$(ddcutil -t -e "$edid" getvcp d6)
. I can filter the output for the last line of course but why not to benefit from stderr. If one needs all, there is always 2>&1
. Well, just an idea.
What I do now is that I ignore output if I get exit status > 0 so:
if pwr=$(ddcutil -t -e "$edid" getvcp d6); then
pwr=$(awk '{print $4}' <<<"$pwr")
[[ $pwr = 'x05' ]] && continue
fi
from ddcutil.
from ddcutil.
Well for --verbose it's ok to dump everything to stdout because that's what user expects. You are right to say this is about output format, that is stdout format. I was just surprised to see that line there, I actually get it when interrogating my laptop's LVDS panel which obviously doesn't support DDC while still having i2c bus. It's design decision and that's ok with me, just thought I point it out ;).
from ddcutil.
from ddcutil.
No worries, I don't want to be nitpicking on details. My original point here was to point out that while ddcutil -e
would work that is find display only by edid, loadvcp
wouldn't and fail on assert but I concede I edited the file which is kinda dumb anyway :).
RE: format thing. Yes I get this when targeting LVDS monitor directly either by bus or by edid.
What I do now in my script is that I want to filter out monitors that are turned off, so I cycle through all outputs and call ddcutil
for edid that I have from sysfs
. Actually now I figured I can get i2c bus number too; for DP outputs it's directly under output node; the rest is under card node and I match it to the output by the name (e.g., i915 gmbus panel
would be for LVDS-1
:| well it's not very nice but works and it's rather fast because I can use --nodetect
).
$ ddcutil detect
Invalid display
I2C bus: /dev/i2c-2
Supports DDC: false
EDID synopsis:
Mfg id: LEN
Model: Unspecified
Serial number: Unspecified
Manufacture year: 2008
EDID version: 1.3
DDC communication failed
$ ddcutil -t -e <edid> getvcp d6
VCP (aka MCCS) version for display is undetected or less than 2.0. Output may not be accurate.
VCP D6 ERR
$ ddcutil -e <edid> getvcp d6
VCP (aka MCCS) version for display is undetected or less than 2.0. Output may not be accurate.
VCP code 0xd6 (Power mode ): Invalid response. status code=ENXIO(-6): No such device or address
from ddcutil.
from ddcutil.
Ok, cool. Thanks!
RE: I2C bus numbers
+0:drm$ pwd
/sys/class/drm
+0:drm$ ls -lad card0/card0-*
drwxr-xr-x 5 root root 0 Jul 30 22:15 card0/card0-DP-1
drwxr-xr-x 5 root root 0 Jul 30 22:15 card0/card0-DP-2
drwxr-xr-x 5 root root 0 Jul 30 22:15 card0/card0-DP-3
drwxr-xr-x 3 root root 0 Jul 30 22:15 card0/card0-HDMI-A-1
drwxr-xr-x 3 root root 0 Jul 30 22:15 card0/card0-HDMI-A-2
drwxr-xr-x 3 root root 0 Jul 30 22:15 card0/card0-HDMI-A-3
drwxr-xr-x 4 root root 0 Jul 30 22:15 card0/card0-LVDS-1
drwxr-xr-x 3 root root 0 Jul 30 22:15 card0/card0-VGA-1
+0:drm$ ls -lad card0/card0-*/i2c-*
drwxr-xr-x 4 root root 0 Jul 30 22:15 card0/card0-DP-1/i2c-6
drwxr-xr-x 4 root root 0 Jul 30 22:15 card0/card0-DP-2/i2c-7
drwxr-xr-x 4 root root 0 Jul 30 22:15 card0/card0-DP-3/i2c-8
+0:drm$ cat card0/card0-*/i2c-*/name
DPDDC-B
DPDDC-C
DPDDC-D
+0:drm$ ls -lad card0/device/i2c-*
drwxr-xr-x 4 root root 0 Jul 30 22:15 card0/device/i2c-0
drwxr-xr-x 4 root root 0 Jul 30 22:15 card0/device/i2c-1
drwxr-xr-x 4 root root 0 Jul 30 22:15 card0/device/i2c-2
drwxr-xr-x 4 root root 0 Jul 30 22:15 card0/device/i2c-3
drwxr-xr-x 4 root root 0 Jul 30 22:15 card0/device/i2c-4
drwxr-xr-x 4 root root 0 Jul 30 22:15 card0/device/i2c-5
+0:drm$ cat card0/device/i2c-*/name
i915 gmbus ssc
i915 gmbus vga
i915 gmbus panel
i915 gmbus dpc
i915 gmbus dpb
i915 gmbus dpd
So for whatever reason it seems DP outputs have their i2c associated directly underneath "output node" that is e.g., card0/card0-DP-1
sysfs path.
For the rest I've assumed simple translation table:
bus2out['i915 gmbus dpb']='HDMI-A-1'
bus2out['i915 gmbus dpc']='HDMI-A-2'
bus2out['i915 gmbus dpd']='HDMI-A-3'
bus2out['i915 gmbus panel']='LVDS-1'
bus2out['i915 gmbus vga']='VGA-1'
Here is the bash script where I'm using it.
from ddcutil.
from ddcutil.
Yep, I imagined it would be highly driver dependent ... it's kind of a hack really. Also doesn't make much sense to me why for i915
that direct association is done only for DP ports. Also interesting why nouveau
wouldn't do it, no wonder about proprietary drivers though.
Anyway thanks for the info / and changes done. I guess we can close this issue then.
from ddcutil.
from ddcutil.
Yes, you're correct about DP ports. I've asked in #intel-gfx
freenode channel and somebody explained to me that those i2c buses correspond to DP-aux channels. When I've inquired about why the other i2c buses aren't associated in similar fashion, I got congratulated that I'm most likely the first person to care and that they welcome patches :).
from ddcutil.
Related Issues (20)
- FPS drops on get/set - Nvidia non-free - Wayland HOT 4
- 2.1.0: "--disable-usb" --> error: 'DEFAULT_ENABLE_USB' undeclared HOT 2
- Crash and restart loop in org_kde_powerdevil on ArchLinux KDE Plasma 5 HOT 2
- Crash due to invalid assertion HOT 6
- Fixed PowerDevil crash with release 2.1.0
- Documentation links to old tarball HOT 1
- Documentation for building from source doesn't work HOT 1
- ASUS PA278CV monitor shown as invalid monitor HOT 3
- Udev Rule Crashes with Cherry Keyboard HOT 1
- Release 2.1.2
- Release 2.1.3
- opensuse rpm package ddcutil not executable HOT 1
- VG248 : Invalid display HOT 8
- AOC I2475PXQU: Invalid display HOT 2
- DDC communication failed (docking station + HDMI) HOT 5
- Laptop displays do not support DDC/CI while using Integrated Graphics HOT 5
- AOC Q27P1B input source values HOT 3
- "Invalid display" talking to Philips 436M6VBP over HDMI HOT 4
- Release 2.1.4
- Can't switch between DP1 and DP2 on Samsung G7 Odyssey HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ddcutil.