From 5521db80b17a05d5614f18feb4bb6305bef50f2d Mon Sep 17 00:00:00 2001 From: William Carroll Date: Sun, 2 Feb 2020 12:16:27 +0000 Subject: Attempt to debug xrandr behavior in display.el Currently, after I connect my monitor to my laptop, I run `display/enable-4k`, which will use `xrandr` to enable the display. The scaling of the enabled display is not what I expect. So I've habituated re-running the same function, `display/enable-4k`, which scales the display and meets my expectations. What's strange is that if instead of running `display/enable-4k` the first time from Emacs, I call `xrandr ...` from a terminal, this enables the display and scales it properly on the first invocation. I'm unsure how to explain this behavior. It's possible that a environment variable is set properly in the terminal that isn't set in my Emacs, but this is just a guess. I'm going to using a different invocation in display.el that explicitly passes the monitors dimensions. Let's see if that works. --- emacs/.emacs.d/wpc/display.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'emacs/.emacs.d/wpc/display.el') diff --git a/emacs/.emacs.d/wpc/display.el b/emacs/.emacs.d/wpc/display.el index 8e5b89030325..2a7bbe94247f 100644 --- a/emacs/.emacs.d/wpc/display.el +++ b/emacs/.emacs.d/wpc/display.el @@ -46,7 +46,7 @@ (prelude/start-process :name "display/enable-4k" :command (string/format - "xrandr --output %s --above %s --primary --auto --dpi 144" + "xrandr --output %s --above %s --primary --auto --size 3840x2160 --rate 30.00 --dpi 144" display/4k-monitor display/laptop-monitor))) -- cgit 1.4.1