Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

randr changes are not handled #59

Open
dakyskye opened this issue Jun 19, 2020 · 12 comments
Open

randr changes are not handled #59

dakyskye opened this issue Jun 19, 2020 · 12 comments
Labels
enhancement New feature or request
Milestone

Comments

@dakyskye
Copy link
Contributor

dakyskye commented Jun 19, 2020

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 dakyskye added the bug Something isn't working label Jun 19, 2020
@dakyskye
Copy link
Contributor Author

dakyskye commented Jun 19, 2020

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.

@avahe-kellenberger
Copy link
Owner

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

@avahe-kellenberger
Copy link
Owner

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 avahe-kellenberger changed the title Bar does not appear on my second monitor randr changes are not handled Aug 15, 2020
@avahe-kellenberger avahe-kellenberger added enhancement New feature or request and removed bug Something isn't working labels Aug 15, 2020
@avahe-kellenberger avahe-kellenberger added this to the 1.0 milestone Sep 18, 2020
@avahe-kellenberger
Copy link
Owner

avahe-kellenberger commented Aug 28, 2021

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).

@HeCodes2Much
Copy link

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

@avahe-kellenberger
Copy link
Owner

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

@HeCodes2Much
Copy link

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 :)

@avahe-kellenberger
Copy link
Owner

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

@HeCodes2Much
Copy link

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

@HeCodes2Much
Copy link

HeCodes2Much commented Jun 26, 2022

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

@HeCodes2Much
Copy link

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

@avahe-kellenberger
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants