You are not logged in.

#1 2020-03-23 22:04:05

miomio
Member
Registered: 2016-01-17
Posts: 167

[SOLVED] Advice on dwm with multiple monitors

In ~/.xinitrc I do:

~/.local/bin/setmonitorsfordwm &
picom --config ~/.config/picom.conf -b &
feh --bg-fill --randomize --no-fehbg ~/img/landscapes/* &
dwmbar 2> ~/.dwmbar.log & 

while true; do
    # Log stderror to log file
    dwm 2> ~/.dwm.log
#    # No error logging
#    dwm >/dev/null 2>&1
done

~/.local/bin/setmonitorsfordwm:

xrandr --output DP2-1 --rotate left --auto --right-of eDP1
xrandr --output DP2-2 --auto --left-of eDP1

No changes to default ~/.config/picom.conf except for addition of opacity rules and blur:

opacity-rule = [
  "90:class_g = 'st-256color' && focused",
  "60:class_g = 'st-256color' && !focused"
];

# Blur
blur-background = true;
blur-method = "kawase";
blur-strength = 4;

What I'm currently experiencing is after `startx` I am not able to do anything with the right half of my primary centre screen and none of my right monitor unless I kill picom process. When I kill picom process I can now use right monitor, but the wallpaper is overspilling to my centre monitor and the bottom half of my portrait rotated right monitor is black.

What's the best approach here - xinerama/multihead?

Last edited by miomio (2020-03-28 14:01:28)

Offline

#2 2020-03-23 22:53:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,516
Website

Re: [SOLVED] Advice on dwm with multiple monitors

Don't background setmonitorsfordwm script.  That's likely resulting in an unpredictable race between xrandr setting up the monitor and picom, feh, and dwm trying to read the screen geometry.  There's also no need for two calls to xrandr, that should all be one xrandr command.

Last edited by Trilby (2020-03-23 22:54:46)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2020-03-24 12:50:54

miomio
Member
Registered: 2016-01-17
Posts: 167

Re: [SOLVED] Advice on dwm with multiple monitors

Trilby wrote:

Don't background setmonitorsfordwm script.  That's likely resulting in an unpredictable race between xrandr setting up the monitor and picom, feh, and dwm trying to read the screen geometry.  There's also no need for two calls to xrandr, that should all be one xrandr command.

Oh that was it: a single xrandr call specifying two --output's. Many thanks. However, I'm still doing setmonitorsfordwm script. I'll test later without.

Offline

#4 2020-03-24 12:57:58

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,516
Website

Re: [SOLVED] Advice on dwm with multiple monitors

Having one call to xrandr would be good, but not backgrounding the script was the far more important part.

If you switched to one xrandr call but kept the script backgrounded, you may have just sped up one side of the race condition but not elimitated it - so the problem might still sporadically show up, just less often.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2020-03-24 13:04:47

miomio
Member
Registered: 2016-01-17
Posts: 167

Re: [SOLVED] Advice on dwm with multiple monitors

I've removed the ampersand in ~/.xinitrc for that line.

Offline

Board footer

Powered by FluxBB