Subject: bug#34516: Multi-monitor frame sets

From: Robert Pluim <[email-masked]>
Date: Mon, 04 Mar 2019 21:18:05 +0100

Alan Third <[email-masked]> writes:

>> I donʼt know, but the code in ns_screen_name which appears to do
>> something similar does not work for me in 10.14
>
> Try this:
>
>     ioreg -lw0 | grep IODisplayEDID | sed "/[^<]*</s///" | xxd -p -r | strings -6
>
> and see if it returns usable information. If so then that’s what we
> should be targeting in ns_screen_name.
>

When just using the built-in display, that gives me:
    Color LCD
    LP133WQ5-SJA2
    F0Y843102PCJ465AT

I can run the same test tomorrow when Iʼm by my external screens
again. Only the first line here is remotely intelligible, none of them
are displayed by macOS as far as I know.

> I think the approach used in ns_screen_name must have been removed in
> some version of macOS. I tried to modify it to find the information
> returned by the above command, but it looks like there’s no direct way
> to match up the DID number with IODisplayConnect, which is where
> IODisplayEDID is stored.
>
> I’d never heard of ioreg before yesterday, though, so if anyone knows
> better I’d be happy to learn otherwise.
>
>> Iʼm not so sure about using the did, as someone suggested, since that
>> has a large value, eg here itʼs 724851601, Iʼd prefer to use a simple
>> index.
>
> I did think that might be an issue, the main advantage over the simple
> index is that it shouldn’t change, whereas I don’t think the index is
> guaranteed to be the same on any two consecutive calls.

ns-display-monitor-attributes-list assumes that the first monitor has
index '0', so having that change would be surprising.

Robert