sultim-t / vkquake-rt

GNU General Public License v2.0
345 stars 14 forks source link

Is it possible to run vkquake-rt on linux? #17

Open moddie666 opened 1 year ago

moddie666 commented 1 year ago

If testing is needed, I'd be able to try on rtx 2080 and/or 6700xt.

I've minimal experience with building software from source, but would love to get this running!

chowder3907 commented 1 year ago

I'm potentially seeing the ability to build an appimage but having some trouble with it, but there are scripts for it in the repo

moddie666 commented 1 year ago

i've seen that too. but not played around with it. any info in the readme would be greatly appreciated. might try with that soon, and reprt back here...

i dont need detailed instructions, just some pointers to follow the creators thought process :P

sultim-t commented 1 year ago

It's possible, but needs some tweaking and building RayTracedGL1, as I was building only on Windows using Visual Studio solution. It can be used as a reference: https://github.com/sultim-t/vkquake-rt/tree/master/Windows/VisualStudio

Blitzwing1 commented 1 year ago

If testing is needed, I'd be able to try on rtx 2080 and/or 6700xt.

I've minimal experience with building software from source, but would love to get this running!

If you're interested in just getting it running in your Linux environment then it works quite well via Wine, specially using a Lutris runner version of wine. That's how I've been playing it since AMD support was added. The only option you need to change (at least on AMD using Mesa) is the option regarding the skybox I think as with it enabled there is significant corruption.

Calinou commented 1 year ago

and/or 6700xt.

Note that raytracing is not available by default on AMD + Linux with the Mesa drivers, unless you specify the RADV_PERFTEST=rt environment variable. Even then, performance will be very slow compared to Windows (usually 3 to 4 times slower as of writing). This will be improved in the future (and RT will eventually be enabled by default), but I'd expect it to take 2-3 more years to mature.

Regarding NVIDIA, DLSS can be supported in native Linux games as the library is available in compiled form for Linux. However, the integration process isn't well-documented as there are no released native Linux games with DLSS support (Proton doesn't count here). FSR 2 should work regardless, in both native and WINE.

On my end, I tried using RADV_PERFTEST=rt on a Radeon 6900 XT, which works with PrBoom+ RT (with some visual glitches) but crashes on startup with vkquake-rt:

❯ RADV_PERFTEST=rt gamemoderun wine vkquake
gamemodeauto: 
Command line: Z:\home\hugo\.local\opt\vkquake-rt\vkquake.exe
Found SDL version 2.0.22
Detected 8 CPUs.
Initializing vkQuake v1.20.3
Built with Microsoft C 193131105
Host_Init
Playing registered version.
Console initialized.
IPv4 UDP Initialized
WIPX_OpenSocket: Address family not supported by protocol family
WIPX_Init: Unable to open control socket, IPX disabled
Server using protocol 999+ (FTE-RMQ)
Exe: 02:39:03 Oct  1 2022

Ray tracing Initialization
wine: Unhandled page fault on read access to 0000000000000040 at address 00007F62F5490B5B (thread 0244), starting debugger...
Unhandled exception: page fault on read access to 0x0000000000000040 in 64-bit code (0x007f62f5490b5b).
Register dump:
 rip:00007f62f5490b5b rsp:000000000011ec30 rbp:000000000011ed80 eflags:00010202 (  R- --  I   - - - )
 rax:0000000000000000 rbx:000000000011eea0 rcx:0000000000000000 rdx:000000000011eea0
 rsi:0000000000000140 rdi:000000007ea350b0  r8:0000000000000000  r9:0000000000000000 r10:00007f6306ca2640
 r11:000000000011efe0 r12:000000000011efe0 r13:0000000000000000 r14:000000000011efe0 r15:00007f62f57ad11c
Stack dump:
0x0000000011ec30:  0000000000000000 0000000000000000
0x0000000011ec40:  0000000000000000 0000000000000000
0x0000000011ec50:  0000000000000000 0000000000000000
0x0000000011ec60:  0000000000000000 000000007ea350b0
0x0000000011ec70:  0000000000000000 0000000000000000
0x0000000011ec80:  0000000000000000 000000000011edb0
0x0000000011ec90:  000000000011ed80 00000000014d56d8
0x0000000011eca0:  000000000011f670 00000000015f8b20
0x0000000011ecb0:  0000000000000000 00007f63069ef61f
0x0000000011ecc0:  00000000015f8b00 00007f63069fde3f
0x0000000011ecd0:  0000000000000000 0000000000000000
0x0000000011ece0:  0000000000000000 0000000000000000
Backtrace:
=>0 0x007f62f5490b5b in libvulkan_radeon.so (+0x90b5b) (0x0000000011ed80)
  1 0x007f63069ef61f in winevulkan.so (+0x1d61f) (0x0000000011ed80)
  2 0x007f63069fde3f in winevulkan.so (+0x2be3f) (0x0000000011ed80)
  3 0x000002d4ad8971 vkUpdateDescriptorSets+0x41(device=*** Invalid address 0000000000000000 ***
Internal symbol error: unable to access memory location 0000000000000000, descriptorWriteCount=0x5, pDescriptorWrites=000000000011EEA0, descriptorCopyCount=0, pDescriptorCopies=0000000000000000) [Z:\builddir\build\BUILD\wine-7.20\dlls\winevulkan\loader_thunks.c:4834] in winevulkan (0x0000000011eef0)
  4 0x00000000838a9e in raytracedgl1 (+0x108a9e) (0x0000000011eef0)
  5 0x000000008378dd in raytracedgl1 (+0x1078dd) (0000000000000000)
  6 0x0000000076c5b0 in raytracedgl1 (+0x3c5b0) (0x0000000011f140)
  7 0x0000000074fb0b in raytracedgl1 (+0x1fb0b) (0x0000000011f730)
  8 0x00000000751af6 in raytracedgl1 (+0x21af6) (0x0000000011f730)
  9 0x0000014003d285 in vkquake (+0x3d285) (0x0000000011f730)
  10 0x0000014003f275 in vkquake (+0x3f275) (0x0000000011f940)
  11 0x00000140044585 in vkquake (+0x44585) (0x00000000000001)
  12 0x0000014004fd54 in vkquake (+0x4fd54) (0x000000025e0030)
  13 0x00000140001191 in vkquake (+0x1191) (0x000000025e0030)
  14 0x000001400cbcd2 in vkquake (+0xcbcd2) (0000000000000000)
  15 0x0000007b6290b9 BaseThreadInitThunk+0x9(unknown=<internal error>, entry=<internal error>, arg=<internal error>) [Z:\builddir\build\BUILD\wine-7.20\dlls\kernel32\thread.c:61] in kernel32 (0000000000000000)
  16 0x0000017005f443 __wine_pop_frame(entry=00000001400CBD40, arg=0000000067FF0000) [Z:\builddir\build\BUILD\wine-7.20\include\wine\exception.h:277] in ntdll (0000000000000000)
  17 0x0000017005f443 RtlUserThreadStart+0x83(entry=[<register RSP not accessible in this frame>, arg=[<register RSP not accessible in this frame>) [Z:\builddir\build\BUILD\wine-7.20\dlls\ntdll\thread.c:240] in ntdll (0000000000000000)
0x007f62f5490b5b libvulkan_radeon.so+0x90b5b: movq      0x00000000000040(%r13),%rdx
Modules:
Module  Address                                 Debug info      Name (123 modules)
PE      0000000000730000-0000000000b94000       Export          raytracedgl1
PE      0000000000ba0000-0000000000c32000       Deferred        msvcp140
PE      0000000000c40000-0000000000c59000       Deferred        vcruntime140
PE      0000000061d00000-0000000061d5d000       Deferred        libxmp
PE      0000000062500000-0000000062526000       Deferred        libopus-0
PE      0000000064080000-0000000064098000       Deferred        libflac-8
PE      0000000066f40000-0000000066f53000       Deferred        libopusfile-0
PE      000000006b3c0000-000000006b3cf000       Deferred        libvorbisfile-3
PE      000000006d540000-000000006d570000       Deferred        libvorbis-0
PE      000000006e1c0000-000000006e1dd000       Deferred        libmad-0
PE      0000000070680000-000000007068d000       Deferred        libogg-0
PE      000000007b000000-000000007b5f8000       Deferred        kernelbase
PE      000000007b600000-000000007b79b000       Dwarf-4-5       kernel32
ELF     000000007d000000-000000007d005000       Deferred        <wine-loader>
PE      0000000140000000-00000001411be000       Export          vkquake
PE      0000000170000000-000000017037b000       Dwarf-4-5       ntdll
PE      0000000180000000-000000018014e000       Deferred        sdl2
PE      00000001cd620000-00000001cd645000       Deferred        aclui
PE      00000001d0e20000-00000001d1356000       Deferred        oleaut32
PE      00000001d8c90000-00000001d8dc9000       Deferred        advapi32
PE      00000001eaf60000-00000001eb022000       Deferred        sechost
PE      000000020b860000-000000020be1f000       Deferred        ole32
PE      0000000213d80000-0000000213da5000       Deferred        zlib1
PE      00000002169d0000-0000000216e88000       Deferred        user32
PE      0000000228280000-00000002285b2000       Deferred        msvcrt
PE      000000023bc00000-000000023ca10000       Deferred        shell32
PE      000000024f110000-000000024f23c000       Deferred        msctf
PE      0000000251d80000-0000000251e11000       Deferred        winex11
PE      000000025dc30000-000000025dc50000       Deferred        version
PE      000000026c230000-000000026c2f3000       Deferred        uxtheme
PE      00000002945e0000-000000029479d000       Deferred        winmm
PE      00000002a2380000-00000002a24a3000       Deferred        shlwapi
PE      00000002a77e0000-00000002a77fc000       Deferred        libssp-0
PE      00000002ac810000-00000002ac81c000       Deferred        vcruntime140_1
PE      00000002bb0a0000-00000002bb34b000       Deferred        gdi32
PE      00000002bde30000-00000002bde87000       Deferred        shcore
PE      00000002c73a0000-00000002c73f3000       Deferred        win32u
PE      00000002c7470000-00000002c7810000       Deferred        ucrtbase
PE      00000002d4ad0000-00000002d4bbf000       Dwarf-4         winevulkan
PE      00000002d7860000-00000002d78a1000       Deferred        libpng16-16
PE      00000002ee630000-00000002ee684000       Deferred        bcrypt
PE      00000002fb3c0000-00000002fb944000       Deferred        comctl32
PE      000000031c5d0000-000000031c766000       Deferred        combase
PE      0000000351a60000-0000000351adb000       Deferred        msacm32
PE      0000000368420000-00000003686c2000       Deferred        rpcrt4
PE      000000036d860000-000000036da66000       Deferred        setupapi
PE      0000000370f70000-000000037101a000       Deferred        ws2_32
PE      0000000393730000-0000000393795000       Deferred        imm32
PE      00000003aa5b0000-00000003aa5c3000       Deferred        vulkan-1
ELF     00007f62c9a00000-00007f62cff6a000       Deferred        libllvm-14.so
ELF     00007f62f5400000-00007f62f5ad4000       Dwarf           libvulkan_radeon.so
ELF     00007f62f5c00000-00007f62f622f000       Deferred        libvulkan_lvp.so
ELF     00007f62f67b6000-00007f62f67d1000       Deferred        libelf.so.1
ELF     00007f62f67d1000-00007f62f6800000       Deferred        libtinfo.so.6
ELF     00007f62f6800000-00007f62f7024000       Deferred        libvulkan_intel.so
ELF     00007f62f7028000-00007f62f7035000       Deferred        libdrm_amdgpu.so.1
ELF     00007f62f7035000-00007f62f7072000       Deferred        libedit.so.0
ELF     00007f62f7072000-00007f62f7077000       Deferred        libxshmfence.so.1
ELF     00007f62f7077000-00007f62f707c000       Deferred        libxcb-shm.so.0
ELF     00007f62f707c000-00007f62f708f000       Deferred        libxcb-randr.so.0
ELF     00007f62f708f000-00007f62f7099000       Deferred        libxcb-sync.so.1
ELF     00007f62f7099000-00007f62f709e000       Deferred        libxcb-present.so.0
ELF     00007f62f709e000-00007f62f70ca000       Deferred        libexpat.so.1
ELF     00007f62f70ca000-00007f62f70dc000       Deferred        libwayland-client.so.0
ELF     00007f62f719a000-00007f62f71a7000       Deferred        libvklayer_mesa_device_select.so
ELF     00007f62f71a7000-00007f62f7219000       Deferred        libvulkan.so.1
ELF     00007f62f7264000-00007f62f7269000       Deferred        libx11-xcb.so.1
ELF     00007f62f7269000-00007f62f7280000       Deferred        libdrm.so.2
ELF     00007f62f73b2000-00007f62f73bb000       Deferred        libxfixes.so.3
ELF     00007f62f73bb000-00007f62f73c8000       Deferred        libxcursor.so.1
ELF     00007f62f73c8000-00007f62f73dc000       Deferred        libxi.so.6
ELF     00007f62f73dc000-00007f62f73e1000       Deferred        libxcomposite.so.1
ELF     00007f62f73e1000-00007f62f73ee000       Deferred        libxrandr.so.2
ELF     00007f62f73ee000-00007f62f73fb000       Deferred        libxrender.so.1
ELF     00007f62f73fb000-00007f62f7402000       Deferred        libxxf86vm.so.1
ELF     00007f62f7402000-00007f62f7407000       Deferred        libxinerama.so.1
ELF     00007f62f7407000-00007f62f740d000       Deferred        libxau.so.6
ELF     00007f62f740d000-00007f62f7439000       Deferred        libxcb.so.1
ELF     00007f62f7439000-00007f62f7581000       Deferred        libx11.so.6
ELF     00007f62f7581000-00007f62f7596000       Deferred        libxext.so.6
ELF     00007f62f7597000-00007f62f759e000       Deferred        libxcb-dri3.so.0
ELF     00007f62f75c4000-00007f62f7655000       Deferred        winex11.so
ELF     00007f62f8125000-00007f62f829f000       Deferred        libxml2.so.2
ELF     00007f62f829f000-00007f62f82ee000       Deferred        libfontconfig.so.1
ELF     00007f62f82ee000-00007f62f8368000       Deferred        libpcre.so.1
ELF     00007f62f8368000-00007f62f838b000       Deferred        libbrotlicommon.so.1
ELF     00007f62f838b000-00007f62f83ad000       Deferred        libgraphite2.so.3
ELF     00007f62f83ad000-00007f62f84e9000       Deferred        libglib-2.0.so.0
ELF     00007f62f84e9000-00007f62f84f6000       Deferred        libbrotlidec.so.1
ELF     00007f62f84f6000-00007f62f85df000       Deferred        libharfbuzz.so.0
ELF     00007f62f85df000-00007f62f85f9000       Deferred        libz.so.1
ELF     00007f62f85f9000-00007f62f8633000       Deferred        libpng16.so.16
ELF     00007f62f8633000-00007f62f8701000       Deferred        libfreetype.so.6
ELF     00007f62f8701000-00007f62f87a6000       Deferred        libgmp.so.10
ELF     00007f62f87a6000-00007f62f87fb000       Deferred        libnettle.so.8
ELF     00007f62f87fb000-00007f62f89b3000       Deferred        libunistring.so.2
ELF     00007f62f89b3000-00007f62f8a00000       Deferred        libidn2.so.0
ELF     00007f62f8a00000-00007f62f8c29000       Deferred        libgnutls.so.30
ELF     00007f62f8c2a000-00007f62f8c6d000       Deferred        libhogweed.so.6
ELF     00007f62f8c6d000-00007f62f8da2000       Deferred        libp11-kit.so.0
ELF     00007f62f8dd0000-00007f62f8f89000       Deferred        win32u.so
ELF     00007f62f9289000-00007f62f9400000       Dwarf           libwine.so.1
ELF     00007f63069bf000-00007f63069d2000       Deferred        libbz2.so.1
ELF     00007f63069d2000-00007f6306a17000       Dwarf           winevulkan.so
ELF     00007f6306b17000-00007f6306bf5000       Deferred        libm.so.6
ELF     00007f6306bf5000-00007f6306c0e000       Deferred        libunwind.so.8
ELF     00007f6306c0e000-00007f6306ce9000       Deferred        ntdll.so
ELF     00007f6306ce9000-00007f6306d0f000       Deferred        libgpg-error.so.0
ELF     00007f6306d0f000-00007f6306e4c000       Deferred        libgcrypt.so.20
ELF     00007f6306e4c000-00007f6306e70000       Deferred        liblz4.so.1
ELF     00007f6306e70000-00007f6306f23000       Deferred        libzstd.so.1
ELF     00007f6306f23000-00007f6307000000       Deferred        libsystemd.so.0
ELF     00007f6307000000-00007f6307202000       Deferred        libc.so.6
ELF     00007f6307202000-00007f630721a000       Deferred        libtasn1.so.6
ELF     00007f630721a000-00007f6307224000       Deferred        libcap.so.2
ELF     00007f6307224000-00007f630724f000       Deferred        liblzma.so.5
ELF     00007f630724f000-00007f630726f000       Deferred        libgcc_s.so.1
ELF     00007f630726f000-00007f63072c4000       Deferred        libdbus-1.so.3
ELF     00007f63072c4000-00007f63072cb000       Deferred        libgamemode.so.0
ELF     00007f63072e1000-00007f63072ed000       Deferred        libffi.so.8
ELF     00007f63072f3000-00007f63072fe000       Deferred        bcrypt.so
ELF     00007f63072fe000-00007f6307304000       Deferred        ws2_32.so
ELF     00007f6307304000-00007f630733d000       Deferred        ld-linux-x86-64.so.2
Threads:
process  tid      prio    name (all IDs are in hex)
00000038 services.exe
        ["C:\windows\system32\services.exe"]
        0000003c    0
        00000040    0     wine_rpcrt4_server
        0000004c    0     wine_rpcrt4_io
        00000064    0     wine_rpcrt4_io
        00000084    0     wine_rpcrt4_io
        000000fc    0     wine_rpcrt4_io
        000001fc    0     wine_rpcrt4_io
00000044 svchost.exe
        [C:\windows\system32\svchost.exe -k LocalServiceNetworkRestricted]
        00000048    0
        00000054    0
        00000058    0     wine_sechost_service
0000005c winedevice.exe
        [C:\windows\system32\winedevice.exe]
        00000060    0
        00000068    0
        0000006c    0     wine_sechost_service
        00000070    0
        00000074    0
        00000078    0
        000001b8    0
0000007c winedevice.exe
        [C:\windows\system32\winedevice.exe]
        00000080    0
        00000088    0
        0000008c    0     wine_sechost_service
        00000090    0
        00000094    0
        00000098    0
        0000009c    0
        000000e8    0
        000000ec    0
        000001b0    0
        000001b4    0
000000e0 plugplay.exe
        [C:\windows\system32\plugplay.exe]
        000000e4    0
        00000100    0
        00000104    0     wine_sechost_service
        00000108    0     wine_rpcrt4_server
000001f4 rpcss.exe
        [C:\windows\system32\rpcss.exe]
        000001f8    0
        00000204    0
        00000208    0     wine_sechost_service
        0000020c    0     wine_rpcrt4_server
        00000210    0     wine_rpcrt4_server
        00000218    0     wine_threadpool_worker
        0000023c    0     wine_rpcrt4_io
0000021c start.exe
        00000220    0
00000224 conhost.exe
        ["C:\windows\system32\conhost.exe" --unix --width 425 --height 92 --server 0xc]
        00000228    0
0000022c explorer.exe
        ["C:\windows\system32\explorer.exe" /desktop]
        00000230    0
        00000234    0
        00000238    0     wine_rpcrt4_server
00000240 (D) Z:\home\hugo\.local\opt\vkquake-rt\vkQuake.exe
        ["Z:\home\hugo\.local\opt\vkquake-rt\vkquake.exe" ]
        00000244    0 <==
        00000248    0     Task_Worker
        0000024c    0     Task_Worker
        00000250    0     Task_Worker
        00000254    0     Task_Worker
        00000258    0     Task_Worker
        0000025c    0     Task_Worker
        00000260    0     Task_Worker
        00000264    0     Task_Worker
        00000270    0
System information:
    Wine build: wine-7.20 (Staging)
    Platform: x86_64
    Version: Windows 10
    Host system: Linux
    Host version: 6.0.8-200.fc36.x86_64
RaceCondition commented 1 year ago

I've got it to run on Linux just fine, although I need to check a couple of things as I only get the classic controls like keyboard options navigation and original menus, unlike the Bethesda version. No compiling needed at all. The Bethesda version runs perfectly for me, so after a bit of head scratching I got this ray-traced run. The ray-tracing is definitely working, just like the Digital Foundry video shows. I've not managed to get DLSS working yet despite trying.

This is what I did, which works but there may be a better way.

  1. Download the release from here (1.0.1 for me today)
  2. Unzip it to a new dir, which was in my case ...SteamLibraryFolder/steamapps/common/Quake_RTX
  3. Copy the files as instructed in the readme, i.e. the rerelease/id1 and QuakeEK.kpf files etc.
  4. Use Steam Add A Game -> Non Steam Game -> Browse (to the Quake_RTX dir) and select the vkQuake.exe and choose to import it.
  5. Browse to the new game, which will show as vkQuake.exe
  6. Choose Properties -> Compatibility and choose "Force the use of a specific Steam Play compatibility tool". Choose any recent version. For me Proton Experimental, Proton Next (7.0-5) and Proton 7.0-4 all work without issue.
  7. Click Play button in Steam as normal to start the game.

I currently get a couple of warnings on start up of the game, saying :

  1. Some files in local "id1" folder are missing. Copy them from a Steam folder?
  2. Resolution of your display is quite high, which may cause low frame rates. Run at 1440p? I say No to the first and Yes to the second as 4k without DLSS is quite slow on my 3090ti.

FPS wise, it seems to match with the Digital Foundry report.

I'm on: Linux Mint Cinnamon 21. Nvidia 3090ti with nvidia-driver-520 AMD Ryzen 5950X 32gb DDR4 ram.

SeongGino commented 1 year ago

FWIW, DLSS definitely works on Wine (after following DLSS install instructions in the release notes). 2023_01-02-135248 GPU usage seems a bit off, though... not sure what that's about. Entering E1M1 makes FPS drop to a consistent(?) 37 FPS, while the lobby runs at 60, but the options menu makes it drop back to 37? I don't know what's going on here.

moddie666 commented 1 year ago

and/or 6700xt.

Note that raytracing is not available by default on AMD + Linux with the Mesa drivers, unless you specify the RADV_PERFTEST=rt environment variable. Even then, performance will be very slow compared to Windows (usually 3 to 4 times slower as of writing). This will be improved in the future (and RT will eventually be enabled by default), but I'd expect it to take 2-3 more years to mature.

Regarding NVIDIA, DLSS can be supported in native Linux games as the library is available in compiled form for Linux. However, the integration process isn't well-documented as there are no released native Linux games with DLSS support (Proton doesn't count here). FSR 2 should work regardless, in both native and WINE.

On my end, I tried using RADV_PERFTEST=rt on a Radeon 6900 XT, which works with PrBoom+ RT (with some visual glitches) but crashes on startup with vkquake-rt: ...

thanks! RADV_PERFTEST=rt was the key to getting rt at all... but not in vkquake. (quake 2 rtx, works perfectly now) btw. my test card is now a 7900xt i've installed "amdvlk" config and libraries which do work for me. from here: https://github.com/GPUOpen-Drivers/AMDVLK/releases/tag/v-2022.Q4.4 VK_ICD_FILENAMES="/etc/vulkan/icd.d/amd_icd64.json" then selects AMDVLK instead of RADV

aside from artefacting of ui elements and low performance, i've noticed extremely low gpu clock. which may be a bug somewhere else. however prboom-rt does not show this behavior and delivers around 120+fps in both doom-rt and quake-rt fsr options seem to have no impact for me

Screenshot_2023-01-03_22-37-08

icreased artefacting (menu open) may tank perf aswell

Screenshot_2023-01-03_22-38-04

not in doom, however Screenshot_2023-01-03_23-00-47

Screenshot_2023-01-03_23-03-43

moddie666 commented 1 year ago

It's possible, but needs some tweaking and building RayTracedGL1, as I was building only on Windows using Visual Studio solution. It can be used as a reference: https://github.com/sultim-t/vkquake-rt/tree/master/Windows/VisualStudio

has anyone tried giving a true linux build a shot? I wouldn't know where to begin...

Calinou commented 1 year ago

side from artefacting of ui elements and low performance, i've noticed extremely low gpu clock.

This is a known issue with AMD drivers on Linux, see https://gitlab.freedesktop.org/drm/amd/-/issues/1500. I recommend installing GameMode and configuring it to automatically force high GPU power state, then use gamemoderun ./vkquake-rt to start the game.

AMDVLK likely has the same issue as RADV here, considering the issue also occurs on Windows to a lesser extent. This explains why frametime consistency on Windows reviews is often worse than NVIDIA's.

moddie666 commented 1 year ago

side from artefacting of ui elements and low performance, i've noticed extremely low gpu clock.

This is a known issue with AMD drivers on Linux, see https://gitlab.freedesktop.org/drm/amd/-/issues/1500. I recommend installing GameMode and configuring it to automatically force high GPU power state, then use gamemoderun ./vkquake-rt to start the game.

gamemode had no effect here. also an echo into power_dpm_force_performance_level did nothing there is no frame limiting in place. playing around with the limit: i found once lowered, increases are no longer applied.

AMDVLK likely has the same issue as RADV here, considering the issue also occurs on Windows to a lesser extent. This explains why frametime consistency on Windows reviews is often worse than NVIDIA's.

not really sure, what you're referring to here. artefacting or low perf/clock?

Calinou commented 1 year ago

not really sure, what you're referring to here. artefacting or low perf/clock?

I was referring to low clocks being selected by power management when higher clocks should be used.

Blitzwing1 commented 1 year ago

and/or 6700xt.

Note that raytracing is not available by default on AMD + Linux with the Mesa drivers, unless you specify the RADV_PERFTEST=rt environment variable. Even then, performance will be very slow compared to Windows (usually 3 to 4 times slower as of writing). This will be improved in the future (and RT will eventually be enabled by default), but I'd expect it to take 2-3 more years to mature. Regarding NVIDIA, DLSS can be supported in native Linux games as the library is available in compiled form for Linux. However, the integration process isn't well-documented as there are no released native Linux games with DLSS support (Proton doesn't count here). FSR 2 should work regardless, in both native and WINE. On my end, I tried using RADV_PERFTEST=rt on a Radeon 6900 XT, which works with PrBoom+ RT (with some visual glitches) but crashes on startup with vkquake-rt: ...

thanks! RADV_PERFTEST=rt was the key to getting rt at all... but not in vkquake. (quake 2 rtx, works perfectly now) btw. my test card is now a 7900xt i've installed "amdvlk" config and libraries which do work for me. from here: https://github.com/GPUOpen-Drivers/AMDVLK/releases/tag/v-2022.Q4.4 VK_ICD_FILENAMES="/etc/vulkan/icd.d/amd_icd64.json" then selects AMDVLK instead of RADV

aside from artefacting of ui elements and low performance, i've noticed extremely low gpu clock. which may be a bug somewhere else. however prboom-rt does not show this behavior and delivers around 120+fps in both doom-rt and quake-rt fsr options seem to have no impact for me

AMDVLK generally performs better but is still buggy after a couple of years. When I've tried Amdvlk on my 6900xt FSR also has no affect for me in QuakeRT, guess it isn't supported, with RADV those options work as expected.

Don't get why RADV doesn't work for you in Quake as it runs great for me, might be that 7000 support isn't quite there yet.

I use Lutris-GE-Proton7-29, Fsync off, Esync on, FSR on, feral gamemode on.

If it's because the support for 7000 series RT isn't there yet in the driver you can try this RADV variable:

RADV_PERFTEST=rt,emulate_rt

That might not be your problem but it won't hurt to test it if you want to access FSR in Quake. Performance is lower as it doesn't use RT hardware but even on my GPU I get 60fps at 1440p with FSR set to Quality.

moddie666 commented 1 year ago

@Blitzwing1

RADV_PERFTEST=rt,emulate_rt

i'll be dammned... it actually works under radv with rt,emulate_rt no more corruption either... perf is at 30-60 fsr balanced 1440p

SeongGino commented 1 year ago

So from the looks of things, both NVIDIA and AMD have the low clocks/usage issue with vkquake-rt? Because that sounds like a perfect match for my issue.

It's not the card or my setup, either; Quake 2 RTX (native) runs just fine and maxes out GPU utilization and FPS to its abilities like it should. And my only other example with Wine is Control with RT reflections, which also uses the GPU to 100%. Bug in quake-rt, maybe?

Blitzwing1 commented 1 year ago

@Blitzwing1

RADV_PERFTEST=rt,emulate_rt

i'll be dammned... it actually works under radv with rt,emulate_rt no more corruption either... perf is at 30-60 fsr balanced 1440p

Good stuff. As the cards only just released I'm guessing there is still quite a few bugs lurking around, plus RT in RADV is still nowhere near complete. Seems a shame to have a decent RT capable card and turn off the hardware accelerators but if it gets rid of the bugs and runs well.

It's quite amazing what level of hardware can be used if we keep expectations in check. My first experience with Q2RTX was on a Vega 56 at 800x600.

Saancreed commented 1 year ago

For anyone still interested in building vkquake-rt as Linux-native application, here is a gross hack that allowed me to do it on Arch Linux:

https://gist.github.com/Saancreed/8372d78110beef4335dad92c72cc9557

You will need quite a few libraries and build tools installed which I don't remember anymore. Oh, and Wine too because apparently the only way to compile FSR2 shaders is some proprietary Windows binary compiler. DLSS seems to work (but I have a GTX 1660 Ti Mobile GPU, experience on RTX cards might be much better :upside_down_face: ).

neurer commented 1 year ago

Original Release + quake-rt-1_0_2 + Proton Experimental + Mesa 23.0.0 works (stunningly) well on AMD. Had to flip Volumetrics to Simple, otherwise the screen is almost black.

Screenshot from 2023-03-07 17-45-37 Screenshot from 2023-03-07 17-46-17

dNifle commented 1 year ago

Runs at 59fps on my Radeon 6800 XT at 1080p and no FSR. With quality FSR and 1440p I get 68.8fps. Running it through Steam using GE-Proton7-50 with "RADV_PERFTEST=rt,gpl gamemoderun %command%" as launch options.

Edit: Just tried it with AMDVLK for funsies... performance was noticably worse and I had to set volumetric to simple or everything was a blurry mess. There were also random visual artifacts. :laughing: Conslusion: Use RADV

panmarco83 commented 1 year ago

@Saancreed There seems to be 2 problems when using your build script:

Saancreed commented 1 year ago

@panmarco83

  1. That's interesting, I tried to make this robust by using only known-good commits but maybe I missed something and it got updated suddenly (changed tags?) or I just made an honest mistake. I'll verify this later today and try to fixup the script.
  2. That's what patchelf --set-rpath '$ORIGIN' is supposed to take care of, strange that it's not working for you. What does patchelf --print-rpath vkquake print for you? In any case, you should be able to skip this step if you run the game like so (while in the directory that contains both libRayTracedGL1.so and vkquake binary): env LD_LIBRARY_PATH="$(pwd)" ./vkquake
panmarco83 commented 1 year ago

@Saancreed I got this:

user@host:out$ patchelf --print-rpath vkquake

user@host:out$ LD_LIBRARY_PATH="$(pwd)" ./vkquake
Command line: ./vkquake
Found SDL version 2.26.4
Detected 12 CPUs.
Initializing vkQuake v1.20.3
Built with GCC 12.2.1
Host_Init
Playing registered version.
Console initialized.
UDP4 Initialized
UDPv6 Initialized
Server using protocol 999+ (FTE-RMQ)
Exe: 12:12:01 Mar 28 2023

Ray tracing Initialization
Segmentation fault (core dumped)

dmesg:

[76670.154048] vkquake[1843418]: segfault at 0 ip 00007fd9095748e0 sp 00007ffc2a58bf20 error 4 in libvulkan.so.1.3.240[7fd909555000+46000] likely on CPU 0 (core 0, socket 0)
[76670.154059] Code: 75 10 48 8b 05 d9 c0 04 00 e9 0b 2f 00 00 0f 1f 40 00 48 8d 35 8c 40 03 00 48 89 df ff 15 68 c4 04 00 85 c0 0f 84 18 2f 00 00 <4c> 8b 65 00 4d 85 e4 0f 84 0b 2f 00 00 80 3b 76 0f 85 b2 2e 00 00

( I'm on Arch with kernel 6.2.8, mesa 23.0.1, LLVM 15.0.7-2 )

Saancreed commented 1 year ago

This information is kinda useless to me and I cannot help you with this. Not only it looks like your Vulkan driver crashing, but I can't even tell what's the exact problem without a stack trace with debug symbols. I can only tell you that it seems to work on my Turing and Ada Nvidia GPUs.

Fwiw I switched to building with an Arch PKGBUILD which you can find here. It's not yet complete because vkquake-rt assumes write access to its install location so the resulting package cannot be installed with pacman and instead opt/vkquake-rt has to be extracted to some directory in your home manually.

Screenshot_20230328_193305

panmarco83 commented 1 year ago

@Saancreed one little detail: there are 2 windows builds, one for NVIDIA and one for AMD... I'm on a AMD card..

The NVIDIA windows version fails hard no matter what, but the AMD one works quite fine. I'm guessing this might be related ?

Saancreed commented 1 year ago

That's indeed possible. If the AMD build contains additional patches on top of generic/Nvidia build, one will need to track them down and apply them before building. One likely candidate is https://github.com/sultim-t/RayTracedGL1/commit/e6b194fe240ab7f5b8631e4a04f296a446994d76, perhaps with that applied to RayTracedGL1 it would start working correctly.

panmarco83 commented 1 year ago

@Saancreed command me my good fellow!! But, all I can see in the patch is changes to pool size calculations. How does that play into this ?

Saancreed commented 1 year ago

Well, it could prevent the crash you're encountering, couldn't it? Try to apply it and rebuild libRayTracedGL1.so afterwards, maybe it fixes your issue.

panmarco83 commented 1 year ago

@Saancreed noop, same problem again

Saancreed commented 1 year ago

Welp, then we are back to "I have no idea and I cannot help you" :disappointed:

Blitzwing1 commented 1 year ago

Not sure if this problem is affecting others playing this under wine/proton but I've noticed that the 23.1.x branch of Mesa seems to be crashing the amdgpu kernel driver causing a reset of the display manager, I compiled an older version (23.0.4) and now the problem has gone away.

This also affects Doom1-RT but not HL1-RT.

panmarco83 commented 11 months ago

This is happening to me as well. That explains it...