nimdow icon indicating copy to clipboard operation
nimdow copied to clipboard

randr changes are not handled

Open dakyskye opened this issue 5 years ago • 12 comments

Describe the bug I have custom xrandr setup, and bar only appears on ONE of the my screens, not on both.

To Reproduce

  1. write custom xrandr config to $HOME/.xprofile
  2. log out
  3. log in
  4. see it

Expected behavior Bar should be drawn on both monitors

Screenshots image

Additional context That's my .xprofile content:

xrandr --output DisplayPort-0 --off --output DisplayPort-1 --off --output HDMI-A-0 --mode 1920x1080 --pos 1360x0 --rotate normal --output HDMI-A-1 --mode 1360x768 --pos 0x312 --rotate normal --output DVI-D-0 --off

dakyskye avatar Jun 19 '20 13:06 dakyskye

I turned it into xorg config file:

Section "Monitor"
	Identifier  "HDMI-A-0"
	Option      "Primary" "true"
	Option      "PreferredMode" "1920x1080"
	Option      "TargetRefresh" "60"
EndSection

Section "Monitor"
	Identifier  "HDMI-A-1"
	Option      "LeftOf" "HDMI-A-0"
	Option      "PreferredMode" "1360x768"
	Option      "TargetRefresh" "60"
EndSection

and it now works fine. But it should also work work with my previous method.

dakyskye avatar Jun 19 '20 14:06 dakyskye

Nimdow doesn't detect changes to the monitor layouts yet, but this would be good to add soon

avahe-kellenberger avatar Jun 19 '20 14:06 avahe-kellenberger

Some thoughts: we should receive a ConfigureNotify event for the root window when this happens. At that point, we can adjust the size of each monitor and its bars

avahe-kellenberger avatar Jun 19 '20 15:06 avahe-kellenberger

Notes

man 3 xrandr:

A XRRScreenChangeNotifyEvent is sent to a client that has requested notification whenever the screen configuration is changed. A client can perform this request by calling XRRSelectInput, passing the display, the root window, and the RRScreenChangeNotifyMask mask.


May not need xrandr here.

See how dwm handles this (configurenotify and updategeom functions).

avahe-kellenberger avatar Aug 28 '21 01:08 avahe-kellenberger

2 years and still not been done? any update when multi monitor will work?

CreativeCodeCat avatar Jun 26 '22 15:06 CreativeCodeCat

Multi-monitor works well, just not changes made after Nimdow has been started

avahe-kellenberger avatar Jun 26 '22 17:06 avahe-kellenberger

I did try to get multi monitor to work on arch but failed to get it working :) I can get the wallpaper on both but it doesn't let me move things to the 2nd monitor or even open anything on it even if rules tell it too :) it doesn't seem to like xrandr :)

CreativeCodeCat avatar Jun 26 '22 20:06 CreativeCodeCat

Yes, you need to set up your monitor layout before starting Nimdow - many of us, myself including, are using 2+ monitors just fine

avahe-kellenberger avatar Jun 26 '22 20:06 avahe-kellenberger

I did try the xorg config above but with one being Nvidia and other being Intel they don't seem to want to play nice :) eDP1 and HDMI-1-0 are my monitors one being the laptop and the other being Nvidia HDMI. I have no idea why it can only pick up 1 or the other it doesn't wanna activate HDMI and eDP at the same time

CreativeCodeCat avatar Jun 26 '22 20:06 CreativeCodeCat

I have just tried the config below but it still has the 2nd monitor as inactive in arandr

Section "Monitor"
	Identifier  "eDP1"
	Option      "Primary" "true"
	Option      "PreferredMode" "1920x1080"
	Option      "TargetRefresh" "60"
	Option      "Enable" "true"
EndSection

Section "Monitor"
	Identifier  "HDMI-1-0"
	Option      "RightOf" "eDP1"
	Option      "PreferredMode" "1920x1080"
	Option      "TargetRefresh" "60"
	Option      "Enable" "true"
EndSection

CreativeCodeCat avatar Jun 26 '22 21:06 CreativeCodeCat

i even tried the code below to see if i can get the gpu and the laptop both working but still no dice

Section "ServerLayout"
    Identifier "Layout0"
    Screen 0 "Screen0"
    Screen 1 "Screen1" LeftOf "Screen0"
    InputDevice "Keyboard0" "CoreKeyboard"
    InputDevice "Mouse0" "CorePointer"
    Option "AllowNVIDIAGPUScreens"
    Option "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "Emulate3Buttons" "no"
    Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
EndSection

Section "Monitor"
    Identifier "Monitor0"
    VendorName "Unknown"
    ModelName "Unknown"
    Option "dpms" "on"
EndSection

Section "Monitor"
    Identifier "Monitor1"
    VendorName "Unknown"
    ModelName "Unknown"
    Option "dpms" "on"
EndSection

Section "Device" # This is the cool NVIDIA GPU
    Identifier "Device0"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    Screen 0
EndSection

Section "Device" # This is the built-in GPU
    Identifier "Device1"
    Driver "intel"
    Screen 1
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "Device0"
    Monitor "Monitor0"
    DefaultDepth 24
EndSection

Section "Screen"
    Identifier "Screen1"
    Device "Device1"
    Monitor "Monitor1"
    DefaultDepth 24
EndSection

CreativeCodeCat avatar Jun 26 '22 22:06 CreativeCodeCat

People in the discord may be able to help you, or any general Linux forum. This is about getting your config correct and doesn't have to do with Nimdow

avahe-kellenberger avatar Jun 27 '22 00:06 avahe-kellenberger