Hyprland
Hyprland copied to clipboard
Dynamic scale factor increase not works
Steps to reproduce
Got monitor configured like: eDP-1,3840x2160%60.000,3840x889,1.7
hyprctl keyword monitor "eDP-1,[email protected],3840x889,1"
hyprctl keyword monitor "eDP-1,3840x2160%60.000,3840x889,1.7"
Expected outcome
monitor scaled back to 1.7 to initial state of monitor (in hyprland.conf)
Noted outcome
Image is cut and monitor no scaling back to 1.7. I see top-left part, 1.7 times increased of total "canvas".
Screenshot of eDP-1 monitor is uncut. Wallaper have correct size, status bar is cut by Hyprland
well if everything works except for the status bar, maybe it's the status bar's fault?
Nope, whole screen is like 'cut' If y open a terminal, or any other appliaction. The only thin that works well is background wallpaper through hyprpaper
~/Workdir/nixos-config-flake master* ≡
❯ hyprctl keyword monitor "eDP-1,3840x2160%60.000,3840x889,1"
ok
~/Workdir/nixos-config-flake master* ≡
❯ hyprctl monitors
Monitor eDP-1 (ID 0):
[email protected] at 3840x889
active workspace: 2 (2)
reserved: 0 47 0 0
scale: 1.00
transform: 0
focused: no
Monitor DP-1 (ID 1):
[email protected] at 0x0
active workspace: 3 (3)
reserved: 0 47 0 0
scale: 1.00
transform: 0
focused: yes
~/Workdir/nixos-config-flake master* ≡
❯ hyprctl keyword monitor "eDP-1,3840x2160%60.000,3840x889,1.7"
ok
~/Workdir/nixos-config-flake master* ≡
❯ hyprctl monitors
Monitor eDP-1 (ID 0):
[email protected] at 3840x889
active workspace: 2 (2)
reserved: 0 47 0 0
scale: 1.70
transform: 0
focused: no
Monitor DP-1 (ID 1):
[email protected] at 0x0
active workspace: 3 (3)
reserved: 0 47 0 0
scale: 1.00
transform: 0
focused: yes
what if you change it in the config and not through hyprctl?
Same behaviour if you mean auto config reloading. When you DPI set it to 1, restart, and then change DPI to 1.7 through hyprctl it also behaves incorrectly.
The same thing happens when I try to do it via wlr-randr and wdisplays. So the issue can be generalized: change DPI of monitors dynamicly not works.
It also relates for offsets for non 1 DPI monitors. If you change offset for monitor with DPI>1 hyprland goes mad
it's not DPI, it's scaling.
Seems like an issue wholly on your end. No issues on my side with either of those (scale changing or offset) and I have never seen anyone have such problems.
Got some errors in log
[LOG] Keybind triggered, calling dispatcher (64, , 65363)
[LOG] Set keyboard focus to surface 2f69c50, with window name: ~ — fish
[LOG] Window 2f5f250 set title to anton: hyprctl keyword monitor "eDP-1,3840x2160%60.000,3840x889,1.7" — hyprctl
[LOG] Hyprctl: keyword monitor : eDP-1,3840x2160%60.000,3840x889,1.7
[ERR] Error in getMonitorFromString: invalid num
[LOG] Applying monitor rule for eDP-1
[LOG] Monitor eDP-1: requested [email protected], found available mode: 3840x2160@60000mHz, applying.
[LOG] Monitor eDP-1 -> destroyed all render data
[ERR] Couldn't commit output named eDP-1
[LOG] LayerSurface 2497f50 arranged: x: 3854 y: 896 w: 3812 h: 40 with margins: t: 7 l: 14 r: 14 b: 0
[LOG] LayerSurface 2612c00 arranged: x: 3840 y: 889 w: 3840 h: 2160 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] LayerSurface 2497f58 arranged: x: 7160 y: 936 w: 520 h: 86 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] Monitor eDP-1 layers arranged: reserved: 0.000000 47.000000 0.000000 0.000000
[ERR] Error in getMonitorFromString: invalid num
[LOG] Applying monitor rule for DP-2
[LOG] Not applying a new rule to DP-2 because it's already applied!
[LOG] LayerSurface 2f13980 arranged: x: 14 y: 7 w: 3812 h: 40 with margins: t: 7 l: 14 r: 14 b: 0
[LOG] LayerSurface 2537190 arranged: x: 0 y: 0 w: 3840 h: 2160 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] Monitor DP-2 layers arranged: reserved: 0.000000 47.000000 0.000000 0.000000
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Allocated texture for BGTex
[LOG] Background created for monitor eDP-1
[LOG] Shaders initialized successfully.
[LOG] Framebuffer created, status 36053
[LOG] Window 2f5f250 set title to ~ — fish
[LOG] Showing the cursor (timeout)
Error in getMonitorFromString: invalid num
Looks weird
https://github.com/hyprwm/Hyprland/blob/a72a39ebd555c24751a0c4853a495de5ba4bed0d/src/Compositor.cpp#L1467-L1477 Is it expected behavior to get not num string here, probably a bug in isNumber function?
https://github.com/hyprwm/Hyprland/blob/9bfa3ebc50f503f3eaa43dcad44a976e8ee14c73/hyprctl/main.cpp#L214-L216
Couldn't commit output named eDP-1
That should be error from wlr, some conflict with wlr lib version?
P.S. love that comment: "// shouldn't happen but jic". :)
isNumber will consider "1-" or empty string as valid number as well as many other cases. What is name in getMonitorFromString?
should be e-DP1
I tried to print it out in logs, but get some non-ascii characters in logs instead of the monitor name.
is this still an issue?
Can't check it at the moment, and in near future. I'll close it and reopen later if it still suitable.