-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Laggy UI on Linux (Ubuntu) with two connected displays #23
Comments
I'm not sure what was the issue, but now it is suddenly fine. It does not lag on my machine. |
Found the reason. It only lags when a secondary monitor is connected. All other apps are fine. |
Could be Open GL drivers issue. |
Interesting, so not sure if we could do much on Compose side. |
I'm on Ubunutu as well and compose probably runs at around 15-20 fps. Using nvidia drivers with a 1080ti and a single ultrawide monitor. I ran the CEF demo and interestingly CEF has pretty good frame rates, I can even watch Youtube inside the CEF without issue, but compose continues to have poor frame rate. Any debugging you would like done that might help highlight what the issue is? Adding some system information to minimize any back and forths on this. $ uname -a
Linux ubuntu-desktop 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal $ nvidia-smi
Tue Nov 10 08:41:46 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21 Driver Version: 435.21 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 108... Off | 00000000:42:00.0 On | N/A |
| 16% 55C P0 66W / 250W | 894MiB / 11175MiB | 6% Default |
+-------------------------------+----------------------+----------------------+ |
I experience lag only when I focus on an |
I don't think this has to do with rendering (OpenGL) issues. |
Which display server is being used? X11, XWayland, or native wayland? Does the issue persist if you switch sessions to another display server? |
With two connected monitors, this code:
can be very slow (50-100ms). We will try to switch to system vsync instead of this in #137 |
I'm getting similar issues running on Ubuntu 20.04 on X11 with multiple monitors. Performance does get worse when a I haven't tried on Wayland, but I do have that installed, so I could give it a go soon.
I've seen the same thing in both of these projects, so I don't think it's related to any specific code that I've written, but just in case it helps: |
Same issue here, I to be honest have not tested disconnecting monitors, but I will assume that my 3 connected monitors are the issue. Running the demo app and then clicking the button lags the entire desktop for about 2 seconds. Its just this example code: fun main() = Window {
var text by remember { mutableStateOf("Hello, World!") }
MaterialTheme {
Button(onClick = {
text = "Hello, Desktop!"
}) {
Text(text)
}
}
} This should be enough to fully reproduce the issue. I want to point out once again that it is enough to click the button in the example and everything lags. System info:
NVIDIA smi:
Killing the compositor and other OpenGL applications doesn't change anything. |
I got the same problem: OS: Ubuntu 20.04 focal Kernel: x86_64 Linux 5.4.0-60-generic Resolution: 3840x1080 DE: GNOME 3.36.4 CPU: Intel Core i7-8750H @ 12x 4.1GHz [62.0°C] GPU: GeForce GTX 1060 RAM: 11675MiB / 31804MiB +-----------------------------------------------------------------------------+ | NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 GeForce GTX 1060 Off | 00000000:01:00.0 On | N/A | | N/A 58C P0 23W / N/A | 349MiB / 6078MiB | 8% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 1627 G /usr/lib/xorg/Xorg 251MiB | | 0 N/A N/A 2095 G /usr/bin/gnome-shell 88MiB | | 0 N/A N/A 45660 G ...m/java-15-oracle/bin/java 5MiB | +-----------------------------------------------------------------------------+ |
Problem with two displays should be fixed soon. There is prebuilt version for testing: 0.0.0-vsync-build30 P.S. I discovered a new performance issue with maximized window, not related to this issue. |
Its fixed, really cool! |
Sweet, I changed to the testing version and it doesn't lag anymore! Good job! |
When will this be merged into a full release? I'm having the same issue, 15 FPS or lower, disconnecting one monitor doesn't help. The custom prebuilt version fixes it though. |
I hope this week or at the beginning of the next. The changes are on a review now: |
Should be fixed in 0.3.0-build146. |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
Following:
#10 (comment)
P.S. I checked that examples/todoapp works fine on my PC/Windows and MacBook: animations/resizing seems aren't laggy (on Windows there are some issues with performance, but they are not always visible)
The text was updated successfully, but these errors were encountered: