-
Notifications
You must be signed in to change notification settings - Fork 228
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
On Linux, the Browser Source rendering is very laggy (~3FPS) where Chrome and FF run at 60FPS #309
Comments
Our browser source is officially untested with CEF 88.0.4324 on Linux, so I'm not surprised there might be quirks. Are browser docks/panels having similar performance issues, or is it limited to browser sources? |
For what I know, it only happens on this specific, highly unoptimized page. The other browser sources I are completely fluid.
I'm not blaming or requesting anything here, I'm just curious about what could be causing this. |
On AUR, there is two "stable" OBS packages, |
Can reproduce on Fedora though with CEF 4280 (from the OBS CDN). I suspect missing hardware acceleration (to my knowledge that is still not available on Linux because ... reasons). My CPU fan ramps up immediately and it also gets less and less laggy the further down you set the resolution in the source properties. |
CEF Hardware accel is actually made of unmerged PR for Windows and macOS unfortunately |
Hardware rendering is not supported on linux because its not compatible with wayland. And in this case since you are on not on ubuntu, your packager's settings may vary* |
@kkartaltepe Isn't there any way to detect a X11 environment then, which remains widely used, and I guess it would probably work ? |
Probably, the minor testing we did during the last version mostly worked but wayland was our priority. |
If you want to play with it locally you can apply the patch, if you see that doesnt help let us know and we can reopen the bug. diff --git a/browser-app.cpp b/browser-app.cpp
index 3b867e7..22ba818 100644
--- a/browser-app.cpp
+++ b/browser-app.cpp
@@ -81,7 +81,7 @@ void BrowserApp::OnBeforeCommandLineProcessing(
CefString type = command_line->GetSwitchValue("type");
if (!enableGPU && type.empty()) {
- command_line->AppendSwitch("disable-gpu");
+ // command_line->AppendSwitch("disable-gpu");
command_line->AppendSwitch("disable-gpu-compositing");
}
} |
That line doesn't exist on current obs-browser master: Line 76 in 80b0c82
However I still can reproduce the issue as stated above, and I am using the current master because I was testing the Drag&Drop fix |
Ah looks like it did land before 27, sorry for misremembering. |
@kkartaltepe The line is indeed missing. However, this portion of code gave me the hint : bool enableGPU = command_line->HasSwitch("enable-gpu");
CefString type = command_line->GetSwitchValue("type");
if (!enableGPU && type.empty()) {
command_line->AppendSwitch("disable-gpu-compositing");
} Running Chrome devtools still states that GPU raster is off, though. Around 25% of the frames are dropped when 60FPS are configured in OBS source properties. Almost none with 30FPS. |
The sample page looks like it renders with CSS animations which I dont think will be as performant in cef for a long time. But maybe someone more knowledgeable can see if there is a better way to tickle cefs buttons. |
I've tested 27.2.0 on Ubuntu 20.04, and it seems the issue still persists, even after the CEF update. I think the root cause is that the CEF shared texture support is not working. Are the shared textures implemented yet for Linux, or are they still WIP? |
Shared textures are only on Windows and macOS right now. |
Operating System Info
Other
Other OS
Manjaro Linux
OBS Studio Version
27.0.1
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/FsbiJvZzu3Kl4SSU
OBS Studio Crash Log URL
No response
Expected Behavior
Using this as a Browser Source : https://outer-wilds-anim-6zl8zgucn-xurei.vercel.app/
A comparable FPS using the Browser Source compared to Chrome/FF
Current Behavior
The framerate is really laggy (~5FPS).
Steps to Reproduce
(dimensions 2560x1440)
Anything else we should know?
Note that the page is not optimized at all. I'm actually more interested for an explanation of the underlying cause rather than an actual fix of the issue.
I tested it on Windows and the animation is fluid.
The text was updated successfully, but these errors were encountered: