G-Sync compatibility with Vulkan

Hello,

About G-Sync compatibilty on native vulkan games (and dxvk/d9vk…), is there any work currently on this feature ? Is this already working ?

Thank you.

G-Sync works for me just fine in all Vulkan titles (including dxvk/d9vk) as long as I disable my second screen.

Hello,

I have some time to try to be able to run vulkan games (dota2 or games on dxvk) with gsync but it is not working.
I tried many configurations in Xorg but it is not working.

I’m able to run vulkan games only if compositor is activated (kde/kwin…) but g-sync is not working. If I disable compositor (alt+shift+F12) game is crashing or not starting or black screen.

Gsync on OPENGL is working fine, I just have to disable compositor.

I don’t have any clue.

Is it working for you ? What is your configuration (xorg, compositor, kde…)
I’m running last driver 440.64.

Thank you very much for your help.

Hello,

Maybe it is not directly linked to GSync after all.
I have a KEPLER GTX TITAN and I’m not able to start a vulkan game (dxvk or native) without composite running.
If composite is running, then game is starting but composite avoids GSync to work and game is blitting instead of flipping.

I’m the only one with vulkan games not working if composite (compositor for kwin) is not running ?
If it working for you, do you have a KEPLER generation graphic card ?

nvidia-bug-report.log.gz with dota 2 coredump - http://dl.free.fr/qVfhTPBmq

example of dxvk error:

info:  D3D9DeviceEx::ResetSwapChain:
info:    Requested Presentation Parameters
info:      - Width:              2560
info:      - Height:             1440
info:      - Format:             D3D9Format::X8R8G8B8
info:      - Auto Depth Stencil: true
info:                  ^ Format: D3D9Format::D24S8
info:      - Windowed:           false
info:  Presenter: Actual swap chain properties:
info:    Format:       VK_FORMAT_B8G8R8A8_UNORM
info:    Present mode: VK_PRESENT_MODE_IMMEDIATE_KHR
info:    Buffer size:  2560x1440
info:    Image count:  3
info:    Exclusive FS: 0
err:   Failed to create swap chain

For Dota 2 with vulkan:

$ LANG=C ./dota.sh -vulkan
Using breakpad crash handler
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API] SteamAPI_Init(): Loaded '/home/joachim/.local/share/Steam/linux64/steamclient.so' OK.
[S_API FAIL] SteamAPI_Init() failed; create pipe failed.Setting breakpad minidump AppID = 373300
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API] SteamAPI_Init(): Loaded '/home/joachim/.local/share/Steam/linux64/steamclient.so' OK.
[S_API FAIL] SteamAPI_Init() failed; create pipe failed../dota.sh: line 104:  3564 Illegal instruction     (core dumped) ${STEAM_RUNTIME_PREFIX} ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"

For Dota 2 with OpenGL (working):

$ ./dota.sh -gl
Using breakpad crash handler
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API] SteamAPI_Init(): Loaded '/home/joachim/.local/share/Steam/linux64/steamclient.so' OK.
[S_API FAIL] SteamAPI_Init() failed; create pipe failed.Setting breakpad minidump AppID = 373300
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API] SteamAPI_Init(): Loaded '/home/joachim/.local/share/Steam/linux64/steamclient.so' OK.
[S_API FAIL] SteamAPI_Init() failed; create pipe failed.Attempting to create OpenGL context: v3.3 (Core profile)...success. Checking entry points...success.
Attempting to create OpenGL context: v3.3 (Core profile)...success. Checking entry points...success.
DumpContextInfo: OpenGL vendor NVIDIA Corporation
DumpContextInfo: OpenGL renderer GeForce GTX TITAN/PCIe/SSE2
DumpContextInfo: Using OpenGL context version 3.3
DumpContextInfo: Context supports GLSL version 3.30 NVIDIA via Cg compiler
[...]

Thank you

Dota 2 with vulkan (debug activated):

$ LANG=C ./dota.sh -vulkan
Steam AppId(570), BreakpadId(373300)
Using breakpad crash handler
[S_API] SteamAPI_Init(): Loaded '/home/joachim/.local/share/Steam/linux64/steamclient.so' OK.
Setting breakpad minidump AppID = 570
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Setting breakpad minidump AppID = 373300
Affinity preferences: 12 logical processors, limiting to 12
   0 - proc  0 (grp 0:0  / phy 0 / cor 0 / smt 1): max freq 5700000000
   1 - proc  6 (grp 0:6  / phy 0 / cor 0 / smt 2): max freq 5700000000
   2 - proc  1 (grp 0:1  / phy 0 / cor 1 / smt 1): max freq 5700000000
   3 - proc  7 (grp 0:7  / phy 0 / cor 1 / smt 2): max freq 5700000000
   4 - proc  2 (grp 0:2  / phy 0 / cor 2 / smt 1): max freq 5700000000
   5 - proc  8 (grp 0:8  / phy 0 / cor 2 / smt 2): max freq 5700000000
   6 - proc  3 (grp 0:3  / phy 0 / cor 3 / smt 1): max freq 5700000000
   7 - proc  9 (grp 0:9  / phy 0 / cor 3 / smt 2): max freq 5700000000
   8 - proc  4 (grp 0:4  / phy 0 / cor 4 / smt 1): max freq 5700000000
   9 - proc 10 (grp 0:10 / phy 0 / cor 4 / smt 2): max freq 5700000000
  10 - proc  5 (grp 0:5  / phy 0 / cor 5 / smt 1): max freq 5700000000
  11 - proc 11 (grp 0:11 / phy 0 / cor 5 / smt 2): max freq 5700000000
Affinity preferences: no logical processor speed variation
Affinity preferences: disabled (6 physical procs, 12 logical)
    nopref-all 0: proc 0 (group 0:0)
    nopref-all 0: proc 6 (group 0:6)
  nopref-all slot 0 combined mask 0:0x41
    nopref-all 1: proc 1 (group 0:1)
    nopref-all 1: proc 7 (group 0:7)
  nopref-all slot 1 combined mask 0:0x82
    nopref-all 2: proc 2 (group 0:2)
    nopref-all 2: proc 8 (group 0:8)
  nopref-all slot 2 combined mask 0:0x104
    nopref-all 3: proc 3 (group 0:3)
    nopref-all 3: proc 9 (group 0:9)
  nopref-all slot 3 combined mask 0:0x208
    nopref-all 4: proc 4 (group 0:4)
    nopref-all 4: proc 10 (group 0:10)
  nopref-all slot 4 combined mask 0:0x410
    nopref-all 5: proc 5 (group 0:5)
    nopref-all 5: proc 11 (group 0:11)
  nopref-all slot 5 combined mask 0:0x820
Affinity preferences: 'higher' thread assigned to proc mask 0:0x41 (index 0) (forced), next proc mask 0:0x82 (index 1)
Affinity preferences: 'higher' thread assigned to proc mask 0:0x82 (index 1) (forced), next proc mask 0:0x104 (index 2)
Affinity preferences: 'higher' thread assigned to proc mask 0:0x104 (index 2) (forced), next proc mask 0:0x208 (index 3)
Affinity preferences: 'higher' thread assigned to proc mask 0:0x208 (index 3) (forced), next proc mask 0:0x410 (index 4)
Affinity preferences: 'higher' thread assigned to proc mask 0:0x410 (index 4) (forced), next proc mask 0:0x820 (index 5)
WARNING: CDirWatcher not implemented
Enabling instance extension: VK_KHR_get_physical_device_properties2.
Using VK_EXT_memory_budget set texture memory budget to 5794 MB.
Vulkan physical device (0): using transform constant buffer: false
Vulkan physical device (0): supports shader clip distance: true
Vulkan physical device (0): using secondary command buffers: false
Loaded video settings config from 'cfg/video.txt'
Vulkan Physical Device: GeForce GTX TITAN
Initializing texture manager.
Vulkan extension enabled: VK_KHR_swapchain
Vulkan extension enabled: VK_NV_dedicated_allocation
Vulkan extension enabled: VK_KHR_descriptor_update_template
Vulkan extension enabled: VK_KHR_image_format_list
Vulkan extension enabled: VK_KHR_maintenance1
Vulkan extension enabled: VK_KHR_maintenance2
Vulkan extension enabled: VK_EXT_separate_stencil_usage
Vulkan extension enabled: VK_KHR_swapchain_mutable_format
Vulkan extension enabled: VK_EXT_memory_budget
Fossilize INFO: Overriding serialization path: "/home/joachim/.local/share/Steam/SteamApps/shadercache/570/fozpipelinesv4/steamapprun_pipeline_cache".
Vulkan Command Buffer Pool Threshold(1500)
Unable to open Vulkan pipeline cache shadercache/vulkan/shaders.cache file - might not exist yet.
Affinity preferences: 'higher' thread assigned to proc mask 0:0x820 (index 5) (forced), next proc mask 0:0x41 (index 0)
Vulkan driver version: 440.82.0.0
Vulkan driver version Major = 440, Minor = 82, Patch = 0
Call to vkCreateSwapchainWSI returned an error.
No minidump written, nothing to upload.
./dota.sh: line 104:  8143 Segmentation fault      (core dumped) ${STEAM_RUNTIME_PREFIX} ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"

Still same issue with 440.82 and 440.66.11.
Still can’t be able to launch a vulkan game if compositor is disabled (pre-requisite for G-Sync to work).
If compositor is activated, game is launching but G-SYNC is not enabled (normal behavior, even for opengl).

Vulkan games are working without compositor activated but only in windowed mode. If I try to change to fullscreen in-game, game is crashing.

I tried to enable modeset with nvidia-drm modeset=1, I also tried with nvidia modules included in initramfs. I also tried latest vulkan driver. No luck.
With Vulkan, Gsync is still not working (visual indicator says BLIT - NORMAL instead of FLIP - GSYNC) and I don’t find any clue on archlinux wikis, nvidia dev talk or search engines on this subject.
Why opengl games are working with Gsync but not Vulkan games ?

Am I the only one with this issue ?
Someone could help me ?

Thank you.

Hello,

I still didn’t find a solution and I have no clue on what to do next.
Vulkan seems to not be able to “direct access” on the display (monitor) and fails to “CreateSwapChain”. But if a compositor is activated and running, it can display on it.

When I launch a vulkan game, sound plays, cursor is modified, but screen still shows the desktop, if I re-enable the compositor with alt+shift+F12 while game still “running”, game screen appears, if I re-disabled the compositor with same keys combo, the screen is “freezing”, sound continue to play.
OpenGL games don’t have this issue.

Anyone have an idea ?

Thank you

Is it a known issue that will be fixed on next release (450.x or so) ?
Thanks

What monitor do you have? You’re stating you’re using a Kepler based GPU and this is not supported as far as I know you need to use a NVIDIA GeForce 10xx, 16xx or 20xx based graphics card.

See: G-Sync & G-Sync HDR System Requirements and What are the system requirements for G-sync Compatible display technology? | NVIDIA for details.

Those are the requirements for “G-Sync Compatible” aka "FreeSync"monitors that have been recently added. Real “G-Sync” monitors should work fine on Keplers.

I have an ASUS ROG PG278Q G-Sync monitor (not freesync).

And what surprise me the most is that on OpenGL games I see the G-SYNC (green) indicator displayed on top right of the monitor, but not with Vulkan games. Also, without compositor activated, frames are not displayed on vulkan games (CreateSwapChain error). Looks like it can’t “direct control” the display or monitor. But again, with OpenGL games, no issues. I don’t what should be the normal behavior without compositor activated but it is necessary to disable it for G-Sync to work with OpenGL games.
I’m on ArchLinux and now I’m with latest vulkan beta drivers, still the same.
Thanks for your help.

I wouldn’t know what the compositor had to do with vulkan, should work without it.
Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post. You will have to rename the file ending to something else since the forum software doesn’t accept .gz files (nifty!).

nvidia-bug-report.log (376.4 KB)
Thank you Generix, I attached bug report compressed archive renamed.

Only thing I noticed is that kwin_x11 doesn’t run on the nvidia gpu, which is fairly odd. Did you set kwin to software renderer?

Yes I set compositor to XRender because opengl render suffers a several years Nvidia driver issue (recently fixed by nvidia dev, maybe delivered with next drivers version, dixit bugzilla kde. I don’t remember the bug number).
But I also tried opengl2 and opengl3 renders with same results for vulkan games.
Many games disables the compositor before starting.

Sorry, no idea what’s going on.

Thank you Generix for trying to help on this case.
What can I do next ?
Maybe something that can help is someone with fully working g-sync + vulkan (or better just vulkan app with compositor disabled) can share some info (xorg cfg, kernel version, driver version, driver options, graphic card model…).

You could try a different DE, maybe xfce and check if the same behaviour can be observed.