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

Misaligned monitors render wrong when adding/removing monitors #1338

Closed
ShadiestGoat opened this issue Sep 18, 2024 · 10 comments
Closed

Misaligned monitors render wrong when adding/removing monitors #1338

ShadiestGoat opened this issue Sep 18, 2024 · 10 comments

Comments

@ShadiestGoat
Copy link

Platform

Arch 6.10.10-arch1-1

GPU, drivers, and screen setup

Laptop w/ an extra monitor.
NVIDIA GeForce GTX 1650 Ti Mobile

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 4096 MB
    Total available memory: 4096 MB
    Currently available dedicated video memory: 3303 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1650 Ti/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 560.35.03
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 560.35.03
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 560.35.03
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Monitors configured using xrandr:
image

Monitors are managed via xrandr, which is called by autorandr

Environment

bspwm

picom version

v11 (/home/shady/.cache/yay/picom-git/picom revision 3899d2c)

Diagnostics [ 09/18/2024 12:47:02.087 c2_parse_target WARN ] Type specifier is deprecated. Type "c" specified on target "_GTK_FRAME_EXTENTS" will be ignored, you can remove it. **Version:** v11 (/home/shady/.cache/yay/picom-git/picom revision 3899d2c)

Extensions:

  • Shape: Yes
  • RandR: Yes
  • Present: Present

Misc:

  • Use Overlay: No

  • Config file specified: None

  • Config file used: /home/shady/.config/picom/picom.conf

Drivers (inaccurate):

NVIDIA, modesetting

Backend: glx

  • Driver vendors:
  • GLX: NVIDIA Corporation
  • GL: NVIDIA Corporation
  • GL renderer: NVIDIA GeForce GTX 1650 Ti/PCIe/SSE2
    [ 09/18/2024 12:47:02.429 egl_init WARN ] The egl backend is still experimental, use with care.

Backend: egl

  • Driver vendors:
  • EGL: NVIDIA
  • GL: NVIDIA Corporation
  • GL renderer: NVIDIA GeForce GTX 1650 Ti/PCIe/SSE2

Configuration:

Configuration file shadow = false;

corner-radius = 8;
rounded-corners-exclude = [
"class_g = 'Polybar'"
];
round-borders = 8;

fading = true;
no-fading-openclose = false;
fade-in-step = 0.1;
fade-out-step = 0.1;
fade-delta = 9;

blur: {
method = "dual_kawase";
strength = 3;
background = false;
background-frame = false;
background-fixed = false;
}

backend = "glx";
vsync = false;

mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-client-opacity = true;
detect-client-leader = true;

blur-background-exclude = [
"class_g ?= 'zoom'",
"name = 'rect-overlay'",
"_GTK_FRAME_EXTENTS@:c",
"class_g = 'LibreWolf'",
"window_type = 'menu'",
"window_type = 'dropdown_menu'",
"window_type = 'popup_menu'",
"window_type = 'utility'",
"class_g = 'activate-linux'",
];

Steps of reproduction

  1. Start with a single monitor setup
  2. Launch picom
  3. Add a monitor in a vertical misalignment as show above

I can also reproduce a similar thing when removing the primary monitor

Expected behavior

Rendering to be normal and correctly aligned on each monitor

Current Behavior

  • Non-primary monitor (on the right in the image) is fully black.
  • Primary monitor (on the left) renders everything as if the monitor is at the same level as the one on the right

Other details

Its only rendering thats wrong. Interactivity for windows is as if they were in the normal position

@ShadiestGoat
Copy link
Author

ShadiestGoat commented Sep 18, 2024

Primary monitor bad render:

20240918_125617.jpg

Secondary monitor bad render:

20240918_125628.jpg

Also, killing picom resolves this issue. If picom is restarted after, its all good

@ShadiestGoat
Copy link
Author

ShadiestGoat commented Sep 18, 2024

This was introduced in v12-rc4 (rc3 was working fine), this should be a prevents on releasing rc4

@freeo
Copy link

freeo commented Sep 24, 2024

Had the same thing on awesomewm-git on desktop, different resolution on the screens. Only when I disconnected the primary monitor (DP-0) then HDMI-0 was displayed correctly! This was specific to --backend glx. This one worked fine picom --backend xrender though.

picom --version
v11 (/home/user/.cache/paru/clone/picom-git/picom revision 3899d2c)

@Suyooo
Copy link
Contributor

Suyooo commented Sep 25, 2024

Having a similar problem whenever monitor size changes in any way - either enabling/disabling another monitor, or just resizing a monitor.

It seems to be a similar issue as #1277 which has been fixed before. This problem has been introduced in commit f36c5e3 and I can reproduce it in both xfwm4 and herbstluftwm by changing my screen resolution from 720p to 1080p while picom is running, and restarting picom corrects the rendering. Backend change doesn't fix the problem, it just changes how the rendering error behaves.

@Stebalien
Copy link

I just ran into this as well. A quick bisect points at 0aa6202.

@Suyooo
Copy link
Contributor

Suyooo commented Sep 28, 2024

Tried moving the guard added for the Configure event into the else branch so it is ignored when the root window is affected, and it fixes the issue for me. Can you give it a try and see whether it does for you too, or whether it's a different issue? https://github.com/Suyooo/picom

@Stebalien
Copy link

Your fix works for me, thanks for tracking it down!

@absolutelynothelix
Copy link
Collaborator

absolutelynothelix commented Sep 28, 2024

@Suyooo, looks like that's the way it's intended to be. make a pull request maybe?

whooops, tagged a wrong person initially

@vredesbyyrd
Copy link

commit f7e6b34 fixed the issue on my system as well (awesomewm). As an ugly workaround I had a hook to reload picom on screen plug events, this is much better. Thanks!

@Suyooo
Copy link
Contributor

Suyooo commented Sep 28, 2024

@Suyooo, looks like that's the way it's intended to be. make a pull request maybe?

That was the plan, just wanted to make sure it's working for others before :) Going to submit it now

@yshui yshui closed this as completed in 16e17df Sep 28, 2024
yshui pushed a commit that referenced this issue Sep 28, 2024
The guard added in commit 0aa620 to avoid duplicates filters out all Configure events on the root window, causing picom
to not properly render the screen area after display configuration changes, such as adding or resizing a monitor.

Only apply the guard if the Configure event affects a window other than the root window.

Fixes #1338

(cherry picked from commit 16e17df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants