Open JacekJagosz opened 1 year ago
I will add Cyberpunk to my testing list. Not sure why ITM isn't working right now, will check that out soon too.
Are you able to share drm_info + stdout of the game? May need PROTON_LOG=1 and it should be in /home/yourname/steam-appid.log
Also I don't think that kernel branch has all the stuff needed for scanout for Gamescope right now (uses the AMD names not the VALVE ones atm... I need to add compatibility for that)
The proton log does not generate for me which I am really sorry about, here is the picture of the logs I got. (I can't make a screenshot from TTY)
I suspect the issue could be related to no VALVE1_CRTC_REGAMMA_TF
support? Still weird then HDR works at all
Looks like you don't have any of the HDR stuff enabled in the kernel. You need to define it on then also use the patch taht renames them to VALVE1 atm.
So I need to use the older patchset with older names. But are you also suggesting the new HDR patches didn't apply for me? How can I check that?
I think they probably did apply but you didnt enable the kernel define to enable them.
Sorry, I did indeed miss a parameter that enables AMD_PRIVATE_COLOR
.
also use the patch that renames them to VALVE1 atm.
Does such patch exist already, or I should rename them all manually?
I have managed to fix my patched kernel and renamed all to names you have used in: The image looks exactly the same as before, Cyberpunk's HDR is extremely washed out, while changing itm parameters seems to not change the presentation. Still, the image is somehow tonemapped to HDR and doesn't look too bad, it just seems not using itm.
env ENABLE_GAMESCOPE_WSI=1 DXVK_HDR=1 LUTRIS_SKIP_INIT=1 LIBSEAT_BACKEND=logind ENABLE_MANGOHUD=0 ENABLE_VKBASALT=0 gamescope -f --hdr-enabled -W 2560 -H 1440 -w 2560 -h 1440 --hdr-itm-enable --hdr-itm-target-nits=1200 --hdr-itm-sdr-nits=40 lutris lutris:rungameid/1
What does "couldn't write patched edid?" mean? Could that affect the presentation?
I finally got the tonemapping looking good in Cyberpunk! But it is still weird.
First I created edid.bin
and exported GAMESCOPE_PATCHED_EDID_FILE
to get rid of the previous error.
If I launch the game I get very washed out colors, but if I switch to HDR10 PQ mode ingame (which still looks even more washed out), and then back to SDR, the colors get fixed! They are no longer washed out, and look genuinely really good.
Here is the Wine LOG:
Started initial process 2955 from gamemoderun /home/jacek/.local/share/lutris/runners/wine/lutris-GE-Proton8-8-x86_64/bin/wine /run/media/jacek/Cyberpunk/Cyberpunk 2077/bin/x64/Cyberpunk2077.exe
Start monitoring process.
gamemodeauto:
fsync: up and running.
wine: Using setpriority to control niceness in the [-10,10] range
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
File 'Z:\run\media\jacek\Cyberpunk\Cyberpunk 2077\bin\x64\sl.interposer.dll' is signed by NVIDIA and the signature was verified.
File 'Z:\run\media\jacek\Cyberpunk\Cyberpunk 2077\bin\x64\/sl.common.dll' is signed by NVIDIA and the signature was verified.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
File 'Z:\run\media\jacek\Cyberpunk\Cyberpunk 2077\bin\x64\/sl.dlss.dll' is signed by NVIDIA and the signature was verified.
File 'Z:\run\media\jacek\Cyberpunk\Cyberpunk 2077\bin\x64\/sl.dlss_g.dll' is signed by NVIDIA and the signature was verified.
File 'Z:\run\media\jacek\Cyberpunk\Cyberpunk 2077\bin\x64\/sl.nis.dll' is signed by NVIDIA and the signature was verified.
File 'Z:\run\media\jacek\Cyberpunk\Cyberpunk 2077\bin\x64\/sl.reflex.dll' is signed by NVIDIA and the signature was verified.
57.530:00e0:00e4:info:vkd3d-proton:vkd3d_instance_apply_application_workarounds: Program name: "Cyberpunk2077.exe"
57.530:00e0:00e4:info:vkd3d-proton:vkd3d_instance_apply_application_workarounds: Detected game Cyberpunk2077.exe, adding config 0x40000000, removing masks 0x0.
57.530:00e0:00e4:info:vkd3d-proton:vkd3d_instance_deduce_config_flags_from_environment: shader_cache is used, global_pipeline_cache is enforced.
57.530:00e0:00e4:info:vkd3d-proton:vkd3d_config_flags_init_once: VKD3D_CONFIG=''.
57.531:00e0:00e4:info:vkd3d-proton:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.9.0.
57.531:00e0:00e4:info:vkd3d-proton:vkd3d_instance_init: vkd3d-proton - build: 6365efeba253807.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
57.578:00e0:00e4:info:vkd3d-proton:vkd3d_memory_info_upload_hvv_memory_properties: Topology: No more than 1 device local heap, assuming ReBAR-style access. Using DEVICE_LOCAL | HOST_COHERENT for UPLOAD.
57.578:00e0:00e4:info:vkd3d-proton:vkd3d_memory_info_init_budgets: Applying resizable BAR budget to memory types: 0x218.
57.579:00e0:00e4:info:vkd3d-proton:vkd3d_bindless_state_get_bindless_flags: Device supports VK_EXT_mutable_descriptor_type.
57.579:00e0:00e4:info:vkd3d-proton:vkd3d_bindless_state_get_bindless_flags: Device supports ultra-fast path for descriptor copies.
57.579:00e0:00e4:info:vkd3d-proton:vkd3d_bindless_state_get_bindless_flags: Device supports packed metadata path for descriptor copies.
57.579:00e0:00e4:info:vkd3d-proton:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
57.579:00e0:00e4:info:vkd3d-proton:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
57.579:00e0:00e4:info:vkd3d-proton:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
57.587:00e0:00e4:info:vkd3d-proton:d3d12_device_caps_init_shader_model: Enabling support for SM 6.6.
57.587:00e0:00e4:fixme:vkd3d-proton:d3d12_device_caps_init_feature_options1: TotalLaneCount = 448, may be inaccurate.
57.587:00e0:00e4:info:vkd3d-proton:vkd3d_pipeline_library_init_disk_cache: Remapping VKD3D_SHADER_CACHE to: vkd3d-proton.cache.
57.587:00e0:00e4:info:vkd3d-proton:vkd3d_pipeline_library_init_disk_cache: Attempting to load disk cache from: vkd3d-proton.cache.
57.588:00e0:01e0:info:vkd3d-proton:vkd3d_pipeline_library_disk_thread_main: Performing async setup of stream archive ...
57.588:00e0:01e0:info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_merge: No write cache exists. No need to merge any disk caches.
57.588:00e0:01e0:info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_initial_setup: Merging pipeline libraries took 0.181 ms.
57.589:00e0:01e0:info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_initial_setup: Mapping read-only cache took 0.165 ms.
57.589:00e0:01e0:info:vkd3d-proton:d3d12_pipeline_library_read_blob_stream_format: Device teardown request received, stopping parse early.
57.589:00e0:01e0:info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_initial_setup: Parsing stream archive took 0.519 ms.
57.589:00e0:01e0:info:vkd3d-proton:vkd3d_pipeline_library_disk_thread_main: Done performing async setup of stream archive.
57.599:00e0:00e4:info:vkd3d-proton:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.9.0.
57.599:00e0:00e4:info:vkd3d-proton:vkd3d_instance_init: vkd3d-proton - build: 6365efeba253807.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
57.636:00e0:00e4:info:vkd3d-proton:vkd3d_memory_info_upload_hvv_memory_properties: Topology: No more than 1 device local heap, assuming ReBAR-style access. Using DEVICE_LOCAL | HOST_COHERENT for UPLOAD.
57.636:00e0:00e4:info:vkd3d-proton:vkd3d_memory_info_init_budgets: Applying resizable BAR budget to memory types: 0x218.
57.636:00e0:00e4:info:vkd3d-proton:vkd3d_bindless_state_get_bindless_flags: Device supports VK_EXT_mutable_descriptor_type.
57.636:00e0:00e4:info:vkd3d-proton:vkd3d_bindless_state_get_bindless_flags: Device supports ultra-fast path for descriptor copies.
57.636:00e0:00e4:info:vkd3d-proton:vkd3d_bindless_state_get_bindless_flags: Device supports packed metadata path for descriptor copies.
57.636:00e0:00e4:info:vkd3d-proton:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
57.636:00e0:00e4:info:vkd3d-proton:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
57.636:00e0:00e4:info:vkd3d-proton:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
57.644:00e0:00e4:info:vkd3d-proton:d3d12_device_caps_init_shader_model: Enabling support for SM 6.6.
57.644:00e0:00e4:fixme:vkd3d-proton:d3d12_device_caps_init_feature_options1: TotalLaneCount = 448, may be inaccurate.
57.644:00e0:00e4:info:vkd3d-proton:vkd3d_pipeline_library_init_disk_cache: Remapping VKD3D_SHADER_CACHE to: vkd3d-proton.cache.
57.644:00e0:00e4:info:vkd3d-proton:vkd3d_pipeline_library_init_disk_cache: Attempting to load disk cache from: vkd3d-proton.cache.
57.646:00e0:01e8:info:vkd3d-proton:vkd3d_pipeline_library_disk_thread_main: Performing async setup of stream archive ...
57.646:00e0:01e8:info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_merge: No write cache exists. No need to merge any disk caches.
57.646:00e0:01e8:info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_initial_setup: Merging pipeline libraries took 0.266 ms.
57.646:00e0:01e8:info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_initial_setup: Mapping read-only cache took 0.172 ms.
57.649:00e0:01e8:info:vkd3d-proton:vkd3d_pipeline_library_disk_cache_initial_setup: Parsing stream archive took 3.205 ms.
57.649:00e0:01e8:info:vkd3d-proton:vkd3d_pipeline_library_disk_thread_main: Done performing async setup of stream archive.
64.943:00e0:00e4:info:vkd3d-proton:dxgi_vk_swap_chain_init: Creating swapchain (2560 x 1440), BufferCount = 3.
64.943:00e0:00e4:info:vkd3d-proton:dxgi_vk_swap_chain_init_sync_objects: Enabling frame latency handles.
64.943:00e0:00e4:info:vkd3d-proton:dxgi_vk_swap_chain_init_sync_objects: Ensure maximum latency of 3 frames with KHR_present_wait.
[Gamescope WSI] Creating Gamescope surface: xid: 0xc00039
[Gamescope WSI] Atom of T was wrong type. Expected XCB_ATOM_CARDINAL.
[Gamescope WSI] Made gamescope surface for xid: 0xc00039
[Gamescope WSI] Surface state:
window xid: 0xc00039
wayland surface res id: 5
layer client flags: 0x0
server hdr output enabled: true
hdr formats exposed to client: true
64.944:00e0:00e4:info:vkd3d-proton:dxgi_vk_swap_chain_init_waiter_thread: Enabling present wait path for frame latency.
64.946:00e0:00e4:fixme:vkd3d-proton:dxgi_vk_swap_chain_SetGammaControl: iface 00000000519423a0, NumControlPoints 1024, pControlPoints 00000000059fdab0 stub!
[Gamescope WSI] Creating swapchain for xid: 0xc00039 - format: VK_FORMAT_R8G8B8A8_UNORM - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - flip: true
65.259:00e0:01f0:info:vkd3d-proton:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 3 swapchain images.
[Gamescope WSI] Creating swapchain for xid: 0xc00039 - format: VK_FORMAT_R8G8B8A8_UNORM - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - flip: true
65.280:00e0:01f0:info:vkd3d-proton:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 3 swapchain images.
75.334:00e0:0118:fixme:vkd3d-proton:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
Cant find the RootSig
121.324:00e0:00e4:info:vkd3d-proton:dxgi_vk_swap_chain_ChangeProperties: Reallocating swapchain (2560 x 1440), BufferCount = 3.
[Gamescope WSI] VkHdrMetadataEXT: mastering luminance min 0.100000 nits, max 5000000.000000 nits
[Gamescope WSI] VkHdrMetadataEXT: maxContentLightLevel 500.000000 nits
[Gamescope WSI] VkHdrMetadataEXT: maxFrameAverageLightLevel 100.000000 nits
[Gamescope WSI] Creating swapchain for xid: 0xc00039 - format: VK_FORMAT_A2B10G10R10_UNORM_PACK32 - colorspace: VK_COLOR_SPACE_HDR10_ST2084_EXT - flip: true
121.465:00e0:01f0:info:vkd3d-proton:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 3 swapchain images.
[Gamescope WSI] VkHdrMetadataEXT: mastering luminance min 0.100000 nits, max 5000000.000000 nits
[Gamescope WSI] VkHdrMetadataEXT: maxContentLightLevel 500.000000 nits
[Gamescope WSI] VkHdrMetadataEXT: maxFrameAverageLightLevel 100.000000 nits
124.108:00e0:00e4:info:vkd3d-proton:dxgi_vk_swap_chain_ChangeProperties: Reallocating swapchain (2560 x 1440), BufferCount = 3.
[Gamescope WSI] Creating swapchain for xid: 0xc00039 - format: VK_FORMAT_R8G8B8A8_UNORM - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - flip: true
124.240:00e0:01f0:info:vkd3d-proton:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 3 swapchain images.
126.727:00e0:012c:fixme:vkd3d-proton:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
191.046:00e0:00e4:fixme:vkd3d-proton:dxgi_vk_swap_chain_SetGammaControl: iface 00000000519423a0, NumControlPoints 0, pControlPoints 0000000000000000 stub!
Initial process has exited (return code: 0)
Monitored process exited.
Exit with return code 0
I have just checked, and every single program I launch is very washed out using when using tonemapping, not just Cyberpunk. The difference is I can "fix" cyberpunk presentation by going SDR->HDR->SDR.
OS: Solus 4.3 APU: AMD Ryzen PRO 4650G (Renoir with Vega iGPU) Kernel: 6.3.6 with HDR patches from this branch https://gitlab.freedesktop.org/mwen/linux-amd/-/tree/amd-private-color-v2 Mesa: 23.0.3 Wine stuff: Lutris-GE-Proton 8.5, DXVK 2.2, VKD3D 2.9 Gamescope: 3.12.0-beta9
First I wanted to thank you all for making HDR work on Linux, I am so happy it is working already. When I enable HDR in Cyberpunk's settings the colors are extremely washed out, but this is something other users have reported too on Linux. So I wanted to use SDR in-game and reverse tonemapping to have HDR presentation instead:
I noticed that no matter if I add
--hdr-itm-enable
or not, whatever values I choose for--hdr-itm-target-nits=600 --hdr-itm-sdr-nits=100
the image looks exactly the same. It is converted to HDR in some way, but it seems not using itm. Then I did:And chose very high or very low values for
--hdr-sdr-content-nits
then I realised this setting does visibly change the presentation. Which makes no sense to me as if I understood the source code correctly if itm is enabled this setting should not affect anything? The results are the same if I do--hdr-itm-enable
or not. Is this expected behaviour? Could I do anything to diagnose what is happening?