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
21.58k stars 902 forks source link

Some games got wrong monmitor resoultion on secondary monitor #7646

Closed BartolomeyKant closed 2 months ago

BartolomeyKant commented 2 months ago

Regression?

No

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 9a09eac79b85c846e3a865a9078a3f8ff65a9259 (props: bump version to 0.42.0). Date: Wed Aug 7 19:17:10 2024 Tag: v0.42.0, commits: 5069 flags: (if any) System Information: System name: Linux Node name: TB14xg6AHP Release: 6.9.12-3-MANJARO Version: #1 SMP PREEMPT_DYNAMIC Wed Aug 7 16:19:28 UTC 2024 GPU information: 64:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix3 [1002:1900] (rev cc) (prog-if 00 [VGA controller]) os-release: NAME="Manjaro Linux" PRETTY_NAME="Manjaro Linux" ID=manjaro ID_LIKE=arch BUILD_ID=rolling ANSI_COLOR="32;1;24;144;200" HOME_URL="https://manjaro.org/" DOCUMENTATION_URL="https://wiki.manjaro.org/" SUPPORT_URL="https://forum.manjaro.org/" BUG_REPORT_URL="https://docs.manjaro.org/reporting-bugs/" PRIVACY_POLICY_URL="https://manjaro.org/privacy-policy/" LOGO=manjarolinux plugins: ======Config-Start====== Config File: /home/bartolomey/.config/hypr/hyprland.conf: Read Succeeded # 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 ################### ### MY PROGRAMS ### ################### # See https://wiki.hyprland.org/Configuring/Keywords/ # Set programs that you use $terminal = kitty $fileManager = nemo $menu = fuzzel --list-executables-in-path ############################# ### ENVIRONMENT VARIABLES ### ############################# # See https://wiki.hyprland.org/Configuring/Environment-variables/ env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 # env = QT_QPA_PLATFORM,wayland env = GTK_THEME,Orchis-Dark-Compact env = ELECTRON_OZONE_PLATFORM_HINT,wayland ################ ### MONITORS ### ################ # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=eDP-1,preferred,auto,auto monitor=HDMI-A-1,preferred,auto-right,auto monitor=DP-9,preferred,auto-right,auto ##################### ### LOOK AND FEEL ### ##################### # Refer to https://wiki.hyprland.org/Configuring/Variables/ # https://wiki.hyprland.org/Configuring/Variables/#general general { gaps_in = 5 gaps_out = 30,5,10,10 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 = false # 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 = 10 # Change transparency of focused and unfocused windows active_opacity = 1.0 inactive_opacity = 1.0 drop_shadow = false # 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 = false # You probably want this force_split = 2 # right, and bottom } # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more master { new_status = slave } # 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 = true # If true disables the random hyprland logo / anime girl background. :( disable_splash_rendering = true disable_autoreload = true focus_on_activate = false vfr = true } ############# ### INPUT ### ############# # https://wiki.hyprland.org/Configuring/Variables/#input input { kb_layout = us,ru kb_variant = kb_model = pc104 kb_options = grp:caps_select kb_rules = follow_mouse = 1 sensitivity = 0 # -1.0 - 1.0, 0 means no modification. touchpad { natural_scroll = false } } # https://wiki.hyprland.org/Configuring/Variables/#gestures gestures { workspace_swipe = false } # 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 # } # Autostart source = ~/.config/hypr/autostart.conf # Keybindings source = ~/.config/hypr/keybinds.conf # Windows source = ~/.config/hypr/windowrules.conf source = ~/.config/hypr/workspacerules.conf Config File: /home/bartolomey/.config/hypr/autostart.conf: Read Succeeded # Autostart some apps and daemons # Autostart necessary processes (like notifications daemons, status bars, etc.) # Or execute your favorite apps at launch like this: exec-once = ~/.config/hypr/scripts/on_monitor_events.sh& exec-once = hyprpaper exec-once = ~/.config/hypr/scripts/wallpaper_shuffle.sh exec-once = eww daemon exec-once = eww open topbar-0 exec-once = eww open topbar-1 exec-once = battery-notify& exec-once = noisetorch -i exec-once = /usr/lib/polkit-kde-authentication-agent-1 Config File: /home/bartolomey/.config/hypr/keybinds.conf: Read Succeeded #################### ### KEYBINDINGSS ### #################### # 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, Return, exec, $terminal bind = $mainMod, Q, killactive, bind = $mainMod, Esc, exit, # bind = $mainMod, F, exec, $fileManager bind = $mainMod, V, togglefloating, bind = $mainMod, D, exec, $menu bind = $mainMod, T, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle bind = $mainMod, F, fullscreen # 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 # Move window with mainMod SHIFT+ arrow keys bind = $mainMod SHIFT, left, movewindow, l bind = $mainMod SHIFT, right, movewindow, r bind = $mainMod SHIFT, up, movewindow, u bind = $mainMod SHIFT, down, movewindow, d # Swap window with mainMod CONTROL+ arrow keys bind = $mainMod CONTROL, left, swapwindow, l bind = $mainMod CONTROL, right, swapwindow, r bind = $mainMod CONTROL, up, swapwindow, u bind = $mainMod CONTROL, down, swapwindow, d # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, exec, ~/.config/hypr/scripts/switch_to_workspace.sh 1 bind = $mainMod, 2, exec, ~/.config/hypr/scripts/switch_to_workspace.sh 2 bind = $mainMod, 3, exec, ~/.config/hypr/scripts/switch_to_workspace.sh 3 bind = $mainMod, 4, exec, ~/.config/hypr/scripts/switch_to_workspace.sh 4 bind = $mainMod, 5, exec, ~/.config/hypr/scripts/switch_to_workspace.sh 5 bind = $mainMod, 6, exec, ~/.config/hypr/scripts/switch_to_workspace.sh 6 bind = $mainMod, 7, exec, ~/.config/hypr/scripts/switch_to_workspace.sh 7 bind = $mainMod, 8, exec, ~/.config/hypr/scripts/switch_to_workspace.sh 8 bind = $mainMod, 9, exec, ~/.config/hypr/scripts/switch_to_workspace.sh 9 bind = $mainMod, 0, exec, ~/.config/hypr/scripts/switch_to_workspace.sh 10 # Move active window to a workspace with mainMod + SHIFT + [0-9] bind = $mainMod SHIFT, 1, exec, ~/.config/hypr/scripts/move_to_workspace.sh 1 bind = $mainMod SHIFT, 2, exec, ~/.config/hypr/scripts/move_to_workspace.sh 2 bind = $mainMod SHIFT, 3, exec, ~/.config/hypr/scripts/move_to_workspace.sh 3 bind = $mainMod SHIFT, 4, exec, ~/.config/hypr/scripts/move_to_workspace.sh 4 bind = $mainMod SHIFT, 5, exec, ~/.config/hypr/scripts/move_to_workspace.sh 5 bind = $mainMod SHIFT, 6, exec, ~/.config/hypr/scripts/move_to_workspace.sh 6 bind = $mainMod SHIFT, 7, exec, ~/.config/hypr/scripts/move_to_workspace.sh 7 bind = $mainMod SHIFT, 8, exec, ~/.config/hypr/scripts/move_to_workspace.sh 8 bind = $mainMod SHIFT, 9, exec, ~/.config/hypr/scripts/move_to_workspace.sh 9 bind = $mainMod SHIFT, 0, exec, ~/.config/hypr/scripts/move_to_workspace.sh 10 # Example special workspace (scratchpad) bind = $mainMod, S, togglespecialworkspace, magic bind = $mainMod SHIFT, S, movetoworkspacesilent, 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 #player and sound bind = ,XF86AudioPause, exec, playerctl pause bind = ,XF86AudioPlay, exec, playerctl play-pause bind = ,XF86AudioNext, exec, playerctl next bind = ,XF86AudioPrev, exec, playerctl previous bind = ,XF86AudioForward, exec, playerctl position 5+ bind = ,XF86AudioRewind, exec, playerctl position 5- bind = ,XF86AudioLowerVolume, exec, pactl set-sink-volume $(pactl get-default-sink) -5% bind = ,XF86AudioRaiseVolume, exec, pactl set-sink-volume $(pactl get-default-sink) +5% bind = ,XF86AudioMute, exec, pactl set-sink-mute $(pactl get-default-sink) toggle #light bind = ,XF86MonBrightnessDown, exec, brightnessctl s 5- bind = ,XF86MonBrightnessUp, exec, brightnessctl s 5+ #lock screen bind = $mainMod, A, exec, playerctl pause & hyprlock #call scripts bind = $mainMod, R, exec, ~/bin/translate_selected.sh bind = $mainMod, Print, exec, ~/bin/screenshot.sh bind = ,Print, exec, ~/bin/screenshot.sh whole Config File: /home/bartolomey/.config/hypr/windowrules.conf: Read Succeeded # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. windowrulev2 = workspace 9, class:.*telegram windowrulev2 = pseudo, class:.*telegram windowrulev2 = workspace 8, class:.*firefox windowrulev2 = workspace 10, class:YandexMusic windowrulev2 = workspace 10, class:.*Cassette windowrulev2 = pseudo, class:.*Cassette windowrulev2 = tile, class:lite-xl Config File: /home/bartolomey/.config/hypr/workspacerules.conf: Read Succeeded # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules # remove boreders for single window in workspace workspace=w[v1],border:false,shadow:false workspace=1,default:true workspace=11,monitor:DP-10,default:true workspace=11,monitor:HDMI-A-1,default:true workspace=1, monitor:eDP-1 workspace=2, monitor:eDP-1 workspace=3, monitor:eDP-1 workspace=4, monitor:eDP-1 workspace=5, monitor:eDP-1 workspace=6, monitor:eDP-1 workspace=7, monitor:eDP-1 workspace=8, monitor:eDP-1 workspace=9, monitor:eDP-1 workspace=10, monitor:eDP-1 workspace=1, monitor:DP-10 workspace=2, monitor:DP-10 workspace=3, monitor:DP-10 workspace=4, monitor:DP-10 workspace=5, monitor:DP-10 workspace=6, monitor:DP-10 workspace=7, monitor:DP-10 workspace=8, monitor:DP-10 workspace=9, monitor:DP-10 workspace=10, monitor:DP-10 workspace=1, monitor:HDMI-A-1 workspace=2, monitor:HDMI-A-1 workspace=3, monitor:HDMI-A-1 workspace=4, monitor:HDMI-A-1 workspace=5, monitor:HDMI-A-1 workspace=6, monitor:HDMI-A-1 workspace=7, monitor:HDMI-A-1 workspace=8, monitor:HDMI-A-1 workspace=9, monitor:HDMI-A-1 workspace=10, monitor:HDMI-A-1 ======Config-End======== ```

Description

Then I opened games on my second bigger monitor, connected via ubc4 dock station or HDMI its rendering using my first (the laptop embedded one) monitor resolution.

I tried quake3 and warsow, both has same issue.

How to reproduce

Start game on external monitor

Crash reports, logs, images, videos

image

BartolomeyKant commented 2 months ago

Ok! Quake3 is a wrong example Warsow show its better image

LurkAndLoiter commented 2 months ago

have you tried toggling the xrandr --primary over to the dock when docked just

xrandr --output POINTERHERE --primary

should be all you need to have it open with the desired resolution. to get pointer check output from

xrandr -q

Personally I'd like to see this functionality added to the monitor settings as an enhancement.

If you're looking for a dynamic method that determines the active monitor at game launch that's beyond me.

BartolomeyKant commented 2 months ago

@LurkAndLoiter

should be all you need to have it open with the desired resolution. to get pointer check output from

I have tried this still the same behavior for my second monitor and now broken on my first monitor

On first monitor it opens between two monitors now image

LurkAndLoiter commented 2 months ago

Just downloaded warsow and yeah it's weird. takes its aspect ratio from primary then opens in whatever resolution it chooses and just kinda plops itself somewhere on one of my screens sometimes way off to the side. I can get it into place using hyprland movewindow and hyprland fullscreen and the resolution can be set in game but it still acts very oddly. It's beyond me. @BartolomeyKant gl with this one.

Observation worth noting. You cannot navigate into the warsow window with movefocus. movefocus from the warsow window seems to be from where you would have expected the window to open not where the window is. I could not get the window to float, but PEBKAC probably.

vaxerski commented 2 months ago

this is an xwayland/x11 limiation. It uses your primary monitor's res. Set the primary with xrandr. Otherwise, you're boned. Nothing we can do here