Closed gac3k closed 4 months ago
I am pretty sure what the issue is but can you post a log
not sure if this is enough, but this is the part of the debug log for a time period where I was reproducing the issue.
can you just attach the entire log? it's easier that way.
@vaxerski sure thing
I'm seeing something very similar, the EGL errors lead me to this issue:
$cat /persist/nix-config/hyprland.log | grep -E 'ERR|WARN' | head -n 50
[WARN] Warning: you're using an NVIDIA GPU. Make sure you follow the instructions on the wiki if anything is amiss.
[ERR] EGL: Failed to query mods
[ERR] EGL: Failed to query mods
[WARN] NVIDIA detected, please remember to follow nvidia instructions on the wiki
[ERR] Hyprcursor failed loading theme "", falling back to X.
[WARN] Failed to change process scheduling strategy
[WARN] No rule found for Unknown-1, trying to use the first.
[WARN] No rules configured. Using the default hardcoded one.
[ERR] output Unknown-1 failed basic test on format DRM_FORMAT_XRGB8888
[ERR] output Unknown-1 failed basic test on format DRM_FORMAT_XBGR8888
[ERR] output Unknown-1 failed basic test on format DRM_FORMAT_INVALID
[ERR] Couldn't commit output named Unknown-1
[WARN] wlr_output_commit_state failed in CMonitor::onCommit
[WARN] No rule found for Unknown-1, trying to use the first.
[WARN] No rules configured. Using the default hardcoded one.
[ERR] output Unknown-1 failed basic test on format DRM_FORMAT_XRGB8888
[ERR] output Unknown-1 failed basic test on format DRM_FORMAT_XBGR8888
[ERR] output Unknown-1 failed basic test on format DRM_FORMAT_INVALID
[ERR] Couldn't commit output named Unknown-1
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
[ERR] renderer: couldn't beginRender()!
[ERR] Failed to configure primary swapchain for Unknown-1
Managed to get hyprland working again by adding
boot.kernelParams = [ "nvidia-drm.fbdev=1" ];
( https://www.reddit.com/r/hyprland/comments/1cva5g8/latest_version_crashing_on_nvidia/ )
Hey @vaxerski just a question whether there's anything that I can do here to potentially help you to test or reproduce further, because I saw that you are now resolving 0.42 milestone marked issues, and it would be great if you could tackle that one as well, because despite the fact I am able to use Hyprland in general with the limitations it's pretty challenging to operate like that on a daily basis, and on the other hand I know that this problem is pretty specific to that particular configuration and as such is probably not the highest priority at the moment, so I am happy to assist in any tests or experiments, or if there's additional data/information needed, if that may speed up the process anyhow!
please check latest git, pushed some fixes
@vaxerski unfortunately, does not seem to help, I can still reproduce using latest v0.41.2-128-g23a8f065. Maybe just to give you yet some more background, despite I don't know whether it's going to be any helpful:
I am also attaching a picture of the actual setup, just in case it helps anyhow, the two displays on the left are the ones with Hyprland, the other two on the right are connected to mac and I am using them along with macbook primary screen.
wait a moment, so your issue is that the pointer is bound to one display instead of being able to travel around freely?
yes, exactly. Which was working fine in the old versions, and is in general is working fine in other wayland compositors i.e. sway, but since 0.40 release of Hyprland it's always bound to a specific output, first it only attaches itself to the display on the left, then if I use a keybind to move to the workspace on the primary screen a cursor is automatically moved to that one, and then I can also only move cursor within boundries of that display... I can still move from the Hyprland to the synergy protocol host (macbook in that case), but the mouse is always going from the screen where I am currently at directly to macbook, so I am let's say on that far left display and I'll move the cursor towards the edge, it'll go directly to the macbook screen and other way around, if I go back from the macbook back to the client with Hyprland, it'll go straight to that far left screen.
On the other hand, if I will switch the workspace to the one that is bound to the primary hyprland screen (ultra-wide one) it'll be the same behavior but with that monitor instead, so I will be able to move it to the macbook, and when going back from macbook it'll properly move it to the nearest screen, but if I'll go to the left edge, it won't go any further.
So what I am currently doing right now as a workaround is that I am using workspace keybind shortcuts to move across the workspaces so that the cursor will follow, but then of course it's not perfect, and there's another problem, that despite a cursor is bound to one or another display, an eventual geometry is recognized properly so the mouse movements on the far left screen are super odd, because it has 1080px of resolution in width (due to the vertical transformation), and the recognized pointer geometry is something like (3440+1080), so even when I am doing a quite big mouse movement it only moves the cursor a tiny bit as the calculation is wrong.
@vaxerski that's why I was asking whether there's anyway I could help to debug, because I know that it's something super specific, but the fact that it was working before makes me thinking that it's possible to make it working again :D
I also know, since I was reporting an issue in waynergy repository that I am not the only person affected by that and there's at least one more guy :p
ahhhh I see you. Alright, I misunderstood the problem.
I assume you have to launch waynergy manually (or exec-once) in hyprland, can you launch it with WAYLAND_DEBUG=1 <cmd> |& tee ~/waynergy.log
and then attach the log here from trying to move your mouse to another screen
waynergy.log I did following steps which are in this log:
If you want I can also send a smaller one containing only a first step, but due to the fact that whenever I am going to the right edge a mouse is going back to synergy host, it's a bit harder to send a meaningful result :) @vaxerski
as you can see motion_absolute is always being executed against a virtual both screen width and height combined (4520 and 1920) but the actual physical cursor movement is always bound to single output
@vaxerski WORKS LIKE A CHARM!
Regression?
Yes
System Info and Version
System/Version info
```sh Hyprland, built from branch main at commit 2fa57f2dc4909be697d003a22ce6870039e4db9b (pointer: change min cursor padding to 0 (6027)). Date: Tue Jul 2 12:17:48 2024 Tag: v0.41.2-16-g2fa57f2d, commits: 4902 flags: (if any) System Information: System name: Linux Node name: archus Release: 6.9.6-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 21 Jun 2024 19:49:19 +0000 GPU information: 2d:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA104 [GeForce RTX 3070] [10de:2484] (rev a1) (prog-if 00 [VGA controller]) NVRM version: NVIDIA UNIX x86_64 Kernel Module 550.90.07 Fri May 31 09:35:42 UTC 2024 os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: ======Config-Start====== Config File: /home/dom/.config/hypr/hyprland.conf: Read Succeeded # # Please note not all available settings / options are set here. # For a full list, see the wiki # source=~/.config/hypr/themes/macchiato.conf #autogenerated = 1 # remove this line to remove the warning # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=DP-1,highres,1080x0,1 #monitor=HDMI-A-1,highres,0x0,1 monitor=HDMI-A-1,highres,0x0,1,transform,1 #monitor=DP-1,preferred,0x0,1 ## unscale XWayland #xwayland { # force_zero_scaling = true #} # toolkit-specific scale #env = GDK_SCALE,2 #env = XCURSOR_SIZE,32 workspace=1,monitor:HDMI-A-1 workspace=2,monitor:HDMI-A-1 #workspace=4,on-created-empty:webstorm # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch exec-once=/usr/lib/polkit-kde-authentication-agent-1 #exec-once=hyprctl setcursor Bibata-Modern-Classic 24 exec-once = hyprpaper exec-once = gammastep-indicator exec-once = sleep 5 && syncthingtray exec-once = hypridle #exec-once = yin-yang #exec-once = waybar #exec = pkill waynergy exec-once = waynergy -E &>> /var/log/waynergy.log exec-once = nm-applet exec-once = hyprshade auto exec-once = gammastep #exec = pkill ags exec-once = sleep 2 && ags # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf # Some default env vars. env = XCURSOR_SIZE,18 env = LIBVA_DRIVER_NAME,nvidia env = XDG_SESSION_TYPE,wayland env = GBM_BACKEND,nvidia-drm env = __GLX_VENDOR_LIBRARY_NAME,nvidia env = WLR_NO_HARDWARE_CURSORS,1 env = NVD_BACKEND,direct #env = HYPRCURSOR_THEME,rose-pine-cursor-hyprcursor #env = HYPRCURSOR_SIZE,24 # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = pl # kb_variant =~/.config/waynergy/xkb_keymap # kb_model = # kb_options = lv3:caps # kb_rules = follow_mouse = 1 touchpad { natural_scroll = no } sensitivity = 0 # -1.0 - 1.0, 0 means no modification. } device { name = "cvirtualkeyboard" # kb_variant = ,qwerty kb_layout = pl kb_options = altwin:lv3 } #cursor = { # no_hardware_cursors = true; #} # device:wlr_virtual_keyboard_v1 { # kb_layout = pl # kb_variant=~/.config/waynergy/xkb_keymap; # kb_options = altwin:lv3 # } general { # See https://wiki.hyprland.org/Configuring/Variables/ for more gaps_in = 5 gaps_out = 15 border_size = 1 col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) layout = dwindle } dwindle { preserve_split = true # you probably want this #no_gaps_when_only = true } decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more #rounding = 3 #blur { # enabled = true # size = 3 # passes = 1 #} # Blur rules rounding = 10 # Blur blur { enabled = yes size = 1 passes = 4 new_optimizations = on ignore_opacity = false } drop_shadow = yes shadow_range = 4 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) } animations { enabled = yes # Some 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 } dwindle { # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = yes # you probably want this } master { # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more #new_is_master = true } gestures { # See https://wiki.hyprland.org/Configuring/Variables/ for more workspace_swipe = off } # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#executing for more #device:epic-mouse-v1 { # sensitivity = -0.5 #} # Example windowrule v1 # windowrule = float, ^(kitty)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more binds { allow_workspace_cycles = true } # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER_L # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, RETURN, exec, alacritty bind = ALT, TAB, exec, hyprctl dispatch focuswindow address:"$(hyprctl -j clients | jq -r '.[]|select(.address != "" and .title != "")|(.class + "\t" + .address + "\t" + .title)' | rofi -dmenu | cut -f2)" bind = $mainMod_SHIFT, Q, killactive, bind = $mainMod_CTRL, Q, exec, rofi -show p -modi p:rofi-power-menu bind = $mainMod, M, exit, bind = $mainMod, E, exec, dolphin bind = $mainMod, V, togglefloating, bind = $mainMod, D, exec, rofi -show combi bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle bind = $mainMod, F, fullscreen bind = $mainMod_ALT, F, fakefullscreen # 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 bind = $mainMod, N, movetoworkspacesilent, special:minimized bind = $mainMod Control, N, togglespecialworkspace, minimized bind = $mainMod Control, N, movetoworkspace, +0 # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 bind = CONTROL SHIFT, right, workspace, e+1 bind = CONTROL SHIFT, left, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod CONTROL, mouse:272, movewindow bindm = $mainMod CONTROL, mouse:273, resizewindow bind = $mainMod, F9, exec, playerctl play-pause bind = $mainMod, F10, exec, playerctl next bind = $mainMod, F8, exec, playerctl previous bind = Ctrl Alt, LEFT, exec, hyprctl dispatch workspace e-1 bind = Ctrl Alt, RIGHT, exec, hyprctl dispatch workspace e+1 # will switch to a submap called resize bind=$mainMod,R,submap,resize # will start a submap called "resize" submap=resize # sets repeatable binds for resizing the active window binde=,right,resizeactive,50 0 binde=,left,resizeactive,-50 0 binde=,up,resizeactive,0 -50 binde=,down,resizeactive,0 50 # use reset to go back to the global submap bind=,escape,submap,reset # will reset the submap, meaning end the current one and return to the global one submap=reset misc { disable_hyprland_logo = true } # spotify windowrulev2 = monitor HDMI-A-1,class:^(Spotify)$ windowrulev2 = workspace: 2,class:^(Spotify)$ # jetbrains windowrulev2 = monitor DP-1,class:^(jetbrains-webstorm)$ #windowrulev2 = workspace: 4,class:^(jetbrains-webstorm)$ #windowrulev2 = stayfocused,class:^(jetbrains-webstorm)$ #windowrule = center,class:jetbrains-idea #windowrulev2 = float,class:^(jetbrains-webstorm)$ #windowrulev2 = opacity 0.99 0.99,class:^(jetbrains-webstorm)$ #windowrulev2 = pseudo,class:^(jetbrains-webstorm)$ #windowrulev2 = noinitialfocus,class:^jetbrains-(?!toolbox),floating:1 ######## Window rules ######## windowrule = float, ^(steam)$ windowrule = float, ^(guifetch)$ # Dialogs windowrule=float,title:^(Open File)(.*)$ windowrule=float,title:^(Open Folder)(.*)$ windowrule=float,title:^(Save As)(.*)$ windowrule=float,title:^(Library)(.*)$ windowrulev2 = rounding 17, floating:1 ######## Layer rules ######## layerrule = blur, gtk-layer-shell layerrule = ignorezero, gtk-layer-shell layerrule = blur, notifications layerrule = ignorezero, notifications plugin { hyprbars { bar_color = rgba(090727FF) bar_height = 20 bar_text_size = 10 bar_text_color = rgba(7775D0FF) } } Config File: /home/dom/.config/hypr/themes/macchiato.conf: Read Succeeded $rosewater = rgb(f4dbd6) $rosewaterAlpha = f4dbd6 $flamingo = rgb(f0c6c6) $flamingoAlpha = f0c6c6 $pink = rgb(f5bde6) $pinkAlpha = f5bde6 $mauve = rgb(c6a0f6) $mauveAlpha = c6a0f6 $red = rgb(ed8796) $redAlpha = ed8796 $maroon = rgb(ee99a0) $maroonAlpha = ee99a0 $peach = rgb(f5a97f) $peachAlpha = f5a97f $yellow = rgb(eed49f) $yellowAlpha = eed49f $green = rgb(a6da95) $greenAlpha = a6da95 $teal = rgb(8bd5ca) $tealAlpha = 8bd5ca $sky = rgb(91d7e3) $skyAlpha = 91d7e3 $sapphire = rgb(7dc4e4) $sapphireAlpha = 7dc4e4 $blue = rgb(8aadf4) $blueAlpha = 8aadf4 $lavender = rgb(b7bdf8) $lavenderAlpha = b7bdf8 $text = rgb(cad3f5) $textAlpha = cad3f5 $subtext1 = rgb(b8c0e0) $subtext1Alpha = b8c0e0 $subtext0 = rgb(a5adcb) $subtext0Alpha = a5adcb $overlay2 = rgb(939ab7) $overlay2Alpha = 939ab7 $overlay1 = rgb(8087a2) $overlay1Alpha = 8087a2 $overlay0 = rgb(6e738d) $overlay0Alpha = 6e738d $surface2 = rgb(5b6078) $surface2Alpha = 5b6078 $surface1 = rgb(494d64) $surface1Alpha = 494d64 $surface0 = rgb(363a4f) $surface0Alpha = 363a4f $base = rgb(24273a) $baseAlpha = 24273a $mantle = rgb(1e2030) $mantleAlpha = 1e2030 $crust = rgb(181926) $crustAlpha = 181926 ======Config-End======== ```Description
The issue occurring is a really specific, so it's also a bit hard to describe properly. But when I am using a waynergy which is a synergy compatible client for wayland, and since upgrading to version 0.40.0 (and later), the virtual pointer protocol seems to not operate properly anymore when multiple displays are connected.
In my setup I have a macos device which is running Barrier/Input-Leap as synergy protocol server and pc with arch linux on the top of Hyprland which is a client, utilizing waynergy. I have to displays connected to my PC, the primary one on the left to the macos server, and the secondary one, rotated so that it's placed vertically on the far left (so yet left to the primary screen). Now, whenever I am connecting with waynergy, the virtual pointer (mouse cursor) is always limited to the screen where the mouse is currently at, and in addition by default it's moving the mouse to the secondary monitor (far left one) not the primary one, when I am moving mouse from my server to the client for the first time, then if I manually switch the workspaces using a keyboard shortcut to one of the ones that are on the primary monitor, mouse is then bound to the primary display, but I can no longer move the mouse to the secondary one. In general, later on whenever I am moving mouse back to server, and then back to client, cursor is returning to the display that it was on the client for the last time.
In addition, because the resolution for waynergy client is detected as a combination of resolutions of my screens so 4520x1980 (because I have one screen with 3440x1440, and secondary 1920x1080, but rotated, so it's actually 1080px of width), a mouse movements are actually calculated relatively to the full geometry but the cursor is still attached to the single display, therefore on both screens the actual movement is a bit off, but on the secondary screen it's really problematic because while there's only 1080px of space, the move is calculated for 4520px screen, so even the big movements of mouse are actually making just a small movement of actual cursor.
I was debugging a lot the waynergy client itself, also created similar issue in the respective waynergy repository. There are no other solutions I can use for that setup as there are no other solutions implementing portals and libeip properly to be utilized with Hyprland. It was also working just fine before, and broke right after the deployment of 0.40.0 version, which introduced plenty of new wayland protocol implementation, so I think it has to be corelated somehow but as long as I was trying to dive into that, it's super tricky as the amount of changes was enormous recently. (Great job BTW!)
The issue does not persist in other wayland compositors, and also is of course not occuring if I am using a standard mouse and keyboard attached to PC. It also works fine if I downgrade Hyprland to 0.39.* version, but that's of course not the path I want to follow.
Another thing that might be important here is that while waynergy is by default utilizing wlr protocol to create virtual pointer, it's also allowing to utilize uinput as backend, and this is an option that I also tried thinking that the issue might be specific to wlr_virtual_pointer implementation itself, but the issue seems to persist with that backend either, so I think that it might be sometihng on more generic level.
How to reproduce
Crash reports, logs, images, videos
No response