ch11ng / xelb

X protocol Emacs Lisp Binding
216 stars 21 forks source link

Retrieve reply timeout with MST #11

Closed fm4d closed 8 years ago

fm4d commented 8 years ago

EXWM/XELB is crashing with this error https://gist.github.com/fm4d/a6f2c115f1db275e7a82ac2ef40398fb when I am trying to make my 2 daisy-chained external monitors work via following command.

(add-hook 'exwm-randr-screen-change-hook
     (lambda ()
         (start-process-shell-command
             "xrandr" nil "xrandr --output eDP1 --mode 1920x1080 --output DP1-1 --right-of eDP1 --output DP1-2 --right-of DP1-1")))

Xrandr seems to be fine, runniing this command outside of EXWM creates monitor setup as expected.

ch11ng commented 8 years ago

Could you insert

(message "EXWM:RANDR:OUTPUT: %s" output)

just below Line 72 in exwm-randr.el ((dolist (output outputs)) and show me the content of the *Messages* buffer together with the output of

DISPLAY=:0 xrandr --verbose

executed in console?

fm4d commented 8 years ago

EXWM:RANDR:OUTPUT: 67 https://gist.github.com/fm4d/e9f193c376800aaed780bca3df084efc

fm4d commented 8 years ago

I found out that the bug is not present only with the xrandr setup above but with any setup as long as I have DP1.2 / MST enabled on my monitor and I have these two monitors daisy-chained. For example xrandr --output eDP1 --mode 1920x1080 --output DP1-1 --right-of eDP1 --auto --output DP1-2 --off is also timing out with the same error.

EDIT: After some fight I made it work by not calling xrandr in exwm-randr-screen-change-hook but calling exwm-randr--reset manually after setting xrandr via console ( and having workspace-output-plist set accordingly), I will try to look deeper into exwm-randr code later.

ch11ng commented 8 years ago

I can't find any problem from your last Gist. You first Gist indicates that a GetOutputInfo request was failed but the inputs for that request were from a preceding GetScreenResources request which should ensure all inputs are valid. So it's kind of weird.

Besides, which version of Emacs do you use? The RandR code can be problematic on Emacs 24.

fm4d commented 8 years ago

25.0.92.1

ch11ng commented 8 years ago

Or could you insert the following lines at the end of your .emacs:

(add-hook 'exwm-randr-screen-change-hook
          (lambda ()
            (start-process-shell-command
             "randr-test" nil "date >> ~/randr-test.txt; xrandr --verbose >> ~/randr-test.txt")))

and show me the content of ~/randr-test.txt?

fm4d commented 8 years ago

https://gist.github.com/fm4d/49a7ae70e8b802aeb7b85392abcae2a2

ch11ng commented 8 years ago

Well, there seems to be nothing wrong again. Considered that you can do the refresh manually, what if you set that hook after EXWM has been initialized?

fm4d commented 8 years ago

Actually it is totally incosistent, I am only able to make it work manually IF there is the exwm-randr-screen-change-hook that ends with xelb timeout. I actually have a feeling that xrandr could be the source of the problem, linux is just somehow not prepared for DP1.2 because I also experience weird graphical glitches and blackouts etc.

fm4d commented 8 years ago

It seems like I fixed it with xf86-video-modesetting instead of xf86-video-intel so feel free to close this as it really seems to be caused by driver.

ch11ng commented 8 years ago

All right, I'm closing it.