# Dual screen with Apple Thunderbolt port on Macbook Pro

## gulivert

Hi,

I'm getting crazy to get working my thunderbolt port with an HDMI adapter.

I tried a lot of things and read a lot about this topic without find the right solution.

I'm using a Macbook Pro mid 2012 with a thunderbolt port that can be use with a mini displayport adapter to have a second monitor.

But I cannot get anything...

When I plug the adapter and look after /var/log/messages or dmesg I get nothing about the plug.

I'm a bit confuse with what I have to activate in the kernel config...

Actually I activated the following options:

 *Quote:*   

> PCI Express hotplug
> 
> Support for PCI hotplug
> 
> ACPI PCI hotplug
> ...

 

Ho and I'm also running my config with NVIDIA-DRIVERS and Optimus support but I do not think that it is my actual problem.

In my opinion I should first get message when I plug my seecond screen on the thunderbolt port somewhere like dmesg.

If someone can drive my for this or give me some hints...

Thank you in advance for any help!

----------

## khayyam

gulivert ... not that I'll be able to help in this regard but you should probably provide the following:

```
# xrandr  --query
```

... and the output of 'udevadm monitor' when you connect/disconnect the monitor/thunderbolt ... though most likely the syntax has changed, so YMMV. 

```
# udevadm monitor --environment --udev
```

Also, it might be worth mentioning of you're using bumblebee or not.

best ... khay

----------

## gulivert

Thank you for your reply. Yeah your right but unfortunately both of this command give nothing about the second monitor.

```
udevadm monitor --environment --udev

monitor will print the received events for:

UDEV - the event which udev sends out after rule processing
```

I plug and unplug the monitor that is turned on and nothing appears.

and

```

xrandr -q

Screen 0: minimum 8 x 8, current 1680 x 1050, maximum 16384 x 16384

LVDS-0 disconnected primary (normal left inverted right x axis y axis)

DP-0 disconnected (normal left inverted right x axis y axis)

DP-1 disconnected (normal left inverted right x axis y axis)

DP-2 disconnected (normal left inverted right x axis y axis)

DP-3 disconnected (normal left inverted right x axis y axis)

DP-4 disconnected (normal left inverted right x axis y axis)

DP-5 disconnected (normal left inverted right x axis y axis)

LVDS-1-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 331mm x 207mm

   1680x1050     59.88*+

   1400x1050     59.98  

   1280x1024     60.02  

   1280x960      60.00  

   1024x768      60.04    60.00  

   960x720       60.00  

   928x696       60.05  

   896x672       60.01  

   800x600       60.00    60.32    56.25  

   700x525       59.98  

   640x512       60.02  

   640x480       60.00    59.94  

   512x384       60.00  

   400x300       60.32    56.34  

   320x240       60.05  

VGA-1-0 disconnected (normal left inverted right x axis y axis)

```

This give nothing about the second monitor as well, with the monitor turned out.

I use the official NVIDIA optimus from the nvidia drivers. Not any Prime or Bumbleblee.

Here the result for the double cards:

```
 lshw -c video

  *-display               

       description: VGA compatible controller

       product: GK107M [GeForce GT 650M Mac Edition]

       vendor: NVIDIA Corporation

       physical id: 0

       bus info: pci@0000:01:00.0

       version: a1

       width: 64 bits

       clock: 33MHz

       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom

       configuration: driver=nvidia latency=0

       resources: irq:45 memory:c0000000-c0ffffff memory:90000000-9fffffff memory:a0000000-a1ffffff ioport:2000(size=128) memory:c1000000-c107ffff

  *-display

       description: VGA compatible controller

       product: 3rd Gen Core processor Graphics Controller

       vendor: Intel Corporation

       physical id: 2

       bus info: pci@0000:00:02.0

       version: 09

       width: 64 bits

       clock: 33MHz

       capabilities: msi pm vga_controller bus_master cap_list rom

       configuration: driver=i915 latency=0

       resources: irq:34 memory:c1400000-c17fffff memory:b0000000-bfffffff ioport:3000(size=64)

```

----------

## gulivert

Damn !!!!

Trhee days that I search the solution and finally understood what is going on, and the explaination will be crazy.

Be ready.

I use a full EFI installation for my Macbook Pro, without refit or refind.

I use also the official nvidia drivers, yeah I want to play some games then they have needed. The bug that seems to be still there is that the official nvidia drivers with EFI install give a black tty when you do a startx.

That is not great!

To fix this problem I configured the drivers to use the Optimus from NVIDIA, to use the integrate Intel i915 for rendering and nvidia as second card for 3D. This is good to still have the performance and to save my battery.

With optimus activated I'm able to deactivate the nvidia card from OS X with GFX Status application.

With this setting from OSX (OS X write the status of the card in the pram) my Linux boot automatically on the Intel card for tty, then when I do a startx the screen do not switch to black because it is the intel graphic card, and the nvidia is only used for performance and games.

But this setting unfortunately deactivate the thunderbolt port!!!

Then if I go to OSX, reactivate the both card, I got my damn black screen (because this time the TTY rendering is or seems to be from the NVIDIA) for tty when I do a startx, but the second screen work!

Voilà!!!

Then the question is: how I can fix this TTY black screen, and use my second screen in the same time  :Shocked:   :Rolling Eyes: 

finally the xrandr -q result right now

```
xrandr -q

Screen 0: minimum 8 x 8, current 3600 x 1080, maximum 16384 x 16384

LVDS-0 connected primary 1680x1050+0+0 (normal left inverted right x axis y axis) 331mm x 207mm

   1680x1050     59.88*+

DP-0 connected 1920x1080+1680+0 (normal left inverted right x axis y axis) 598mm x 336mm

   1920x1080     60.00*+  59.94    50.00    60.05    60.00    50.04  

   1680x1050     59.95  

   1600x1200     60.00  

   1440x900      59.89  

   1280x1024     75.02    60.02  

   1280x960      60.00  

   1280x720      60.00    59.94    50.00  

   1152x864      75.00  

   1024x768      75.03    70.07    60.00  

   800x600       75.00    72.19    60.32    56.25  

   720x576       50.00  

   720x480       59.94  

   640x480       75.00    72.81    59.94    59.93  

DP-1 disconnected (normal left inverted right x axis y axis)

DP-2 disconnected (normal left inverted right x axis y axis)

DP-3 disconnected (normal left inverted right x axis y axis)

DP-4 disconnected (normal left inverted right x axis y axis)

DP-5 disconnected (normal left inverted right x axis y axis)

VGA-1-0 disconnected (normal left inverted right x axis y axis)

```

----------

