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

Unable to set different monitor layout with 'wlr-randr' #5101

Closed
dantefromhell opened this issue Mar 13, 2024 · 8 comments
Closed

Unable to set different monitor layout with 'wlr-randr' #5101

dantefromhell opened this issue Mar 13, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@dantefromhell
Copy link

dantefromhell commented Mar 13, 2024

Hyprland Version

Hyprland, built from branch at commit 7ea555d ().
Date: 2024-03-13
Tag:

flags: (if any)

Bug or Regression?

Bug

Description

When using wlr-randr/ wdisplays or wlr-layout-ui to change the layout of my 2 screens no change occurs. The layout remains the same.

How to reproduce

  1. Initial layout after connecting 2nd monitor
❯ wlr-randr
DP-4 "Samsung Electric Company LU28R55 HNMNB00590 (DP-4 via HDMI)"
  Make: Samsung Electric Company
  Model: LU28R55
  Serial: HNMNB00590
  Physical size: 630x360 mm
  Enabled: yes
  Modes:
[SNIP]
  Position: 2256,0
  Transform: normal
  Scale: 1.000000
  Adaptive Sync: disabled
eDP-1 "BOE 0x095F (eDP-1)"
  Make: BOE
  Model: 0x095F
  Serial: (null)
  Physical size: 280x190 mm
  Enabled: yes
  Modes:
[SNIP]
  Position: 0,0
  Transform: normal
  Scale: 1.000000
  Adaptive Sync: disabled
  1. Manually apply layout change with wlr-randr
❯ wlr-randr --output DP-4 --on --pos 0,0 --mode 3840x2160 --output eDP-1 --on --pos 792,2160 --mode 2256x1504 ; echo "return code: $?"
return code: 0
  1. Layout after wlr-randr
❯ wlr-randr
DP-4 "Samsung Electric Company LU28R55 HNMNB00590 (DP-4 via HDMI)"
  Make: Samsung Electric Company
  Model: LU28R55
  Serial: HNMNB00590
  Physical size: 630x360 mm
  Enabled: yes
  Modes:
[SNIP]
  Position: 2256,0
  Transform: normal
  Scale: 1.000000
  Adaptive Sync: disabled
eDP-1 "BOE 0x095F (eDP-1)"
  Make: BOE
  Model: 0x095F
  Serial: (null)
  Physical size: 280x190 mm
  Enabled: yes
  Modes:
[SNIP]
  Position: 0,0
  Transform: normal
  Scale: 1.000000
  Adaptive Sync: disabled

Crash reports, logs, images, videos

The hyprland debug log shows

[LOG] [15:48:33.068242539] OutputMgr Applied/Tested.
[LOG] [15:48:33.068398917] Applying monitor rule for eDP-1
[LOG] [15:48:33.068437968] Monitor eDP-1: Applying highest mode [email protected].
[LOG] [15:48:33.068468608] output eDP-1 succeeded basic test on format DRM_FORMAT_XRGB8888
[LOG] [15:48:33.090865316] arrangeMonitors: 2 to arrange
[LOG] [15:48:33.091025670] arrangeMonitors: eDP-1 auto [0, 0.00]
[LOG] [15:48:33.091100668] arrangeMonitors: DP-4 auto [2256, 0.00]
[LOG] [15:48:33.091143213] arrangeMonitors: eDP-1 xwayland [0, 0.00]
[LOG] [15:48:33.091162161] arrangeMonitors: DP-4 xwayland [2256, 0.00]
[LOG] [15:48:33.091245253] Monitor eDP-1 data dump: res [email protected], scale 1.00, transform 0, pos 0x0, 10b 0
[LOG] [15:48:33.091372041] Applying monitor rule for DP-4
[LOG] [15:48:33.093438921] Monitor DP-4: Applying highest mode [email protected].
[LOG] [15:48:33.093505400] output DP-4 succeeded basic test on format DRM_FORMAT_XRGB8888
[LOG] [15:48:33.106880728] arrangeMonitors: 2 to arrange
[LOG] [15:48:33.106963480] arrangeMonitors: eDP-1 auto [0, 0.00]
[LOG] [15:48:33.107017879] arrangeMonitors: DP-4 auto [2256, 0.00]
[LOG] [15:48:33.107057167] arrangeMonitors: eDP-1 xwayland [0, 0.00]
[LOG] [15:48:33.107087451] arrangeMonitors: DP-4 xwayland [2256, 0.00]
[LOG] [15:48:33.107148444] Monitor DP-4 data dump: res [email protected], scale 1.00, transform 0, pos 2256x0, 10b 0

If I understand this correctly, hyprland re-applies the layout it has auto-determined during startup.

Not sure if this is a regression, #110 looks very similar but didn't provide any debug logs to compare against.

Additional info in hyprland-community/pyprland#53 (reply in thread)

@dantefromhell dantefromhell added the bug Something isn't working label Mar 13, 2024
@vaxerski
Copy link
Member

generally I'd recommend using hyprctl...

@fdev31
Copy link

fdev31 commented Mar 16, 2024

@vaxerski maybe I'm not getting it, isn't hyprctl only able to set new settings only ? (vs update/replace existing ones)
Maybe I miss some piece of documentation, if that's clear to me I may drop the wlr-randr dependency...

EDIT:
Can hyprctl list the valid options for a given (or all) monitors ?
Else wlr-randr can't be replaced...

@vaxerski
Copy link
Member

Can hyprctl list the valid options for a given (or all) monitors ?

you mean valid modes?

image

it does that.

@fdev31
Copy link

fdev31 commented Mar 17, 2024

Hmmm... I'm not seeing it in the changelog but I'm running an old 0.35.0, I guess this is a recent addition. I'll have a look once I'm back from holidays, thanks!

@vaxerski
Copy link
Member

it was added in 0.37

@fdev31
Copy link

fdev31 commented Mar 22, 2024

@dantefromhell I pushed some untested code in the "next" branch of pyprland to not use wlr-randr : https://github.com/hyprland-community/pyprland/tree/next

Also pushed some similar experimental code in https://github.com/fdev31/wlr-layout-ui

I'll only be able to test next month when I have my usual setup but it may work ;)

@dantefromhell
Copy link
Author

I've decided to use hard-coded monitors rules in my hyprland.conf file. Not sure if it's relevant to keep this issue open.

@rileyhawk1417
Copy link

rileyhawk1417 commented Sep 30, 2024

Came across the same issue on my end. Running on Hyprland-git from the AUR v0.43.0-79-gd73c1475
I ran wlr-randr --output eDP-1 --toggle although nothing happened then ran hyprctl rollinglog -f to see whats going on.
My debug output in hyprland is below.

[LOG] [COutputManager] New OutputManager registered
[LOG] [COutputManager]  | sending output head for eDP-1
[LOG] [COutputMode]   | sending mode 1920x1080@60014mHz, pref: true
[LOG] [COutputMode]   | sending mode 1920x1080@48001mHz, pref: false
[LOG] [COutputHead]   | sending current mode for eDP-1: 1920x1080@60014
[LOG] [COutputManager]  | sending output head for HDMI-A-1
[LOG] [COutputMode]   | sending mode 1920x1080@60000mHz, pref: true
[LOG] [COutputMode]   | sending mode 1920x1080@74973mHz, pref: false
[LOG] [COutputMode]   | sending mode 1920x1080@60000mHz, pref: false
[LOG] [COutputMode]   | sending mode 1920x1080@59940mHz, pref: false
[LOG] [COutputMode]   | sending mode 1920x1080@50000mHz, pref: false
[LOG] [COutputMode]   | sending mode 1680x1050@59883mHz, pref: false
[LOG] [COutputMode]   | sending mode 1600x900@60000mHz, pref: false
[LOG] [COutputMode]   | sending mode 1280x1024@75025mHz, pref: false
[LOG] [COutputMode]   | sending mode 1280x1024@60020mHz, pref: false
[LOG] [COutputMode]   | sending mode 1440x900@59901mHz, pref: false
[LOG] [COutputMode]   | sending mode 1280x800@59910mHz, pref: false
[LOG] [COutputMode]   | sending mode 1152x864@75000mHz, pref: false
[LOG] [COutputMode]   | sending mode 1280x720@60000mHz, pref: false
[LOG] [COutputMode]   | sending mode 1280x720@60000mHz, pref: false
[LOG] [COutputMode]   | sending mode 1280x720@59940mHz, pref: false
[LOG] [COutputMode]   | sending mode 1280x720@50000mHz, pref: false
[LOG] [COutputMode]   | sending mode 1280x720@50000mHz, pref: false
[LOG] [COutputMode]   | sending mode 1024x768@75029mHz, pref: false
[LOG] [COutputMode]   | sending mode 1024x768@70069mHz, pref: false
[LOG] [COutputMode]   | sending mode 1024x768@60004mHz, pref: false
[LOG] [COutputMode]   | sending mode 832x624@74551mHz, pref: false
[LOG] [COutputMode]   | sending mode 800x600@75000mHz, pref: false
[LOG] [COutputMode]   | sending mode 800x600@72188mHz, pref: false
[LOG] [COutputMode]   | sending mode 800x600@60317mHz, pref: false
[LOG] [COutputMode]   | sending mode 800x600@56250mHz, pref: false
[LOG] [COutputMode]   | sending mode 720x576@50000mHz, pref: false
[LOG] [COutputMode]   | sending mode 720x576@50000mHz, pref: false
[LOG] [COutputMode]   | sending mode 720x480@60000mHz, pref: false
[LOG] [COutputMode]   | sending mode 720x480@60000mHz, pref: false
[LOG] [COutputMode]   | sending mode 720x480@59940mHz, pref: false
[LOG] [COutputMode]   | sending mode 720x480@59940mHz, pref: false
[LOG] [COutputMode]   | sending mode 640x480@75000mHz, pref: false
[LOG] [COutputMode]   | sending mode 640x480@72809mHz, pref: false
[LOG] [COutputMode]   | sending mode 640x480@66667mHz, pref: false
[LOG] [COutputMode]   | sending mode 640x480@60000mHz, pref: false
[LOG] [COutputMode]   | sending mode 640x480@59940mHz, pref: false
[LOG] [COutputMode]   | sending mode 720x400@70082mHz, pref: false
[LOG] [COutputHead]   | sending current mode for HDMI-A-1: 1920x1080@60000
[LOG] [COutputManager] Creating new configuration
[LOG] [COutputConfiguration] disableHead on eDP-1
[LOG] [COutputConfiguration] enableHead on HDMI-A-1. For now, doing nothing. Waiting for apply().
[LOG] [COutputConfiguration] Applying configuration
[LOG] [COutputConfiguration] Saving config for monitor HDMI-A-1
[LOG] [COutputConfiguration] Saved configuration
[LOG] Applying monitor rule for eDP-1
[LOG] Not applying a new rule to eDP-1 because it's already applied!
[WARN] No rule found for HDMI-A-1, trying to use the first.
[WARN] No rules configured. Using the default hardcoded one.
[LOG] Applying monitor rule for HDMI-A-1
[LOG] Setting preferred mode for HDMI-A-1
[LOG] output HDMI-A-1 succeeded basic test on format DRM_FORMAT_XRGB8888
[LOG] [AQ] drm: Modesetting HDMI-A-1 with [email protected]
[LOG] arrangeMonitors: 2 to arrange
[LOG] arrangeMonitors: eDP-1 explicit [0, 0]
[LOG] arrangeMonitors: HDMI-A-1 auto [1920, 0]
[LOG] arrangeMonitors: eDP-1 xwayland [0, 0]
[LOG] arrangeMonitors: HDMI-A-1 xwayland [1920, 0]
[LOG] Monitor HDMI-A-1 data dump: res [email protected], scale 1.00, transform 0, pos 1920x0, 10b 0

Only have a default monitor rule for my laptop screen which is 1920x1080, without the monitor rule it just defaults to 1280x720 not sure why. Even removed that monitor rule for the laptop screen but nothing happened.

It was fine last week but after updating Hyprland can't use wlr-randr any more for monitor management. So am just hard coding values like @dantefromhell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants