libretro / libretro/RetroArch

[Linux, Nvidia, Vsync on, Vulkan, Swapchain images 1] Fast-forward start delay

Open
#12,835 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug: vulkan platform: linux
Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

Observed behavior

With the following conditions, there's a short delay (~0.25-0.5 seconds) before starting to fast-forward:

  • Linux environment (details further down)
  • Nvidia driver "Force Composition Pipeline" enabled
  • XFWM4 "sync_to_vblank" false (boolean) and "vblank_mode" "off" (string)
  • RetroArch driver "vulkan"
  • RetroArch vsync enabled
  • RetroArch swapchain images set to 1

If Vsync in RetroArch is disabled instead of enabled, there's no delay before starting fast forward, but serious constant stuttering (frame drops) during normal gameplay.

This was tested with bsnesdemo.sfc in the latest snes9x-libretro build as of right now. It can be downloaded from this page: https://snescentral.com/article.php?id=1114 . Direct download link: https://snescentral.com/1/1/1/1114/bsnesdemo.tar.xz

When testing with vsync disabled, aside from being able to see the frame drops clearly in bsnesdemo.sfc, I used Mangohud to see the frame drops extremely clearly in Mangohud's frame time graph. The reason there's stuttering instead of tearing is that the nvidia driver's "Force Composition Pipeline" runs its own swapchain, so it must be fed a single buffer.

Expected behavior

There's expected to be no delay before fast-forwarding, regardless of whether vsync is enabled or disabled.

Environment information
  • Manjaro Pahvo 21.1.0
  • Linux 5.13
  • Nvidia GTX 1080 Ti running driver version 470.63.01
  • Xorg server version 1.20.13
  • window manager version: XFWM4 4.16.1+145+g67ff30d56 (latest xfwm4-git build from the AUR)
  • RetroArch 1.9.7 release version from Manjaro community repository

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported Linux/Nvidia configuration with the Vulkan driver, vsync enabled, and one swapchain image, then trace the fast-forward startup and swapchain behavior. Done means fast-forward starts without the reported delay and normal gameplay does not stutter when vsync is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
computer-graphics, operating-systems, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.