dwm_lut icon indicating copy to clipboard operation
dwm_lut copied to clipboard

LUTs for multiple external monitors sharing a single video port/connector

Open aaronmmarks opened this issue 2 years ago • 10 comments

I've noticed that dwm_lut ties to the DisplayPort Connector instead of each unique monitor which is causing problems for me since I dock my laptop at multiple docks. This means that I need to go in and manually change the SDR LUT every time I dock my computer at a different desk (where I've already calibrated that monitor).

Would it be possible to change dwm_lut so that it can uniquely identify each display by serial number or something like that? 

I assume this would then also fix another problem I've experienced which is that the LUT doesn't load if I switch video ports on my computer. For example, if I'm using DisplayPort #1 and I re-plug the monitor into DisplayPort #2 then it doesn't load the LUT. Also, I then load the LUT to DisplayPort #2 then it won't load again if I switch back to DisplayPort #1. I assume this is also related to dwm_lut being tied to the "Connector".

Thanks!

aaronmmarks avatar Mar 24 '22 01:03 aaronmmarks

Interesting, I thought that the monitor ID I'm using as the identifier is per device and not per port... Just to be clear, you're saying that the GUI .exe can't distinguish between those monitors, right? The DLL definitely can't (it only has access to the coordinates), so while the LUT is active, things are gonna break when anything changes, but I thought a Refresh + Apply in the GUI should fix everything.

ledoge avatar Mar 24 '22 13:03 ledoge

Here's how I'm using Windows Task Scheduler for automatically detecting whenever I plug my laptop into a different dock and then refreshing and applying LUTs with dwm_lut: https://hub.displaycal.net/forums/topic/i-made-a-tool-for-applying-3d-luts-to-the-windows-desktop/page/10/#post-34665

So that's not the problem, but I think you're right that the GUI per device monitor ID isn't being referenced and it must instead be solely referencing the coordinates.

Is it possible to fix this?

Thank you!

aaronmmarks avatar Mar 26 '22 18:03 aaronmmarks

I think this .exe should fix this, please test it to confirm.

ledoge avatar Mar 28 '22 18:03 ledoge

@ledoge Thank you, but that unfortunately didn't work even though it does have different behavior now. With that EXE it now drops the LUT whenever I connect to a different monitor and apply a different LUT. I think you might be getting close though.

Here's an example of what's happening now:

  1. Connect to Monitor1
  2. Apply SDR LUT for Monitor1
  3. Disconnect from Monitor1
  4. Connect to Monitor2
  5. Apply SDR LUT for Monitor2
  6. Disconnect Monitor2
  7. Connect Monitor1
  8. Missing/Blank SDR LUT for Monitor1
  9. Apply SDR LUT for Monitor1
  10. Disconnect Monitor1
  11. Connect Monitor2
  12. Missing/Blank SDR LUT for Monitor2
  13. Apply SDR LUT for Monitor2
  14. Disconnect Monitor2
  15. And the cycle repeats back to step 7

Here's an example of what previously happened:

  1. Connect to Monitor1
  2. Apply SDR LUT for Monitor1
  3. Disconnect from Monitor1
  4. Connect to Monitor2
  5. LUT for Monitor1 is now applied to Monitor2
  6. Apply SDR LUT for Monitor2
  7. Disconnect Monitor2
  8. Connect Monitor1
  9. LUT for Monitor2 is now applied to Monitor1
  10. Apply SDR LUT for Monitor1
  11. Disconnect Monitor1
  12. And the cycle repeats back to step 4

aaronmmarks avatar Mar 28 '22 23:03 aaronmmarks

Can you upload the config.xml file after each time you assign a LUT to a monitor, using the new build?

ledoge avatar Mar 28 '22 23:03 ledoge

@ledoge Using the new test build, here's config.xml for Monitor1:

<?xml version="1.0" encoding="utf-8"?>
<monitors>
  <monitor path="\\?\DISPLAY#LGD0689#4&amp;18c57ca6&amp;0&amp;UID8388688#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}" sdr_lut="C:\Users\aaron\LUTs\sRGB LG Gram 14 11G.txt" />
  <monitor path="\\?\DISPLAY#DEL41B5#4&amp;18c57ca6&amp;0&amp;UID41028#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}" sdr_lut="C:\Users\aaron\LUTs\sRGB Dell U2720Q R100G97B95.txt" />
</monitors>

Here's config.xml for Monitor2:

<?xml version="1.0" encoding="utf-8"?>
<monitors>
  <monitor path="\\?\DISPLAY#LGD0689#4&amp;18c57ca6&amp;0&amp;UID8388688#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}" sdr_lut="C:\Users\aaron\LUTs\sRGB LG Gram 14 11G.txt" />
  <monitor path="\\?\DISPLAY#DEL4226#4&amp;18c57ca6&amp;0&amp;UID41028#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}" sdr_lut="C:\Users\aaron\LUTs\sRGB Dell C3422WE R98G94B99.txt" />
</monitors>

You can see how it's overwriting the previous monitor's config and configured LUT.

aaronmmarks avatar Mar 29 '22 06:03 aaronmmarks

OK, I believe the problem is now just caused by the fact that the config, when written, only includes monitors that are currently connected. I'll try to fix that in the next release so that setups like yours are handled properly, but for now, I think if you edit the config file manually to include the lines for both monitors (and then don't make any further changes in the GUI, as that would cause it to be overwritten), it should work.

ledoge avatar Mar 29 '22 06:03 ledoge

@ledoge You're right 👍 Manually configuring the config.xml to look like this fixed it while using the test build:

<?xml version="1.0" encoding="utf-8"?>
<monitors>
  <monitor path="\\?\DISPLAY#LGD0689#4&amp;18c57ca6&amp;0&amp;UID8388688#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}" sdr_lut="C:\Users\aaron\LUTs\sRGB LG Gram 14 11G.txt" />
  <monitor path="\\?\DISPLAY#DEL41B5#4&amp;18c57ca6&amp;0&amp;UID41028#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}" sdr_lut="C:\Users\aaron\LUTs\sRGB Dell U2720Q R100G97B95.txt" />
  <monitor path="\\?\DISPLAY#DEL4226#4&amp;18c57ca6&amp;0&amp;UID41028#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}" sdr_lut="C:\Users\aaron\LUTs\sRGB Dell C3422WE R98G94B99.txt" />
</monitors>

Looking forward to the next version. Thank you!

aaronmmarks avatar Mar 29 '22 14:03 aaronmmarks

Just pushed a new release, which should handle your use case perfectly now. Please test it and report back!

ledoge avatar Apr 06 '22 21:04 ledoge

Please also try this GUI build – I can't test it properly as I only have a single monitor, but it should additionally eliminate the need for a task to detect monitor changes. What should happen is: As long as you didn't make any changes to the LUT assignment after clicking "Apply", whenever the monitor setup changes, the DLL should automatically be re-injected.

ledoge avatar Apr 07 '22 10:04 ledoge