-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readme could describe how to find out monitor IDs #54
Comments
For Linux the answer might be that you can get this info via "ddcutil detect", which produces output like this for each monitor:
I'm not sure which fields of this display_switch is reading and matching on, though. |
@pm215 I suggest running |
The logging seems to indicate that display_switch is only finding numeric monitor IDs, eg
whereas the readme suggests that the config file monitor_id ought to be able to match against model or manufacturer names or serial numbers. Looking at the code in display_control.rs, it looks like it's only looking at the ddc_hi::DisplayInfo::id, and not the other strings. I added a bit of debug printing:
which shows that the interesting stuff is in the fields we're not using:
Maybe display_name() should be concatenating these things together with the 'id' string? The ddc_hi documentation says that id is "a unique identifier for the display, format is specific to the backend", and it looks like for Linux the i2c-dev backend just uses the (major,minor) of the device, so in this case 22789 == hex 0x5905 which is device 59,5 (/dev/i2c-5) and 22790 is 59,6 which is /dev/i2c-6. Being able to match on something specific to the monitor like its manufacturer or serial number seems like it would be more reliable than matching on something that's a detail of how the monitor DDC connection appears in the i2c subsystem. |
I wonder if it would be doable to have some kind of "discovery" sub-command For example the user could run something like |
Ran into this same problem, ended up shrugging my shoulders and trying the switch globally - saw in the logs it told me exactly what names it was expecting. A discovery command would be great. Along with that, already using the switch and having an awkward setup, a nicer command for usb id discovery might be along the lines of: lsusb > a && echo sleepstart && sleep 2 && echo sleepend && lsusb > b && diff -u a b |
The readme documents how to support multiple monitors by adding config file sections with 'monitor_id' specifications to distinguish the different monitors. However, it doesn't describe how to find out what your monitor's monitor ID is so that you can set the config value appropriately.
If this is easy to do with existing command line tools, the readme could just say how to do that, as it does for USB IDs. If it's difficult, maybe display_switch could have a command line option for "don't do anything, just print all the IDs for all connected monitors" (since it seems to already have the code for "enumerate all the connected displays and find their ID string").
The text was updated successfully, but these errors were encountered: