hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.8k stars 842 forks source link

Monitor rotation mismatches wallpaper and mouse pointer icon compared to windows and mouse location #7899

Open chaimleib opened 1 day ago

chaimleib commented 1 day ago

Already reported ? *

Regression?

No

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 0f594732b063a90d44df8c5d402d658f27471dfe (props: bump version to 0.43.0). Date: Sun Sep 8 16:48:21 2024 Tag: v0.43.0, commits: 5196 flags: (if any) System Information: System name: Linux Node name: clh-fedora-f16 Release: 6.10.10-200.fc40.x86_64 Version: #1 SMP PREEMPT_DYNAMIC Thu Sep 12 18:26:09 UTC 2024 GPU information: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 33 [Radeon RX 7600/7600 XT/7600M XT/7600S/7700S / PRO W7600] [1002:7480] (rev c1) (prog-if 00 [VGA controller]) c4:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev c2) (prog-if 00 [VGA controller]) os-release: NAME="Fedora Linux" VERSION="40 (Workstation Edition)" ID=fedora VERSION_ID=40 VERSION_CODENAME="" PLATFORM_ID="platform:f40" PRETTY_NAME="Fedora Linux 40 (Workstation Edition)" ANSI_COLOR="0;38;2;60;110;180" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:40" DEFAULT_HOSTNAME="fedora" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f40/system-administrators-guide/" SUPPORT_URL="https://ask.fedoraproject.org/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=40 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=40 SUPPORT_END=2025-05-13 VARIANT="Workstation Edition" VARIANT_ID=workstation plugins: ======Config-Start====== Config File: /home/chaimleib/.config/hypr/hyprland.conf: Read Succeeded # ####################################################################################### # AUTOGENERATED HYPR CONFIG. # PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT, # OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. # ####################################################################################### # autogenerated = 1 # remove this line to remove the warning # This is an example Hyprland config file. # Refer to the wiki for more information. # https://wiki.hyprland.org/Configuring/Configuring-Hyprland/ # Please note not all available settings / options are set here. # For a full list, see the wiki # You can split this configuration into multiple files # Create your files separately and then link them to this file like this: # source = ~/.config/hypr/myColors.conf ################ ### MONITORS ### ################ # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=eDP-2, highres, auto, 1 monitor= desc:BNQ BenQ EW3270U C1K01981019, highres, auto, 1 , transform, 2 monitor=, preferred, auto, auto ################### ### MY PROGRAMS ### ################### # See https://wiki.hyprland.org/Configuring/Keywords/ # Set programs that you use $terminal = kitty $fileManager = dolphin $menu = wofi --show drun ################# ### AUTOSTART ### ################# # Autostart necessary processes (like notifications daemons, status bars, etc.) # Or execute your favorite apps at launch like this: # exec-once = $terminal # exec-once = nm-applet & # exec-once = waybar & hyprpaper & firefox exec-once = mako exec-once = systemctl --user start plasma-polkit-agent ############################# ### ENVIRONMENT VARIABLES ### ############################# # See https://wiki.hyprland.org/Configuring/Environment-variables/ env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 ##################### ### LOOK AND FEEL ### ##################### # Refer to https://wiki.hyprland.org/Configuring/Variables/ # https://wiki.hyprland.org/Configuring/Variables/#general general { gaps_in = 2 gaps_out = 0 border_size = 2 # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) # Set to true enable resizing windows by clicking and dragging on borders and gaps resize_on_border = true 0 # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false layout = dwindle } # https://wiki.hyprland.org/Configuring/Variables/#decoration decoration { rounding = 6 # Change transparency of focused and unfocused windows active_opacity = 1.0 inactive_opacity = 1.0 drop_shadow = true shadow_range = 4 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) # https://wiki.hyprland.org/Configuring/Variables/#blur blur { enabled = true size = 3 passes = 1 vibrancy = 0.1696 } } # https://wiki.hyprland.org/Configuring/Variables/#animations animations { enabled = true # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more bezier = myBezier, 0.05, 0.9, 0.1, 1.05 animation = windows, 1, 7, myBezier animation = windowsOut, 1, 7, default, popin 80% animation = border, 1, 10, default animation = borderangle, 1, 8, default animation = fade, 1, 7, default animation = workspaces, 1, 6, default } # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more dwindle { pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = true # You probably want this } # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more master { new_status = master } # https://wiki.hyprland.org/Configuring/Variables/#misc misc { force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( } ############# ### INPUT ### ############# # https://wiki.hyprland.org/Configuring/Variables/#input input { kb_layout = us kb_variant = kb_model = kb_options = ctrl:swapcaps kb_rules = follow_mouse = 1 sensitivity = 0 # -1.0 - 1.0, 0 means no modification. touchpad { natural_scroll = true clickfinger_behavior = true # enable 2-finger right click instead of bottom-right click } } # https://wiki.hyprland.org/Configuring/Variables/#gestures gestures { workspace_swipe = true } # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more device { name = epic-mouse-v1 sensitivity = -0.5 } ################### ### KEYBINDINGS ### ################### # See https://wiki.hyprland.org/Configuring/Keywords/ $mainMod = SUPER # Sets "Windows" key as main modifier # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, Q, exec, $terminal bind = $mainMod, C, killactive, bind = $mainMod, M, exit, bind = $mainMod, E, exec, $fileManager bind = $mainMod, V, togglefloating, bind = $mainMod, R, exec, $menu bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 bind = $mainMod, 3, workspace, 3 bind = $mainMod, 4, workspace, 4 bind = $mainMod, 5, workspace, 5 bind = $mainMod, 6, workspace, 6 bind = $mainMod, 7, workspace, 7 bind = $mainMod, 8, workspace, 8 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 # Move active window to a workspace with mainMod + SHIFT + [0-9] bind = $mainMod SHIFT, 1, movetoworkspace, 1 bind = $mainMod SHIFT, 2, movetoworkspace, 2 bind = $mainMod SHIFT, 3, movetoworkspace, 3 bind = $mainMod SHIFT, 4, movetoworkspace, 4 bind = $mainMod SHIFT, 5, movetoworkspace, 5 bind = $mainMod SHIFT, 6, movetoworkspace, 6 bind = $mainMod SHIFT, 7, movetoworkspace, 7 bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 0, movetoworkspace, 10 # Example special workspace (scratchpad) bind = $mainMod, S, togglespecialworkspace, magic bind = $mainMod SHIFT, S, movetoworkspace, special:magic # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow # Laptop multimedia keys for volume and LCD brightness bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+ bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%- ############################## ### WINDOWS AND WORKSPACES ### ############################## # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules # Example windowrule v1 # windowrule = float, ^(kitty)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. ======Config-End======== ```

Description

I use an upside-down second monitor with 180-degree rotation.

Why? To make RGB subpixel rendering work on a BGR monitor, I mount it upside-down. (This is not necessarily a problem under Linux, but it bothers me in macOS and Windows.)

Up until today I ran Fedora 40 with Gnome, and it handled the rotation perfectly. However, when running Hyprland, there is no rotation under which "up" is the same for the wallpaper, the windows, the mouse cursor graphic, and the mouse location. If I add flipping to the mix, that only worsens the problem.

transform description expectation on inverted display wallpaper windows mouse cursor graphic mouse hover/click location
0 normal expect top at bottom normal (wrong) normal (wrong) top at bottom normal (wrong)
1 90 expect top at right normal (wrong) top at left (wrong) top at right top at left (wrong)
2 180 expect normal normal top at bottom (wrong) normal top at bottom (wrong)
3 270 expect top at left normal (wrong) top at right (wrong) top at left top at right (wrong)
4 flipped expect flipped + top at bottom normal (wrong) flipped (wrong) flipped + top at bottom flipped (wrong)
5 flipped + 90 expect flipped + top at right normal (wrong) flipped + top at left (wrong) flipped + top at right flipped + top at left (wrong)
6 flipped + 180 expect flipped normal (wrong) flipped + top at bottom (wrong) flipped flipped + top at bottom (wrong)
7 flipped + 270 expect flipped + top at left normal (wrong) flipped + top at right (wrong) flipped + top at left flipped + top at right (wrong)

In other words:

How to reproduce

Equipment:

Setup:

Reproduce:

Crash reports, logs, images, videos

hyprland.log

chaimleib commented 1 day ago

The rotation state of a monitor changes if one transform is applied before unplugging and reconfiguring that monitor's transform. On reattach, it is possible that the monitor's rotation will get fixed. I haven't figured out the rule yet for exactly which transforms should be used, but through trial and error I eventually fixed my monitor's rotation, at least for now.

vaxerski commented 1 day ago

that's quite weird, considering I've seen many people using 90 and 270 monitors without issues, and I'd expect at least one other person mention something's broken there. (according to your table, 270 and 90 are broken too)

can I get the output of hyprctl monitors?

chaimleib commented 1 day ago
$ hyprctl monitors
Monitor eDP-2 (ID 0):
    2560x1600@165.00000 at 0x0
    description: 
    make: 
    model: 
    serial: 
    active workspace: 1 (1)
    special workspace: 0 ()
    reserved: 0 0 0 0
    scale: 1.00
    transform: 0
    focused: yes
    dpmsStatus: 1
    vrr: 0
    activelyTearing: false
    disabled: false
    currentFormat: A XRGB8888 H XRGB8888
    availableModes: 2560x1600@165.00Hz 2560x1600@60.00Hz 1920x1200@165.00Hz 1920x1080@165.00Hz 1600x1200@165.00Hz 1680x1050@165.00Hz 1280x1024@165.00Hz 1440x900@165.00Hz 1280x800@165.00Hz 1280x720@165.00Hz 1024x768@165.00Hz 800x600@165.00Hz 640x480@165.00Hz 

Monitor DP-12 (ID 1):
    3840x2160@59.94000 at 0x-2160
    description: BNQ BenQ EW3270U C1K01981019
    make: BNQ
    model: BenQ EW3270U
    serial: C1K01981019
    active workspace: 2 (2)
    special workspace: 0 ()
    reserved: 0 0 0 0
    scale: 1.00
    transform: 2
    focused: no
    dpmsStatus: 1
    vrr: 0
    activelyTearing: false
    disabled: false
    currentFormat: A XRGB8888 H XRGB8888
    availableModes: 3840x2160@60.00Hz 3840x2160@60.00Hz 3840x2160@59.94Hz 3840x2160@50.00Hz 3840x2160@30.00Hz 3840x2160@29.97Hz 3840x2160@29.98Hz 3840x2160@25.00Hz 3840x2160@24.00Hz 3840x2160@23.98Hz 2560x1600@59.94Hz 2560x1440@59.95Hz 1920x1080@60.00Hz 1920x1080@60.00Hz 1920x1080@59.94Hz 1920x1080@50.00Hz 1920x1080@30.00Hz 1920x1080@29.97Hz 1920x1080@25.00Hz 1920x1080@24.00Hz 1920x1080@23.98Hz 1680x1050@59.95Hz 1600x900@60.00Hz 1280x1024@75.03Hz 1280x1024@60.02Hz 1280x800@59.81Hz 1152x864@75.00Hz 1280x720@60.00Hz 1280x720@60.00Hz 1280x720@59.94Hz 1280x720@50.00Hz 1024x768@75.03Hz 1024x768@60.00Hz 832x624@74.55Hz 800x600@75.00Hz 800x600@60.32Hz 720x576@50.00Hz 720x480@60.00Hz 720x480@59.94Hz 640x480@75.00Hz 640x480@60.00Hz 640x480@59.94Hz 640x480@59.94Hz 720x400@70.08Hz 
vaxerski commented 1 day ago

can you try not having negative offsets?

chaimleib commented 1 day ago

At the moment the monitor is behaving as expected with transform 2. I changed the config line like so:

- monitor= desc:BNQ BenQ EW3270U C1K01981019, highres, auto-up, 1, transform, 2
+ monitor= desc:BNQ BenQ EW3270U C1K01981019, highres, auto, 1, transform, 2

Now when I check the monitors:

$ hyprctl monitors
Monitor eDP-2 (ID 0):
    2560x1600@165.00000 at 0x0
    description: 
    make: 
    model: 
    serial: 
    active workspace: 1 (1)
    special workspace: 0 ()
    reserved: 0 0 0 0
    scale: 1.00
    transform: 0
    focused: yes
    dpmsStatus: 1
    vrr: 0
    activelyTearing: false
    disabled: false
    currentFormat: A XRGB8888 H XRGB8888
    availableModes: 2560x1600@165.00Hz 2560x1600@60.00Hz 1920x1200@165.00Hz 1920x1080@165.00Hz 1600x1200@165.00Hz 1680x1050@165.00Hz 1280x1024@165.00Hz 1440x900@165.00Hz 1280x800@165.00Hz 1280x720@165.00Hz 1024x768@165.00Hz 800x600@165.00Hz 640x480@165.00Hz 

Monitor DP-12 (ID 1):
    3840x2160@59.94000 at 2560x0
    description: BNQ BenQ EW3270U C1K01981019
    make: BNQ
    model: BenQ EW3270U
    serial: C1K01981019
    active workspace: 2 (2)
    special workspace: 0 ()
    reserved: 0 0 0 0
    scale: 1.00
    transform: 2
    focused: no
    dpmsStatus: 1
    vrr: 0
    activelyTearing: false
    disabled: false
    currentFormat: A XRGB8888 H XRGB8888
    availableModes: 3840x2160@60.00Hz 3840x2160@60.00Hz 3840x2160@59.94Hz 3840x2160@50.00Hz 3840x2160@30.00Hz 3840x2160@29.97Hz 3840x2160@29.98Hz 3840x2160@25.00Hz 3840x2160@24.00Hz 3840x2160@23.98Hz 2560x1600@59.94Hz 2560x1440@59.95Hz 1920x1080@60.00Hz 1920x1080@60.00Hz 1920x1080@59.94Hz 1920x1080@50.00Hz 1920x1080@30.00Hz 1920x1080@29.97Hz 1920x1080@25.00Hz 1920x1080@24.00Hz 1920x1080@23.98Hz 1680x1050@59.95Hz 1600x900@60.00Hz 1280x1024@75.03Hz 1280x1024@60.02Hz 1280x800@59.81Hz 1152x864@75.00Hz 1280x720@60.00Hz 1280x720@60.00Hz 1280x720@59.94Hz 1280x720@50.00Hz 1024x768@75.03Hz 1024x768@60.00Hz 832x624@74.55Hz 800x600@75.00Hz 800x600@60.32Hz 720x576@50.00Hz 720x480@60.00Hz 720x480@59.94Hz 640x480@75.00Hz 640x480@60.00Hz 640x480@59.94Hz 640x480@59.94Hz 720x400@70.08Hz 

Behavior is still as expected for that config. Monitor 2 just moved from above monitor 1 to the right.

vaxerski commented 1 day ago

and now it works? So the problem is with negative coordinates, right?

chaimleib commented 1 day ago

No, it was working with negative coords, too.

What got me from broken to fixed was unplugging the monitor, changing the config's transform, and then reconnecting. I did that a few times until things worked, but I don't remember the sequence of config changes.

vaxerski commented 1 day ago

have you tried restarting hyprland after transform changes?

chaimleib commented 1 day ago

Now, if I change the external monitor's transform to 0, I get this:

transform description expectation on inverted display wallpaper windows mouse cursor graphic mouse hover/click location
2 180 expect normal normal normal normal normal
0 normal expect top at bottom normal (wrong) top at bottom top at bottom top at bottom

The wallpaper still doesn't change, but now the window, cursor icon, and mouse event location are coordinated and correct.

Then, with transform 0, if I disconnect, set transform to 2, and reconnect,

transform description expectation on inverted display wallpaper windows mouse cursor graphic mouse hover/click location
2 180 expect normal normal normal normal normal
Then, with transform 2, if I disconnect, set transform to 0, and reconnect, transform description expectation on inverted display wallpaper windows mouse cursor graphic mouse hover/click location
0 normal expect top at bottom top at bottom top at bottom top at bottom top at bottom

The wallpaper is in the expected orientation, which it wasn't before. Everything else is as expected too.

chaimleib commented 1 day ago

But then, if without disconnecting I go from transform 0 to 2, I get

transform description expectation on inverted display wallpaper windows mouse cursor graphic mouse hover/click location
0 normal expect top at bottom top at bottom top at bottom top at bottom top at bottom
2 180 expect normal top at bottom (wrong) normal normal normal

So wallpaper doesn't change unless I disconnect the monitor. If I disconnect and reconnect it without changing the transform (it stays at 2), the wallpaper gets fixed, and everything is normal.

chaimleib commented 1 day ago

I just tried disconnecting, changing the transform, rebooting, and then reconnecting. The behavior is same as without the reboot. Wallpaper is as expected immediately after reconnecting, but stays stuck if I change the transform value. Everything else is as would be expected from the config.

I think I'll call this a night for now. Maybe while dreaming I'll figure out how to get back into the breakage where the mouse cursor and mouse events were in different places.

vaxerski commented 1 day ago

what's the wallpaper daemon you are using?