Configurando monitores externos com script xrandr para o ubuntu 16.04 falha durante a sessão de login

0

Eu tenho o seguinte script para trocar dinamicamente para monitores externos:

#!/bin/bash     
xrandr --output LVDS-1-1 --off    
xrandr --output DP-2 --auto    
xrandr --output DP-4 --auto --right-of DP-2

Isso funciona perfeitamente quando executado.

No entanto, se o sistema for deixado inativo, eventualmente a tela do monitor externo se corrompe, com o monitor externo esquerdo exibindo a saída same como a direita, e a posição da tela mudando conforme eu movo o mouse sobre ele.

Se eu, então, executar novamente o script acima, tudo estará bem.

De alguma forma, as configurações do X Server não são 'hold'.

O que posso fazer sobre isso?

chris@ubuntu:~$ xrandr -q    
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 16384 x 16384    
LVDS-0 disconnected (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 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm
   1920x1080     60.00*+  59.94    50.00    60.00    50.04  
   1680x1050     59.95  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.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-3 disconnected (normal left inverted right x axis y axis)

DP-4 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 509mm x 286mm
   1920x1080     60.00*+  59.94    50.00    60.00    50.04  
   1680x1050     59.95  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.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-5 disconnected (normal left inverted right x axis y axis)

LVDS-1-1 connected
   1600x900      60.00 +  50.00  
   1440x900      59.89  
   1360x768      59.80    59.96  
   1152x864      60.00  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   960x600       60.00  
   960x540       59.99  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   800x512       60.17  
   700x525       59.98  
   640x512       60.02  
   720x450       59.89  
   640x480       60.00    59.94  
   680x384       59.80    59.96  
   576x432       60.06  
   512x384       60.00  
   400x300       60.32    56.34  
   320x240       60.05  

VGA-1-1 disconnected
  1440x900 (0x46) 106.500MHz -HSync +VSync

h: width  1440 start 1520 end 1672 total 1904 skew    0 clock  55.93KHz

v: height  900 start  903 end  909 total  934           clock  59.89Hz
  1024x768 (0x4b) 65.000MHz -HSync -VSync

h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz

v: height  768 start  771 end  777 total  806           clock  60.00Hz
  800x600 (0x52) 40.000MHz +HSync +VSync

h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz

v: height  600 start  601 end  605 total  628           clock  60.32Hz
  800x600 (0x53) 36.000MHz +HSync +VSync

h: width   800 start  824 end  896 total 1024 skew    0 clock  35.16KHz

v: height  600 start  601 end  603 total  625           clock  56.25Hz
  640x480 (0x5b) 25.175MHz -HSync -VSync

h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz

v: height  480 start  490 end  492 total  525           clock  59.94Hz
    
por Chris Leake 26.01.2017 / 14:33

0 respostas