You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

为何设置eglSwapInterval=0仍无法关闭V-Sync?

Why Can't I Disable V-Sync Despite Setting QT_QPA_EGLFS_SWAPINTERVAL=0?

Let’s start by aligning on your setup to make sure we’re troubleshooting the right pieces:

  • You’re running a simple QML Hello World app on hardware with a PowerVR Rogue GE7800 GPU (OpenGL ES 3.2)
  • You’ve configured these environment variables: QT_QPA_EGLFS_SWAPINTERVAL=0, QT_QPA_UPDATE_IDLE_TIME=0, QSG_RENDER_LOOP=basic
  • PVRTrace confirms eglSwapInterval(0) is being applied correctly, but your app is still stuck at 60 FPS

This is a super common pain point with embedded GPUs like PowerVR, and the issue almost always lies below Qt’s layer—either in hardware, drivers, or system-level display settings. Here’s a breakdown of the most likely causes and fixes:

1. Display Controller is Locking the Refresh Rate

Nearly all embedded devices use a dedicated Display Controller (DC) to feed frames to the screen. Even if your GPU renders frames faster than 60 FPS, the DC will only update the screen at its fixed default rate (usually 60Hz for most displays). This makes it look like V-Sync is still enabled, even though eglSwapInterval is set to 0.

  • Check system display configs: Look into device tree overlays, Linux sysfs nodes (like /sys/class/drm/card0/crtc0/refresh_rate), or platform-specific tools to:
    • See if your display supports a higher refresh rate (and adjust it if possible)
    • Enable "tearing" mode, which disables the DC’s vertical sync lock

2. PowerVR Driver is Enforcing V-Sync

PowerVR drivers often default to enforcing V-Sync at the GPU level, overriding application-level eglSwapInterval settings. This is a safety measure to prevent screen tearing on embedded systems where display and GPU sync isn’t as flexible as on desktop.

  • Use PowerVR tuning tools: Tools like PVRTune let you inspect and modify driver-level settings. Look for options labeled "vertical sync override", "swap interval lock", or "tearing control" and disable them.
  • Check driver flags: Some PowerVR drivers accept kernel module parameters or hidden environment variables to turn off forced V-Sync. Consult your device’s hardware documentation for these specifics.

3. Qt QSG Has Hidden Sync Logic

Even with QSG_RENDER_LOOP=basic, the Qt Scene Graph might have fallback sync checks that override your settings. Try adding this additional environment variable to bypass them:

export QSG_NO_VSYNC=1

This tells QSG to skip any internal V-Sync enforcement, which might break through the remaining 60 FPS cap.

4. Verify You’re Measuring the Right FPS

Make sure you’re not confusing rendered frames with displayed frames:

  • Use the QQuickWindow::frameSwapped() signal to count how many frames Qt is actually rendering (this will tell you if the cap is in the GPU/render pipeline or the display output)
  • If PVRTrace shows your GPU is submitting frames faster than 60 FPS but the screen only updates at 60Hz, the problem is definitely the display controller, not your app or GPU settings.

Final Tip

Embedded systems are wildly platform-specific, so the exact fix will depend on your device’s hardware and OS. Start with checking the display controller settings first—it’s the most common culprit for this exact issue.

内容的提问来源于stack exchange,提问作者JustWe

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.08 09:12:50