FreeBSDDesktop / DEPRECATED-freebsd-base-graphics

Fork of FreeBSD's base repository to work on graphics-stack-related projects
Other
49 stars 13 forks source link

Skylake: unreliable detection of connected external displays #155

Open AMDmi3 opened 7 years ago

AMDmi3 commented 7 years ago

After I've removed xorg.conf panics were fixed and I was able to use both external monitors, but it turned out to be not reliable. Here's what xrandr looks like when everything works:

Screen 0: minimum 320 x 200, current 5120 x 1200, maximum 8192 x 8192
eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1920x1080     60.02*+  47.99  
   1400x1050     59.98  
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.00  
   800x600       60.32    56.25  
   640x480       59.94  
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
DP1-1 connected primary 1600x1200+1920+0 (normal left inverted right x axis y axis) 367mm x 275mm
   1600x1200     60.00*+
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
   720x400       70.08  
DP1-2 connected 1600x1200+3520+0 (normal left inverted right x axis y axis) 367mm x 275mm
   1600x1200     60.00*+
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
   720x400       70.08  
DP1-3 disconnected (normal left inverted right x axis y axis)

however in most cases there will be no DP1-1, DP1-2 and DP1-3 after the boot. I've managed to fix this conditing the following way:

AMDmi3 commented 7 years ago

Strangeness continues. When I disconnect and reconnect either external monitor it works fine. When I disconnect both monitors I end up in a following state:

Screen 0: minimum 320 x 200, current 5120 x 1200, maximum 8192 x 8192
eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1920x1080     60.02*+  47.99  
   1400x1050     59.98  
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.00  
   800x600       60.32    56.25  
   640x480       59.94  
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
DP1-1 disconnected primary 1600x1200+1920+0 (normal left inverted right x axis y axis) 0mm x 0mm
DP1-2 disconnected 1600x1200+3520+0 (normal left inverted right x axis y axis) 0mm x 0mm
DP1-3 disconnected (normal left inverted right x axis y axis)
  1600x1200 (0x53) 162.000MHz +HSync +VSync
        h: width  1600 start 1664 end 1856 total 2160 skew    0 clock  75.00KHz
        v: height 1200 start 1201 end 1204 total 1250           clock  60.00Hz

connecting them back doesn't change the picture, they remain disconnected and do not show anything. Switching to console does not show the console (but the machine is not freezed either, so I can switch back). Could not recover from this state (e.g. make displays work) without rebooting.

AMDmi3 commented 7 years ago

And after rebooting, I ended up with only one output detected:

Screen 0: minimum 320 x 200, current 3520 x 1200, maximum 8192 x 8192
eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1920x1080     60.02*+  47.99  
   1400x1050     59.98  
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.00  
   800x600       60.32    56.25  
   640x480       59.94  
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
DP1-1 connected 1600x1200+1920+0 (normal left inverted right x axis y axis) 367mm x 275mm
   1600x1200     60.00*+
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
   720x400       70.08  

however I was able to recover from it as described in the first post.

AMDmi3 commented 7 years ago

My guess is that since in my case Xorg startup is what initiates intel driver load and initialization, there is a race condition, in which there's high probability of Xorg communicating with the driver before it was able to discover and initialize all the outputs, so Xorg ends up not seeing them until it's restarted.

The problem with disconnecting both displays is probably a separate bug.