Mantenha a rotação da tela após o monitor ser ligado / desligado

1

Eu tenho o Ubuntu 14.04 com login automático para minha sessão e gráficos da Intel. Meu objetivo é ser capaz de iniciar o Ubuntu sem nenhuma tela conectada. Eu também quero girar para a esquerda.

Na verdade, se eu iniciar meu monitor DP ou HDMI após a inicialização, não consigo trabalhar. O servidor X não pode ser iniciado. No passado eu tinha placa gráfica Nvidia e era possível com o parâmetro allowemptyinitialconfiguration. Para meu cartão de inteligência, tentei com uma interface fictícia, mas sempre exibe uma tela preta quando meu monitor está ligado.

Além disso, se eu ligar e iniciar o meu monitor antes de inicializar o ubuntu, eu tenho a tela funcionando, mas a rotação não se mantém após o desligamento e no monitor.

Eu tentei usar o monitors.xml em ~ / .conf /, mas essa solução só funciona para um fornecedor e um modelo de exibição. Eu gostaria de fazer isso funcionar para qualquer exibição.
Outra solução que encontrei é usar as regras do udev para detectar alterações e executar um script que usará o xrandr para configurar a rotação. Esta solução parece funcionar, mas às vezes não gira.

Esta é a saída de xrandr --verbose & ls /sys/class/drm/*/edid | xargs -i{} sh -c "echo {}; parse-edid < {}"

/sys/class/drm/card0-DP-1/edid
Partial Read... Try again
/sys/class/drm/card0-DP-2/edid
Checksum Correct

Section "Monitor"
      Identifier "X474HB"
      ModelName "X474HB"
      VendorName "NEC"
      # Monitor Manufactured week 4 of 2015
      # EDID version 1.4
      # Digital Display
      DisplaySize 1040 590
      Gamma 2.20
      Option "DPMS" "true"
      Horizsync 28-92
      VertRefresh 23-85
      # Maximum pixel clock is 300MHz
      #Not giving standard mode: 1280x720, 60Hz
      #Not giving standard mode: 1280x800, 60Hz
      #Not giving standard mode: 1280x1024, 60Hz
      #Not giving standard mode: 1400x1050, 60Hz
      #Not giving standard mode: 1440x900, 60Hz
      #Not giving standard mode: 1600x1200, 60Hz
      #Not giving standard mode: 1680x1050, 60Hz
      #Not giving standard mode: 1920x1200, 60Hz

      #Extension block found. Parsing...
Hmm, you have data blocks, but not video ones... weird
Something strange happened. Please contact the author,
Matthew Kern at <[email protected]>
/sys/class/drm/card0-HDMI-A-1/edid
Partial Read... Try again
/sys/class/drm/card0-HDMI-A-2/edid
Partial Read... Try again
/sys/class/drm/card0-VGA-1/edid
Partial Read... Try again
root@cartelmatic:~# Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP1 disconnected (normal left inverted right x axis y axis)
      Identifier: 0x42
      Timestamp:  8923
      Subpixel:   unknown
      Clones:
      CRTCs:      0 1
      Transform:  1.000000 0.000000 0.000000
                  0.000000 1.000000 0.000000
                  0.000000 0.000000 1.000000
                 filter:
      Broadcast RGB: Automatic
        supported: Automatic, Full, Limited 16:235
      audio: auto
        supported: force-dvi, off, auto, on
DP2 connected primary 1920x1080+0+0 (0x49) normal (normal left inverted right x axis y axis) 1040mm x 585mm
      Identifier: 0x43
      Timestamp:  8923
      Subpixel:   unknown
      Gamma:      1.0:1.0:1.0
      Brightness: 1.0
      Clones:
      CRTC:       0
      CRTCs:      0 1
      Transform:  1.000000 0.000000 0.000000
                  0.000000 1.000000 0.000000
                  0.000000 0.000000 1.000000
                 filter:
      _MUTTER_PRESENTATION_OUTPUT: 0
      EDID:
        00ffffffffffff0038a33e2b01010101
        04190104a5683b78e2927ba4564f9a27
        0f474aa1090081c08100818090409500
        a940b300d100023a801871382d40582c
        450010494200001e000000fd0017551c
        5c1e000a202020202020000000fc0058
        34373448420a202020202020000000ff
        0035313030303038344e4120200a011d
        020318c14b900504130312141f202122
        23090707830100000e1f008051001e30
        4080370010494200001c662150b05100
        1b304070360010494200001e662156aa
        51001e30468f330010494200001e0474
        007cf6705a80fc588a0010494200001e
        04740030f2705a80b0588a0010494200
        001e0000000000000000000000000025
      Broadcast RGB: Automatic
        supported: Automatic, Full, Limited 16:235
      audio: auto
        supported: force-dvi, off, auto, on
  1920x1080 (0x49)  148.5MHz +HSync +VSync *current +preferred
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   67.5KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   60.0Hz
  3840x2160 (0xbc)  297.0MHz +HSync +VSync
        h: width  3840 start 4016 end 4104 total 4400 skew    0 clock   67.5KHz
        v: height 2160 start 2168 end 2178 total 2250           clock   30.0Hz
  3840x2160 (0xbd)  297.0MHz +HSync +VSync
        h: width  3840 start 4092 end 4180 total 5500 skew    0 clock   54.0KHz
        v: height 2160 start 2168 end 2178 total 2250           clock   24.0Hz
  3840x2160 (0xbe)  296.7MHz +HSync +VSync
        h: width  3840 start 4016 end 4104 total 4400 skew    0 clock   67.4KHz
        v: height 2160 start 2168 end 2178 total 2250           clock   30.0Hz
  1920x1200 (0xbf)  193.2MHz -HSync +VSync
        h: width  1920 start 2056 end 2256 total 2592 skew    0 clock   74.6KHz
        v: height 1200 start 1203 end 1209 total 1245           clock   59.9Hz
  1920x1080 (0xc0)  148.5MHz +HSync +VSync
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock   56.2KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   50.0Hz
  1920x1080 (0xc1)  148.4MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   67.4KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   59.9Hz
  1920x1080i (0xc2)   74.2MHz +HSync +VSync Interlace
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   33.8KHz
        v: height 1080 start 1084 end 1094 total 1125           clock   60.1Hz
  1920x1080i (0xc3)   74.2MHz +HSync +VSync Interlace
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock   28.1KHz
        v: height 1080 start 1084 end 1094 total 1125           clock   50.0Hz
  1920x1080 (0xc4)   74.2MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   33.8KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   30.0Hz
  1920x1080 (0xc5)   74.2MHz +HSync +VSync
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock   28.1KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   25.0Hz
  1920x1080 (0xc6)   74.2MHz +HSync +VSync
        h: width  1920 start 2558 end 2602 total 2750 skew    0 clock   27.0KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   24.0Hz
  1920x1080i (0xc7)   74.2MHz +HSync +VSync Interlace
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   33.7KHz
        v: height 1080 start 1084 end 1094 total 1125           clock   60.0Hz
  1920x1080 (0xc8)   74.2MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   33.7KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   30.0Hz
  1920x1080 (0xc9)   74.2MHz +HSync +VSync
        h: width  1920 start 2558 end 2602 total 2750 skew    0 clock   27.0KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   24.0Hz
  1600x1200 (0xca)  162.0MHz +HSync +VSync
        h: width  1600 start 1664 end 1856 total 2160 skew    0 clock   75.0KHz
        v: height 1200 start 1201 end 1204 total 1250           clock   60.0Hz
  1680x1050 (0xcb)  146.2MHz -HSync +VSync
        h: width  1680 start 1784 end 1960 total 2240 skew    0 clock   65.3KHz
        v: height 1050 start 1053 end 1059 total 1089           clock   60.0Hz
  1400x1050 (0xcc)  121.8MHz -HSync +VSync
        h: width  1400 start 1488 end 1632 total 1864 skew    0 clock   65.3KHz
        v: height 1050 start 1053 end 1057 total 1089           clock   60.0Hz
  1280x1024 (0xcd)  135.0MHz +HSync +VSync
        h: width  1280 start 1296 end 1440 total 1688 skew    0 clock   80.0KHz
        v: height 1024 start 1025 end 1028 total 1066           clock   75.0Hz
  1280x1024 (0xce)  108.0MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock   64.0KHz
        v: height 1024 start 1025 end 1028 total 1066           clock   60.0Hz
  1440x900 (0xcf)  106.5MHz -HSync +VSync
        h: width  1440 start 1520 end 1672 total 1904 skew    0 clock   55.9KHz
        v: height  900 start  903 end  909 total  934           clock   59.9Hz
  1366x768 (0xd0)   85.5MHz +HSync +VSync
        h: width  1366 start 1436 end 1579 total 1792 skew    0 clock   47.7KHz
        v: height  768 start  771 end  774 total  798           clock   59.8Hz
  1360x768 (0xd1)   85.5MHz +HSync +VSync
        h: width  1360 start 1424 end 1536 total 1792 skew    0 clock   47.7KHz
        v: height  768 start  771 end  777 total  795           clock   60.0Hz
  1280x800 (0xd2)   83.5MHz +HSync -VSync
        h: width  1280 start 1352 end 1480 total 1680 skew    0 clock   49.7KHz
        v: height  800 start  803 end  809 total  831           clock   59.8Hz
  1280x768 (0xd3)   79.5MHz -HSync +VSync
        h: width  1280 start 1344 end 1472 total 1664 skew    0 clock   47.8KHz
        v: height  768 start  771 end  778 total  798           clock   59.9Hz
  1280x720 (0xd4)   74.4MHz -HSync +VSync
        h: width  1280 start 1336 end 1472 total 1664 skew    0 clock   44.7KHz
        v: height  720 start  721 end  724 total  746           clock   60.0Hz
  1280x720 (0xd5)   74.2MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock   45.0KHz
        v: height  720 start  725 end  730 total  750           clock   60.0Hz
  1280x720 (0xd6)   74.2MHz +HSync +VSync
        h: width  1280 start 1720 end 1760 total 1980 skew    0 clock   37.5KHz
        v: height  720 start  725 end  730 total  750           clock   50.0Hz
  1280x720 (0xd7)   74.2MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock   45.0KHz
        v: height  720 start  725 end  730 total  750           clock   59.9Hz
  1024x768 (0xd8)   65.0MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock   48.4KHz
        v: height  768 start  771 end  777 total  806           clock   60.0Hz
  800x600 (0xd9)   40.0MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock   37.9KHz
        v: height  600 start  601 end  605 total  628           clock   60.3Hz
  720x576 (0xda)   27.0MHz -HSync -VSync
        h: width   720 start  732 end  796 total  864 skew    0 clock   31.2KHz
        v: height  576 start  581 end  586 total  625           clock   50.0Hz
  720x480 (0xdb)   27.0MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock   31.5KHz
        v: height  480 start  489 end  495 total  525           clock   60.0Hz
  720x480 (0xdc)   27.0MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock   31.5KHz
        v: height  480 start  489 end  495 total  525           clock   59.9Hz
  640x480 (0xdd)   25.2MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock   31.5KHz
        v: height  480 start  490 end  492 total  525           clock   60.0Hz
  640x480 (0xde)   25.2MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock   31.5KHz
        v: height  480 start  490 end  492 total  525           clock   59.9Hz
  720x400 (0xdf)   28.3MHz -HSync +VSync
        h: width   720 start  738 end  846 total  900 skew    0 clock   31.5KHz
        v: height  400 start  412 end  414 total  449           clock   70.1Hz
HDMI1 disconnected (normal left inverted right x axis y axis)
      Identifier: 0x44
      Timestamp:  8923
      Subpixel:   unknown
      Clones:     VGA1
      CRTCs:      0 1
      Transform:  1.000000 0.000000 0.000000
                  0.000000 1.000000 0.000000
                  0.000000 0.000000 1.000000
                 filter:
      aspect ratio: Automatic
        supported: Automatic, 4:3, 16:9
      Broadcast RGB: Automatic
        supported: Automatic, Full, Limited 16:235
      audio: auto
        supported: force-dvi, off, auto, on
HDMI2 disconnected (normal left inverted right x axis y axis)
      Identifier: 0x45
      Timestamp:  8923
      Subpixel:   unknown
      Clones:     VGA1
      CRTCs:      0 1
      Transform:  1.000000 0.000000 0.000000
                  0.000000 1.000000 0.000000
                  0.000000 0.000000 1.000000
                 filter:
      aspect ratio: Automatic
        supported: Automatic, 4:3, 16:9
      Broadcast RGB: Automatic
        supported: Automatic, Full, Limited 16:235
      audio: auto
        supported: force-dvi, off, auto, on
VGA1 disconnected (normal left inverted right x axis y axis)
      Identifier: 0x46
      Timestamp:  8923
      Subpixel:   unknown
      Clones:     HDMI1 HDMI2
      CRTCs:      0 1
      Transform:  1.000000 0.000000 0.000000
                  0.000000 1.000000 0.000000
                  0.000000 0.000000 1.000000
                 filter:
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
      Identifier: 0x47
      Timestamp:  8923
      Subpixel:   no subpixels
      Clones:
      CRTCs:      2
      Transform:  1.000000 0.000000 0.000000
                  0.000000 1.000000 0.000000
                  0.000000 0.000000 1.000000
                 filter:

Se alguém já teve esse problema ou se você tem alguma solução, por favor ajude.

    
por Alexandre Rubert 17.06.2016 / 09:37

1 resposta

0

Finalmente, consegui que funcionasse. Eu não fiz nenhuma alteração na minha configuração do Ubuntu. Acabei de alterar os parâmetros no meu menu de TV. Para fazê-lo funcionar, mudo o sinal HDMI de RAW para EXPAND e DisplayPort 1.1a para 1.2. Agora posso iniciar o Ubuntu sem nenhum monitor conectado e a rotação da esquerda está ok depois de ligá-lo e desligá-lo.
Alguém pode me explicar esse comportamento?

    
por Alexandre Rubert 21.06.2016 / 11:31