I am having problems setting up a second monitor to my laptop. I am running bspwm.
I have never user xrandr before, so I am not entirely sure what to do or whether my system is working properly.
Before connecting my HDMI cable, the output of xrandr-q shows DP-1 as disconnected. Once I connect the cable, xrandr -q says DP-1 is connected and it displays all the available resolutions and rates. So far, so good?
Now, when executing xrandr --output DP-1 --mode 1920x1080 --rate 60 --right-of eDP-1, my laptop screen goes black for a second, then returns, and that is it. My HDMI monitor remains black (it is on BTW!) It looks like I can move the mouse off the right edge of the screen, but nothing is shown on the HDMI display.
I think arandr just executes xrandr commands in the background. Anyway, I have tried it, and I get the same results. When I apply the new layout, my laptop display goes black for a second, but nothing is displayed on my HDMI monitor.
OK. Discovered something quite by accident. If I switch to a TTY screen, all of a sudden my display is mirrored on my HDMI monitor. If I then switch back to X, now the HDMI monitor is doing what I specified in the last xrandr statement I ran.
So, I played with this a bit and found that if I disconnect the HDMI cable, then reconnect it, I have to switch to a TTY then back to X to get the external display working.
Just one quick check, have you tried specifying the complete layout at once?: xrandr --output eDP-1 --auto --output DP-1 --auto --right-of eDP-1
Anyway. After the tty switch, when your monitor is working in X, do a xrandr --verbose and take notes of the crtc ids for eDP-1 and DP-1 (every active output has line CRTC: $id). Now, you should be able to reproduce the configuration by specifying the crtc id in the xrandr call.
No, it’s not that, because after the TTY switch trick, the display turns on and see the proper background image. Before that, if I try to move a window to the external monitor, it remains black. In fact, the monitor goes into standby, as if there is no signal at all. It is only after the TTY trick that the display recognizes a signal.