ch11ng / exwm

Emacs X Window Manager
2.85k stars 134 forks source link

Error in exwm-randr--refresh #561

Closed QiangF closed 5 years ago

QiangF commented 5 years ago

EXWM 0.22.1 on Debian 9 with emacs 26.

Debugger entered--Lisp error: (wrong-type-argument (or eieio-object class) nil obj) signal(wrong-type-argument ((or eieio-object class) nil obj)) slot-value(nil timestamp) exwm-randr--get-monitors() exwm-randr--refresh()

ch11ng commented 5 years ago

Is there any monitor in the output of xrandr --listactivemonitors and xrandr --listmonitors? An RandR 1.5 compatible X server is required to use the exwm-randr module.

QiangF commented 5 years ago

The output is :

q@debian$ xrandr --listactivemonitors
Monitors: 1
0: +*VGA-0 1360/360x768/203+0+0  VGA-0

q@debian$ xrandr --listmonitors
Monitors: 1
0: +*VGA-0 1360/360x768/203+0+0  VGA-0

q@debian$ xrandr
Screen 0: minimum 8 x 8, current 1360 x 768, maximum 16384 x 16384
VGA-0 connected primary 1360x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768      60.00 +
1360x768      59.96*   59.80  
1152x864      60.00  
800x600       72.19    60.32    56.25  
680x384       59.96    59.80  
640x480       59.94  
512x384       60.00  
400x300       72.19  
320x240       60.05  
DVI-D-0 connected (normal left inverted right x axis y axis)
800x600       60.32 +
HDMI-0 disconnected (normal left inverted right x axis y axis)
QiangF commented 5 years ago
q@debian$  xrandr --version
xrandr program version       1.5.0
Server reports RandR version 1.5
ch11ng commented 5 years ago

It looks OK. What's the result of the following form?

(xcb:+request+reply exwm--connection
    (make-instance 'xcb:randr:GetMonitors
                   :window exwm--root
                   :get-active 1))
QiangF commented 5 years ago

https://gist.github.com/QiangF/864ce24ac7fb63ff7a535af80ce7f9df

ch11ng commented 5 years ago

And what's the values of the followings:

(xcb:marshal (make-instance 'xcb:randr:GetMonitors
                            :window exwm--root
                            :get-active 1))

(slot-value exwm--connection 'extension-opcode-plist)
ch11ng commented 5 years ago

The server just complained it received an xcb:SetInputFocus request with an incorrect length, which should be an xcb:randr:GetMonitors. So there seems to be some problem when encoding the request into wire format. What's the version of XELB and the platform on which Emacs runs?

QiangF commented 5 years ago

I am using xelb 0.17. The output of

(xcb:marshal (make-instance 'xcb:randr:GetMonitors
                            :window exwm--root
                            :get-active 1))
(slot-value exwm--connection 'extension-opcode-plist)

is:

[42 146 2 0 0 1](xcb:render 139 xcb:xkb 135)
ch11ng commented 5 years ago

The problem is with the xcb:randr module not being correctly initialized. Since your server does support RandR, there should some problem in the client side. Do you have (exwm-randr-enable) in your config file (in case you call exwm-randr-refresh manually)? If so, does (slot-value (xcb:get-extension-data exwm--connection 'xcb:randr) 'major-opcode) fail to report a number?

QiangF commented 5 years ago

Ahh! I forgot to run (exwm-randr-enable). Sorry.