Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Silmakhor

macrumors member
Original poster
Apr 26, 2021
58
62
Hi folks,

I'm in an interesting situation. In a month or so, I will have the following devices:

  • M1 Imac (Ordered today)
  • 2011 27" Imac
  • HDMI XPN graphics tablet that I am currently using as an external monitor
What I would love to do is use both my 2011 Imac AND my tablet as external monitors for the M1 Imac. Based on some research, it seems possible to use a Luna Display in mac-to-mac mode to work to connect the 2011. So far, so good.

From there, the next step would be to get a displayLink compatible, dual-monitor hub/dock to connect the graphics tablet. My question is, does anyone know if this approach would even work? The cost of the dock and the Luna Display will be hundreds of dollars, so this is not something that I want to mess around with without some confidence that it will work.

The alternative approaches would be to
1) Suck up the cost of a second external monitor and completely retire the 2011 (Grrr)
2) Switch between the tablet and the 2011 as my one external monitor as needed, or
3) Wait for Apple to fix the external monitor problem in Big Sur/M1 chips. I am not holding my breath.

Any insights would be appreciated.
 

joevt

macrumors 604
Jun 21, 2012
6,967
4,262
I don't think there should be any problem with using Luna Display and DisplayLink.

2011 iMac supports Thunderbolt Target Display Mode. I wonder if that would work? Do you have any Macs to test that with? You'll need an Apple Thunderbolt 3 to Thunderbolt 2 adapter and a Thunderbolt 2 cable.

I believe Big Sur still has the Thunderbolt Target Display Mode drivers. I think the target iMac uses
/System/Library/Extensions/AppleThunderboltEDMService.kext/Contents/PlugIns/AppleThunderboltEDMSink.kext/Contents/MacOS/AppleThunderboltEDMSink
and the source Mac will use
/System/Library/Extensions/AppleThunderboltEDMService.kext/Contents/PlugIns/AppleThunderboltEDMSource.kext/Contents/MacOS/AppleThunderboltEDMSource

The M1 Mac can only connect one normal display. I think Luna Display counts as a real display. I'm not sure if Thunderbolt Target Display Mode behaves as a normal display (connected to the GPU) or as something like DisplayLink. I would need to like at system_profiler info to be sure. DisplayLink is not connected to the GPU so you can connect as many of those as the software allows.
 
  • Like
Reactions: Amethyst1

Amethyst1

macrumors G3
Oct 28, 2015
9,818
12,238
I think Luna Display counts as a real display.
It does. The small red dongle is basically a dummy monitor simulator. It shows up as "Luna Display" (or "Luna Zero" - presumably if no client is connected) in System Profiler's Graphics/Displays section.

luna.jpg


I'm not sure if Thunderbolt Target Display Mode behaves as a normal display (connected to the GPU) or as something like DisplayLink.
It uses DisplayPort-over-Thunderbolt (like the Apple Thunderbolt Display). So no DisplayLink fortunately.
 
Last edited:

joevt

macrumors 604
Jun 21, 2012
6,967
4,262
It uses DisplayPort-over-Thunderbolt (like the Apple Thunderbolt Display). So no DisplayLink fortunately.
If it used DisplayPort over Thunderbolt, then it would appear as a normal display connected to the source computer's GPU. And it would work with non-Macs. And it would require the iMac's target Thunderbolt controller to have DisplayPort Out adapters to convert the DisplayPort over Thunderbolt signal back to DisplayPort. Unless..... there's a way to take DisplayPort over Thunderbolt and convert it to frame buffer data manually (parsing DisplayPort packets?). The only way to know for sure is to get ioreg and system_profiler info of Thunderbolt Target Display Mode in action (can you get this info on an iMac while it's in Target Display Mode - using screen sharing or remote login maybe?)
 

joevt

macrumors 604
Jun 21, 2012
6,967
4,262
I don't think I've read anyone having success with Thunderbolt Target Display Mode from an M1 Mac anyway, even though the drivers are compiled for ARM but I don't recall if anyone has tried.
 
  • Like
Reactions: Amethyst1

Silmakhor

macrumors member
Original poster
Apr 26, 2021
58
62
2011 iMac supports Thunderbolt Target Display Mode. I wonder if that would work? Do you have any Macs to test that with? You'll need an Apple Thunderbolt 3 to Thunderbolt 2 adapter and a Thunderbolt 2 cable.
According to people who have tried it, this only works with 2009 Imacs with Minidisplay port :/ so no dice.
 
  • Like
Reactions: Amethyst1

Silmakhor

macrumors member
Original poster
Apr 26, 2021
58
62
I don't think I've read anyone having success with Thunderbolt Target Display Mode from an M1 Mac anyway, even though the drivers are compiled for ARM but I don't recall if anyone has tried.

It's been attempted, unsuccessfully.
 
  • Like
Reactions: Amethyst1

joevt

macrumors 604
Jun 21, 2012
6,967
4,262

It's been attempted, unsuccessfully.
The AppleThunderboltEDMSource driver has a list of Macs but I don't know why (these are all 2018 and later, so maybe it means Titan Ridge?)
Code:
Mac-827FB448E656EC26  MacBookPro15,2  (13-inch Mid 2018)  
Mac-827FAC58A8FDFA22  MacBookAir8,1   (Late 2018) 
Mac-226CB3C6A851A671  MacBookAir8,2   (TT Retina, 2019)   
Mac-7BA5B2DFE22DDD8C  Macmini8,1      (Late 2018)
Mac-937A206F2EE63C01  MacBookPro15,1  (15-inch Mid 2018)  
Mac-B234B1456C785320
Mac-1E7E29AD0135F9BC  MacBookPro15,3  (15-inch Mid 2019)  
Mac-77E8E67C6DB170AA
Mac-AA95B1DDAB278B95  iMac19,1        (27-Inch 5k, 2019)  
Mac-63001698E7A34814  iMac19,2
Mac-53FDB3D8DB8CA971  MacBookPro15,4  (13-inch Mid 2019)
Mac-E1008331FDC96864  MacBookPro16,1  (16-inch Late 2019) 
Mac-27AD2F918AE68F61  MacPro7,1       (2019)

The AppleThunderboltEDMSource driver also mentions AppleThunderboltDPInAdapter so maybe you're right that it's doing something with the DisplayPort input of the source Thunderbolt controller and somehow tunnelling DisplayPort to the iMac. Maybe the DP In trick works with Falcon Ridge and Alpine Ridge and is different for Titan Ridge and doesn't exist for M1 or Apple has not adapted the trick for M1 even though they compiled the driver for ARM.

I wonder if an Alpine Ridge controller could be attached via USB4 and made to work (probably need to flash the card and modify drivers)
 
  • Like
Reactions: Amethyst1

Amethyst1

macrumors G3
Oct 28, 2015
9,818
12,238
@joevt - I'd gladly play around with it if I had an iMac capable of being used as a display through Thunderbolt Target Display Mode. "Alas", my 2010 27" simply does Target Display Mode via DisplayPort. I've successfully fed it dual-link DVI (using an Atlona AT-DP400) and USB-C DP Alt Mode (via a simple adapter) sources FWIW.
 
Last edited:
  • Like
Reactions: Silmakhor

Silmakhor

macrumors member
Original poster
Apr 26, 2021
58
62
So thinking outside the box, I may ditch DisplayLink and Luna Display altogether and keep my 2011 running as a full desktop in my home office alongside the incoming M1.

The M1 is primarily for better graphics and music production. And gaming. The 2011 is starting to choke a lot in Corel Painter and other design/artistic programs, and can't really run anything recent in terms of gaming. The M1 should do fine on its own for these tasks.

Most of my need for lots of screen real estate involves many, many chrome windows open for google docs and other cloud-based services. So what could work would be to keep both machines side-by-side, and link them with a virtual k/m/v switcher. Basically this allows one to use the same mouse and keyboard combo on multiple machines. I tried experimenting with Barrier today and it seems like it could work. Admittedly it's pretty kludgy.
 

Amethyst1

macrumors G3
Oct 28, 2015
9,818
12,238
So what could work would be to keep both machines side-by-side, and link them with a virtual k/m/v switcher.
This is also a good option. And it would allow you to "properly" hook up the graphics tablet to the M1 Mac without having to resort to DisplayLink.
 
  • Like
Reactions: Silmakhor

Amethyst1

macrumors G3
Oct 28, 2015
9,818
12,238
The AppleThunderboltEDMSource driver also mentions AppleThunderboltDPInAdapter so maybe you're right that it's doing something with the DisplayPort input of the source Thunderbolt controller and somehow tunnelling DisplayPort to the iMac.
Just curious - what suggests that TB TDM doesn't work that way? (I'll admit to having, perhaps naively, assumed that it works like that.)
 

joevt

macrumors 604
Jun 21, 2012
6,967
4,262
Just curious - what suggests that TB TDM doesn't work that way? (I'll admit to having, perhaps naively, assumed that it works like that.)
I don't know what all you can do with a Thunderbolt 2 controller (or even Thunderbolt 3) or what hardware Apple includes in the iMac to allow Thunderbolt Target Display Mode that doesn't exist in any other Mac with Thunderbolt.


1) Consider the normal method for video over Thunderbolt:

A Thunderbolt host controller has a DisplayPort input. You can chain some Thunderbolt devices together, and at the end have a DisplayPort device. The Thunderbolt host controller can automatically create a path between the two, take DisplayPort data from the DisplayPort In Adapter of the host controller and transmit it to the DisplayPort Out Adapter of the peripheral Thunderbolt controller which converts the tunnelled data back to normal DisplayPort data.
DisplayPort In and Out adapters and tunnelling DisplayPort are discussed in the USB4 spec (including paths).


2) Consider a normal method of sending video between two hosts:

A software program on the source computer can capture your desktop video, transmit it over Thunderbolt as data to another computer, which can take the data and display it. The method of video encoding would be like DisplayLink or Zoom or Slack or Parallels Access. This uses a bunch of CPU or GPU cycles at both ends. This would use a method of transmission like Thunderbolt networking or Thunderbolt Target Disk Mode. The USB4 spec describes inter-domain communication (connecting two hosts together).


3) Now consider the proposed method of sending video over Thunderbolt that is speculated to be used by some early Thunderbolt iMacs for Target Display Mode:

Somehow a path between the source computer's Thunderbolt DisplayPort In Adapter and the target computer's Thunderbolt controller is setup. In this way, there's no CPU cycles wasted on encoding video - it comes straight from the GPU.

How is the path setup? If the target computer is able to change its Thunderbolt controller to behave as a peripheral instead of a host controller and connected its display to a DisplayPort Out Adapter of the controller (via a DisplayPort mux) then the path setup would be automatic. In that case the AppleThunderboltEDMSource driver wouldn't be needed and PCs could also do Thunderbolt Target Display Mode to the iMac.

So maybe the path setup is not automatic. But it is between the source's DisplayPort In Adapter and the target's DisplayPort Out Adapter.

Another option is, that the path is between the source's DisplayPort In Adapter and a DMA target (like what's used for Thunderbolt networking). Is that possible? The DisplayPort packets would need to be interpreted and decoded by the target's CPU (test that by halting the CPU?)

Output from ioreg and system_profiler may provide more clues. I suppose the paths can be examined (see Linux source code for examining Thunderbolt registers).
 
  • Like
Reactions: Amethyst1

joevt

macrumors 604
Jun 21, 2012
6,967
4,262
I got my hands on a iMac (27-inch, Late 2013). I did some tests with Thunderbolt Target Display Mode (TB TDM). You can connect a second display to the iMac and it will not be affected by TDM. The mouse is also not affected. The keyboard still functions but most of the keys do not work (only Escape, F1-F2 (brightness), F8 (iTunes), F10-F11 (volume), A). Screen Sharing works (you see a desktop for the iMac). Everything works: File Sharing, ssh, etc.

It seems that the method used for TB TDM is most like method 1 with some extra stuff described by method 3.

Basically, the difference between DisplayPort (DP) TDM and TB TDM is that, in the latter case, the DP signal needs to be tunnelled over TB. Tunnelled DP works between a DP In Adapter and a DP Out Adapter as described in method 1. The iMac's TB controller has a DP Out Adapter for this purpose. It is probably similar to the DP Out Adapter that a GC-TITAN RIDGE has (need to verify that using Linux debugfs since DROM may be ambiguous or incorrect https://www.tonymacx86.com/threads/z490-z590.308084/post-2235429 ).

However, method 1 describes a path that is automatically setup between the host controller and a peripheral controller. The iMac's controller is itself a host controller, and the path from one host controller to another is a cross domain path. Special code is used to set that up for TB TDM. Pressing Command-F2 on the iMac initiates that process. Maybe it sends a TB signal to the other Mac which then creates the path.

As for method 3, the iMac's TB controller does not need to change itself to a peripheral controller - the DP Out Adapter is already part of the host controller configuration.

The rest of TB TDM probably works the same as for DP TDM. There is a DP mux that disconnects the display from the iMac's GPU and connect's it to the DP Out of the TB controller (or the DP port in the case of DP TDM).

There's a dpd process for handling Target Display Mode. Killing this process does not disable TDM. It may disable the ability to stop TDM with Command-F2. In that case, disconnect and reconnect the TB cable.

There's a dpaudiothru process for getting the audio from DisplayPort to the iMac's HDA controller. Killing this process stops the audio.

Code:
Thunderbolt Target Display Mode

Steps:
1 Connect two macs together
2 Turn on Thunderbolt Target Display Mode

+ = added
- = removed

==========================================================================================
on target iMac:

HDEF
	AppleHDAController
		IOHDACodecDevice
			IOHDACodecDriver
				IOHDACodecFunction
					AppleHDACodecGeneric
						AppleHDADriver
							AppleHDAEngineInput
2+								IOAudioEngineUserClient (dpd)
2+								IOAudioEngineUserClient (dpaudiothru)
							AppleHDAEngineInput
2+								IOAudioEngineUserClient (dpd)
2+								IOAudioEngineUserClient (dpaudiothru)
								IOAudioSelectorControll
2+									IOAudioControlUserClient (dpd)
2+									IOAudioControlUserClient (dpaudiothru)
							AppleHDAEngineOutput
2+								IOAudioEngineUserClient (dpd)
2+								IOAudioEngineUserClient (dpaudiothru)
							
								
GFX0
	NVDA,Display-A@0
		NVDA
2-			display0
				AppleBacklightDisplay

NHI0
	AppleThunderboltHAL
		AppleThunderboltNHIType2
			IOThunderboltController	
				IOThunderboltLocalNode
					AppleThunderboltEDMSink
2-,2+					AppleThunderboltEDMSinkUserClient (dpd)
					AppleThunderboltIPService
						AppleThunderboltIPPort
							en2
						AppleThunderboltIPPort
1+							AppleThunderboltIPConnection
							en3
				IOThunderboltPort@5
					IOThunderboltSwitchType2
						IOThunderboltPort@3
1+							IOThunderboltXDomainLink (Macmini8,1)
								IOThunderboltXDomainService
									AppleThunderboltIPTransmitter
						IOThunderboltPort@A
							AppleThunderboltDPOutAdapter
						IOThunderboltPort@B
							AppleThunderboltDPInAdapter
						IOThunderboltPort@C
							AppleThunderboltDPInAdapter
	
==========================================================================================
on source Mac mini:

HDEF
	AppleGFXHDA8086_9DC8Controller
		AppleGFXHDADriver
			AppleGFXHDAEngineOutputDP (iMac)
2+				AppleGFXHDAAudioSelectorControlDP
					IOAudioControlUserClient (coreaudiod)
2+				AppleGFXHDAStream
2+				AudioAUUCDriver
2+				IOAudioEngineUserClient x10
2+				IOAudioLevelControl
					IOAudioControlUserClient (coreaudiod)
2+				IOAudioSelectorControl
					IOAudioControlUserClient x10
2+				IOAudioToggleControl
					IOAudioControlUserClient

IGPU
	AppleIntelFramebuffer@1
2+		display0
			AppleDisplay
		
NHI0
	AppleThunderboltHAL
		AppleThunderboltNHIType3
			IOThunderboltController
				IOThunderboltLocalNode
					AppleThunderboltIPService
						AppleThunderboltIPPort
1+							AppleThunderboltIPConnection
							en3
						AppleThunderboltIPPort
							en2
				IOThunderboltPort@7
					IOThunderboltSwitchType3
						IOThunderboltPort@1
1+							IOThunderboltXDomainLink (Macintosh)
								IOThunderboltXDomainService (network)
									AppleThunderboltIPTransmitter
2+								IOThunderboltXDomainService (extdisp)
									AppleThunderboltEDMSource
						IOThunderboltPort@5
							AppleThunderboltDPInAdapterGFXPolicy1
						IOThunderboltPort@6
							AppleThunderboltDPInAdapterGFXPolicy1
 

Attachments

  • from joevt iMac TB TDM.zip
    656.4 KB · Views: 88
Last edited:

joevt

macrumors 604
Jun 21, 2012
6,967
4,262
I got my hands on a iMac (27-inch, Late 2013). I did some tests with Thunderbolt Target Display Mode (TB TDM).
I had used High Sierra on the iMac because Catalina only gave me a black screen when I tried to enable TB TDM. I tried Monterey using OCLP on the iMac and TB TDM worked fine.
 
  • Like
Reactions: Amethyst1

Amethyst1

macrumors G3
Oct 28, 2015
9,818
12,238
I got my hands on a iMac (27-inch, Late 2013). I did some tests with Thunderbolt Target Display Mode (TB TDM).
Thanks a lot for getting to the bottom of TB TDM! :)

So does the display of the iMac appear as a DisplayPort display in AGDCDiagnose's output and System Profiler's Graphics/Displays section on the source? Is the EDID you get via TB TDM identical to the EDID read directly from the iMac? (Like with DP TDM.)
 
Last edited:

joevt

macrumors 604
Jun 21, 2012
6,967
4,262
Thanks a lot for getting to the bottom of TB TDM! :)

So does the display of the iMac appear as a DisplayPort display in AGDCDiagnose's output and System Profiler's Graphics/Displays section on the source? Is the EDID you get via TB TDM identical to the EDID read directly from the iMac? (Like with DP TDM.)
AGDCDiagnose shows the iMac display appears as a display connected to the iGPU of the Mac mini (4 lanes of HBR which is all that's required for 1440p).
The EDIDs are the same. It's super simple - one timing for 1440p and another for 720p. 720p is scaled by the display and is blocky. SwitchResX also shows a 720p scaled to 1440p mode which is smoother. Strange thing is that there's no 720p HiDPI mode by default (there's HiDPI modes for 648p, 846p, 945p, 1080p, 1152p, 1296p, 1440p, 1692p, 1800p, 1890p) but I can fix that by adding a 1440p scaled mode (seems redundant but it works - these may be issues new to Monterey).

Another interesting thing is that even though the iMac14,2 uses an Nvidia GPU, the AGDCDiagnose output shows DPCD info and EDID info from that GPU. This doesn't work in Catalina on my MacPro3,1 with GTX 680 Mac Edition - I'll eventually get around to trying Monterey on my MacPro3,1.
 

Attachments

  • EDIDs from joevt iMac14,2.zip
    42.9 KB · Views: 77
  • Like
Reactions: Amethyst1
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.