You are not logged in.

#1 2018-08-19 06:23:30

perplexabot
Member
Registered: 2018-08-19
Posts: 12

Screen flicker upon rotating display using xrandr command

Hello,
I've been trying to understand the root of this problem for a while. Probably after a pacman -Syu or something I had one of my multi monitor setup start flickering everytime a mouse was moved on that particular monitor or if I started typing on a terminal or some window that was open on that same monitor it would start to flicker with every input. Tailing dmesg shows something like for every flicker observed:

radeon 0000:01:00.0: bo 0000000016adc55d don't has a mapping in vm 0000000014c98fab

Currently  in /etc/lightdm/lightdm.conf, i have:

display-setup-script=/etc/lightdm/greeter_setup.sh

     
and greeter_setup.sh is:

xrandr --output DVI-0 --mode 1920x1080 --output DisplayPort-0 --primary --mode 1920x1200 --rotate left --right-of DVI-0 --output DVI-1 --mode 1920x1080 --right-of DisplayPort-0

What is interesting is that if I comment out that xrandr line in my script. Everything boots up properly with no flickers and no dmesg pollution BUT my display isn't rotated : ( and they are not in the correct order. If I uncomment that line the rotated screen flickers as described above (but they displays will be in the correct order and orientation).

During a no flicker boot (commented xrandr command), running xrandr:

$ xrandr 
Screen 0: minimum 320 x 200, current 5760 x 1200, maximum 16384 x 16384
DisplayPort-0 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98  
   1920x1080i    60.00    50.00    59.94  
   1600x1200     60.00  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x576i      50.00  
   720x480       60.00    59.94  
   720x480i      60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08  
HDMI-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1280x800      59.91  
   1152x864      75.00  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  
DVI-1 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1280x800      59.91  
   1152x864      75.00  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  

I'm still trying to figure this out... Any input would be appreciated.
Thank you!

Last edited by perplexabot (2018-08-20 02:42:52)

Offline

#2 2018-08-19 07:07:30

seth
Member
Registered: 2012-09-03
Posts: 51,222

Re: Screen flicker upon rotating display using xrandr command

What's the xrandr output for a flickering session?
What if you omit only the rotation from the xrandr setup?

Online

#3 2018-08-19 07:16:46

perplexabot
Member
Registered: 2018-08-19
Posts: 12

Re: Screen flicker upon rotating display using xrandr command

flickering session xrandr:

$ xrandr 
Screen 0: minimum 320 x 200, current 5040 x 1920, maximum 16384 x 16384
DisplayPort-0 connected primary 1200x1920+1920+0 left (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98  
   1920x1080i    60.00    50.00    59.94  
   1600x1200     60.00  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x576i      50.00  
   720x480       60.00    59.94  
   720x480i      60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08  
HDMI-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1280x800      59.91  
   1152x864      75.00  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  
DVI-1 connected 1920x1080+3120+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1280x800      59.91  
   1152x864      75.00  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  

"What if you omit only the rotation from the xrandr setup?"
No flickering, xrandr:

Screen 0: minimum 320 x 200, current 5760 x 1200, maximum 16384 x 16384
DisplayPort-0 connected primary 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98  
   1920x1080i    60.00    50.00    59.94  
   1600x1200     60.00  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x576i      50.00  
   720x480       60.00    59.94  
   720x480i      60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08  
HDMI-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1280x800      59.91  
   1152x864      75.00  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  
DVI-1 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1280x800      59.91  
   1152x864      75.00  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  

EDIT:

I also want to add that this happens on any of the monitors and rotating left or right results in the same thing. rotating inverted does not cause the screen to flicker.

When the "flickering" happens on the rotated display, everything flickers except the mouse cursor.

Last edited by perplexabot (2018-08-19 07:50:59)

Offline

#4 2018-08-19 13:21:17

seth
Member
Registered: 2012-09-03
Posts: 51,222

Re: Screen flicker upon rotating display using xrandr command

What if you only rotate one output and keep the others off?
What if you go w/ only two monitors, one roated? What if you rotate both?

Online

#5 2018-08-20 00:52:16

perplexabot
Member
Registered: 2018-08-19
Posts: 12

Re: Screen flicker upon rotating display using xrandr command

seth wrote:

What if you only rotate one output and keep the others off?

The rotated displays flickers.

seth wrote:

What if you go w/ only two monitors, one roated?

The rotated display flickers.

seth wrote:

What if you rotate both?

Rotating two and turning the third off results in DisplayPort-0 flickering (with the other rotated and not flickering):

        xrandr --output DVI-0 --mode 1920x1080 --rotate left --output DisplayPort-0 --primary --mode 1920x1200 --rotate right --right-of DVI-0 --output DVI-1 --off
                results in second rotated display flickering (DisplayPort-0 flickers)
        xrandr --output DVI-0 --primary --mode 1920x1080 --rotate left --output DisplayPort-0 --mode 1920x1200 --rotate right --right-of DVI-0 --output DVI-1 --off
                same results as above
        xrandr --output DisplayPort-0 --mode 1920x1200 --rotate left --output DVI-0 --primary --mode 1920x1080 --rotate right --right-of DisplayPort-0 --output DVI-1 --off
                same results as above

Last edited by perplexabot (2018-08-20 00:53:59)

Offline

#6 2018-08-20 05:38:11

seth
Member
Registered: 2012-09-03
Posts: 51,222

Re: Screen flicker upon rotating display using xrandr command

IOW only rotated DisplayPort-0 flickers, no matter what. (?)
What if you drive it at 1080x1920 (Ie. rotated 1920x1080)

Is this a direct connection or is there an adapter involved?

Online

#7 2018-08-22 19:19:16

perplexabot
Member
Registered: 2018-08-19
Posts: 12

Re: Screen flicker upon rotating display using xrandr command

seth wrote:

IOW only rotated DisplayPort-0 flickers, no matter what. (?)

No, any rotated display will flicker if it is the only one on and rotated (IOW I am able to get the other displays, like DVI-0, to produce the same flickering after a rotate).
That is actually why HDMI-0 is off, unplugged. Initially it was HDMI-0 that was exhibiting this issue and I thought it must be the monitor, so I unplugged it and the next monitor that was rotated started to show the same problems.

seth wrote:

What if you drive it at 1080x1920 (Ie. rotated 1920x1080)

Tried this suggestion on DisplayPort-0 and it still flickers. This suggestion made me try --auto for DisplayPort-0. So after booting in as normal (all displays not rotated), I then did:

xrandr --output DisplayPort-0 --mode 1920x1080 --rotate left
    #flicker occured.
xrandr --output DisplayPort-0 --auto
    #no flicker and rotated! wtf?!

Will do a little more digging. I wonder if this occured due to the sequence of commands above or was completely due to the second command. Will reboot and try again. Will let you know.

seth wrote:

Is this a direct connection or is there an adapter involved?

Straight from my graphics card to the monitor.

Offline

#8 2018-08-22 19:45:06

perplexabot
Member
Registered: 2018-08-19
Posts: 12

Re: Screen flicker upon rotating display using xrandr command

perplexabot wrote:
xrandr --output DisplayPort-0 --mode 1920x1080 --rotate left
    #flicker occured.
xrandr --output DisplayPort-0 --auto
    #no flicker and rotated! wtf?!

Will do a little more digging. I wonder if this occured due to the sequence of commands above or was completely due to the second command. Will reboot and try again. Will let you know.

Wow, so apparently if I run both commands one after another (and only in that order) my monitor stops flickering (WTF). Neither of the commands will work alone. Even stranger is that if I just add those lines to my
greeter_setup.sh, severe flickering occurs (like I can't even see the background anymore). So the above sequence of commands works from command line after a boot but not during lightdm boot up.
Seems like there are multiple issues going on...

Seth, thank you for the great ideas, any more? : p

Last edited by perplexabot (2018-08-22 19:45:56)

Offline

#9 2018-08-22 20:01:46

seth
Member
Registered: 2012-09-03
Posts: 51,222

Re: Screen flicker upon rotating display using xrandr command

The resolution doesn't impact the rotation flag, so that's expected.
The "works later" part is weird, though.

a) can you get away w/ just "xrandr --output DisplayPort-0 --auto --rotate left" (ie. never select a mode but always rely on auto-selection)
b) what if you delay the command in the lightdm setup (lightdm might try to randr-control itself, causing some interference), sth. like

(sleep 5; xrandr --output DisplayPort-0 --auto --rotate left) &

Online

#10 2018-08-22 20:42:59

perplexabot
Member
Registered: 2018-08-19
Posts: 12

Re: Screen flicker upon rotating display using xrandr command

seth wrote:

The resolution doesn't impact the rotation flag, so that's expected.
The "works later" part is weird, though.

It does, if I use 1920x1200, the above sequence results in rotated with flicker. If use 1920x1080 in the above (as shown) then I get a rotated and none flickering display

seth wrote:

a) can you get away w/ just "xrandr --output DisplayPort-0 --auto --rotate left" (ie. never select a mode but always rely on auto-selection)

No, that doesn't work, I have to use the two xrandrs from above and only in that order.

seth wrote:

b) what if you delay the command in the lightdm setup (lightdm might try to randr-control itself, causing some interference), sth. like

(sleep 5; xrandr --output DisplayPort-0 --auto --rotate left) &

Surprisingly that still doesn't work.

Last edited by perplexabot (2018-08-22 20:49:59)

Offline

#11 2018-08-23 11:46:34

seth
Member
Registered: 2012-09-03
Posts: 51,222

Re: Screen flicker upon rotating display using xrandr command

The actual resolution change (1080 -> 1200) on the rotated screen seems crucial.
Did you also try

(sleep 5; xrandr --output DisplayPort-0 --mode 1920x1080 --rotate left; sleep 1; xrandr --output DisplayPort-0 --auto) &

?

Online

Board footer

Powered by FluxBB