FS#74211 - [vulkan-icd-loader] Update 1.3.207-1 and above break NvFBC
Attached to Project:
Arch Linux
Opened by Mal Haak (insanemal) - Wednesday, 23 March 2022, 15:58 GMT
Last edited by Laurent Carlier (lordheavy) - Wednesday, 28 June 2023, 11:57 GMT
Opened by Mal Haak (insanemal) - Wednesday, 23 March 2022, 15:58 GMT
Last edited by Laurent Carlier (lordheavy) - Wednesday, 28 June 2023, 11:57 GMT
|
Details
Description:
After updating vulkan-icd-loader and vulkan-tools to update 1.3.207 or above NvFBC support is totally broken. With Tesla cards or patched drivers on GTX cards. Steps to reproduce: Have NVIDIA driver installed Have OBS/Sunshine installed Try and use NvFBC Get "invalid external buffer capabilities" errors |
This task depends upon
Closed by Laurent Carlier (lordheavy)
Wednesday, 28 June 2023, 11:57 GMT
Reason for closing: Fixed
Additional comments about closing: Since Nvidia-510.68.02-1
Wednesday, 28 June 2023, 11:57 GMT
Reason for closing: Fixed
Additional comments about closing: Since Nvidia-510.68.02-1
It occurs between versions 1.2.203 and 1.3.204 of vulkan-icd-loader.
So I made bisecting test.
first bad commit: https://github.com/KhronosGroup/Vulkan-Loader/commit/232c6977d2017442dec6abe78fd62222f8d0a333
(part of: https://github.com/KhronosGroup/Vulkan-Loader/pull/779)
As far as I understand, the problem is that libnvidia-fbc during initialization reports the minimum vulkan api 1.0.0, but after that it requests layers, which are supported starting only from vulkan api 1.1. And the issue only became known when vk-loader made some checks more precise (probably to properly match the vulkan api spec). Apparently there will be some more similar cases with the minimum apiVersion.
But a fix on the application side (driver in this case) would be more preferable, since more strict compliance with the requirements of the vulkan api specifications.
For now, the better solution is to increase the apiVersion that libnvidia-fbc tells vulkan on initialization.
In theory, changing to 1.1 should be safe since 510 versions of the driver should already support vulkan 1.3 (but for obvious reasons, only the nvidia developers can guarantee that this change alone is enough, besides, a similar situation may be in some other files)
This fix should be enough (I tested it on version 510.60.02, but libnvidia-fbc.so doesn't seem to change that often, so it might work on some previous versions as well.):
sudo sed -i 's/\xc7\x84\x24\xfc\x01\x00\x00\x00\x00\x40\x00/\xc7\x84\x24\xfc\x01\x00\x00\x00\x10\x40\x00/' "/usr/lib/libnvidia-fbc.so"
more info: https://github.com/KhronosGroup/Vulkan-Loader/issues/894
looks like some fixes for linux will be in 1.3.210 version, but the problem described above is related to nvidia-utils (or other packages with libnvidia-fbc.so file)
https://www.nvidia.com/Download/driverResults.aspx/187526/en-us
fixed in 510.68.02