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

Resizing of opengl terminal (alacritty) is unuseable with mouse high poll rate #623

Closed
zen2 opened this issue May 2, 2021 · 8 comments
Closed

Comments

@zen2
Copy link

zen2 commented May 2, 2021

Platform

Gentoo Linux ~amd64

GPU, drivers, and screen setup

Nvidia GTX 1070 with Nvidia Driver 465.24.02
One monitor: 3840x1600@144Hz
Mesa 20.1.0_rc2 / xorg-server 1.20.11 / xorg-drivers-1.20-r2 with evdev

name of display: :0
display: :0 screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 8192 MB
Total available memory: 8192 MB
Currently available dedicated video memory: 7367 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1070/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 465.24.02
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 465.24.02
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 465.24.02
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Environment

openbox / Rox-Filer / wbar / windowmaker widgets
alacritty terminal (opengl)

picom version

Version: v8.2

Extensions:

  • Shape: Yes
  • XRandR: Yes
  • Present: Present

Misc:

  • Use Overlay: Yes* Config file used: /opt/zentoo/scripts/picom.conf

Drivers (inaccurate):

NVIDIA

Configuration:

backend = "glx";
glx-no-stencil = true;
glx-copy-from-front = false;
glx-no-rebind-pixmap = true;
glx-swap-method = "copy";
refresh-rate = 144;
vsync = true;
unredir-if-possible = false;

no-use-damage = true;
use-damage = false;
xrender-sync-fence = true;
mark-wmwin-focused = true;
mark-ovredir-focused = true;
use-ewmh-active-win = true;
shadow = true;
blur-background = false;
fading = true;

Steps of reproduction

1 - Set mouse poll rate to higher rate than default 125Hz (500Hz or 1000Hz with my razer mouse)
Kernel driver in use: hid/razermouse.ko with openrazer daemon

2 - Resizing alacritty terminal is so slow that is not useable at all
The same doesn't occurs with urxvt terminal that is not opengl based

3 - Set mouse poll rate to default 125Hz back fix the problem

Expected behavior

Resizing of opengl terminal works independently of mouse poll rate

Current Behavior

Resizing alacritty terminal is so slow that is not useable at all with a higher mouse poll rate than default

@zen2
Copy link
Author

zen2 commented May 2, 2021

Note: I got this problem for a while but finally understood that is what not related to picom configuration but mouse poll rate while playing with mouse poll rate and gsync settings on new monitor.

@Icelk
Copy link

Icelk commented May 10, 2021

Does this occur while Picom is disabled?

I use a G502 with a 1000hz sampling rate (set via piper) without any issues.

@zen2
Copy link
Author

zen2 commented May 17, 2021

Does this occur while Picom is disabled?

No issue with picom disabled.
No issue with picom enabled and 125 Hz mouse polling rate
Issue with picom enabled and 500 Hz mouse polling rate: lag
Issue with picom enabled and 1000 Hz mouse polling rate: huge lag
So it seems is really connected.

Note: It get really better when using this fork: #592
Even if there is still lag at 1000hz mouse polling rate.

I use a G502 with a 1000hz sampling rate (set via piper) without any issues.

Do you use nvidia driver ?

@Icelk
Copy link

Icelk commented May 17, 2021

Do you use nvidia driver ?

Yes I do.

What program do you use to set the poll rate?

I notice a few things in your config which differ from mine.

no-use-damage = true; # I have false
use-damage = false; # I have true
xrender-sync-fence = true; # This is commented out for me.

What happens if you change those values?

Also, try setting refresh-rate to 0 to make Picom choose a appropriate value.

Hope it helps 😃

@zen2
Copy link
Author

zen2 commented May 17, 2021

With your settings, there is almost no lag with the __GL_MaxFramesAllowed=1 fork version but still heavy lag with current picom version. Anyway I've tried everything possible with picom options to isolate the problem until I understand that the parameter that bring the issue was the high mouse poll rate.

To change mouse polling rate I use polychromatic/openrazer to control a razer deathadder elite mouse.

I've tried to see if I found other applications showing the problem so I try different kind of terminal:

  • no problem with xterm and urxvt
  • problem with alacritty and kitty (both opengl terminal)

So I've tried with other opengl applications and I got the problem with:

  • glxgears (big lag)
  • mpv -vo gpu some_movie (big lag)
  • mpv -vo vdpau some_movie (resizing almost not usable)
  • opengl screensaver windowed (big lag)

And resizing come back smooth once I set back the mouse poll rate to 125 Hz or if I kill picom.

@zen2
Copy link
Author

zen2 commented May 17, 2021

I can make a video to show the issue if you need.

@Icelk
Copy link

Icelk commented May 17, 2021

Then I have no idea. Hope this resolves with aforementioned PR.

I can make a video to show the issue if you need.

It’s fine, thanks!

Make sure to ping me when the PR is merged regarding your experience then 😃

@zen2
Copy link
Author

zen2 commented Jul 14, 2021

Then I have no idea. Hope this resolves with aforementioned PR.

I can make a video to show the issue if you need.

It’s fine, thanks!

Make sure to ping me when the PR is merged regarding your experience then smiley

I've build the last kwand next branch and the problem disappear at all so I've tried current next branch of yshui picom that include PR #641 and eveything is so smooth at 144Hz with 1000 Hz poll rate mouse that I never get this experience with a compositor in 20 years of linux !

I'm waiting for a new picom stable release based on current next branch to ask on gentoo bugzilla a version bump to use native distro picom package system. Big thanks to @kwand !

I close this issue with hapyness :)

@zen2 zen2 closed this as completed Jul 14, 2021
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

2 participants