Git Product home page Git Product logo

nvlax's People

Contributors

illnyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nvlax's Issues

Can't encode multiple stream on version 460.106.00 & 460.73.01

  • Nvidia driver version: 460.73.01
  • GPU Model: RTX 2080 Ti
  • Docker image: nvidia/cuda:11.1-cudnn8-devel-ubuntu18.04
# ./nvlax_encode -i /usr/lib/x86_64-linux-gnu/libnvidia-encode.so.460.73.01 -o /usr/lib/x86_64-linux-gnu/libnvidia-encode.so.460.73.01
[+] libnvidia-encode.so
[+] patched successfully

and run

ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i /tmp/BigBuckBunny.mp4 \
-vf scale_npp=480:320 -c:a copy -c:v h264_nvenc -b:v 5M /tmp/output1.mp4 \
-vf scale_npp=240:120 -c:a copy -c:v h264_nvenc -b:v 8M /tmp/output2.mp4 \
-vf scale_npp=960:540 -c:a copy -c:v h264_nvenc -b:v 4M /tmp/output3.mp4 \
-vf scale_npp=960:540 -c:a copy -c:v h264_nvenc -b:v 4M /tmp/output4.mp4  

It shows

[h264_nvenc @ 0x55ba06f470c0] OpenEncodeSessionEx failed: out of memory (10): (no details)
Error initializing output stream 3:0 -- Error while opening encoder for output stream #3:0 - maybe incorrect parameters such as bit_rate, rate, width or height

But if I use keylase/nvidia-patch, ffmpeg can transcode multiple streams.

I also tested on

  • Nvidia driver version: 460.106.00
  • GPU Model: RTX 3090
  • Docker image: nvidia/cuda:11.1-cudnn8-devel-ubuntu18.04
    But I still cannot transcode.

ABEND while trying to patch 470.103.1 drivers

Got nvlax-git from AUR, which includes the rollback to an older Zydis version, yet i'm clueless for this one

[bob@bob-old ~]$ nvlax_fbc -i /usr/lib/libnvidia-fbc.so.470.94 -o /usr/lib/libnvidia-fbc.so.470.94
[+] libnvidia-fbc.so
Assertion 'instr.mnemonic == ZYDIS_MNEMONIC_JNB' failed (ERROR)
  in file lax_fbc.cc, line 90
  function: int main(int, char**)
terminate called after throwing an instance of 'ppk::assert::AssertionException'
  what():  
Аварийный останов (стек памяти сброшен на диск)

Nvlax doesn't build even with Zydis patch

This occurs both when compiling from source with Zydis patch in #14 and installing any nvlax AUR package with any utility (pamac, yay, paru).

[ 95%] Building CXX object CMakeFiles/nvlax_encode.dir/src/lax_encode.cc.o
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_fbc.cc: In function ‘int main(int, char**)’:
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_fbc.cc:40:27: error: request for member ‘virtual_address’ in ‘s_rodata’, which is of pointer type ‘LIEF::ELF::Section*’ (maybe you meant to use ‘->’ ?)
   40 |         offset = s_rodata.virtual_address() + s_rodata.search("This hardware does not support NvFBC");
      |                           ^~~~~~~~~~~~~~~
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_fbc.cc:40:56: error: request for member ‘search’ in ‘s_rodata’, which is of pointer type ‘LIEF::ELF::Section*’ (maybe you meant to use ‘->’ ?)
   40 |         offset = s_rodata.virtual_address() + s_rodata.search("This hardware does not support NvFBC");
      |                                                        ^~~~~~
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_fbc.cc:52:38: error: request for member ‘content’ in ‘s_text’, which is of pointer type ‘LIEF::ELF::Section*’ (maybe you meant to use ‘->’ ?)
   52 |         auto v_text_content = s_text.content();
      |                                      ^~~~~~~
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_fbc.cc:61:38: error: request for member ‘virtual_address’ in ‘s_text’, which is of pointer type ‘LIEF::ELF::Section*’ (maybe you meant to use ‘->’ ?)
   61 |                 size_t temp = s_text.virtual_address() +
      |                                      ^~~~~~~~~~~~~~~
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_fbc.cc:67:37: error: request for member ‘virtual_address’ in ‘s_text’, which is of pointer type ‘LIEF::ELF::Section*’ (maybe you meant to use ‘->’ ?)
   67 |                     offset = s_text.virtual_address() + data - v_text_content.data();
      |                                     ^~~~~~~~~~~~~~~
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_encode.cc: In function ‘void patch_linux(LIEF::ELF::Binary*)’:
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_encode.cc:45:78: error: request for member ‘value’ in ‘f_nvenc_ci’, which is of pointer type ‘LIEF::Symbol*’ (maybe you meant to use ‘->’ ?)
   45 |         auto v_func_bytes = bin->get_content_from_virtual_address(f_nvenc_ci.value(), 0x260);
      |                                                                              ^~~~~
/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/src/lax_encode.cc:53:37: error: request for member ‘value’ in ‘f_nvenc_ci’, which is of pointer type ‘LIEF::Symbol*’ (maybe you meant to use ‘->’ ?)
   53 |                 offset = f_nvenc_ci.value() +
      |                                     ^~~~~
make[2]: *** [CMakeFiles/nvlax_fbc.dir/build.make:90: CMakeFiles/nvlax_fbc.dir/src/lax_fbc.cc.o] Error 1
make[2]: Leaving directory '/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/build'
make[1]: *** [CMakeFiles/Makefile2:219: CMakeFiles/nvlax_fbc.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/nvlax_encode.dir/build.make:90: CMakeFiles/nvlax_encode.dir/src/lax_encode.cc.o] Error 1
make[2]: Leaving directory '/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/build'
make[1]: *** [CMakeFiles/Makefile2:190: CMakeFiles/nvlax_encode.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/build'
make: *** [Makefile:136: all] Error 2
make: Leaving directory '/var/tmp/pamac-build-constbur/nvlax-git/src/nvlax/build'
==> ERROR: A failure occurred in build().
    Aborting...

Patch appears successful but has no affect (Windows / 496.49)

Looks like I spoke too soon, if I run more than 3 encodes via FFmpeg I get the [h264_nvenc @ 0000022742a41300] OpenEncodeSessionEx failed: out of memory (10): (no details) error.

Re-installed the driver restarted and patched again, still not working. This is the output when running the patch:

root@ASexyCapturer:~/nvlax/build# ./nvlax_encode -i /mnt/c/Windows/System32/nvEncodeAPI64.dll -o /mnt/c/Windows/System32/nvEncodeAPI64.dll
Unable to find the section associated with CERTIFICATE_TABLE
[+] nvEncodeAPI64.dll
[+] patched successfully
root@ASexyCapturer:~/nvlax/build# ./nvlax_encode -i /mnt/c/Windows/SysWOW64/nvEncodeAPI.dll -o /mnt/c/Windows/SysWOW64/nvEncodeAPI.dll
Unable to find the section associated with CERTIFICATE_TABLE
[+] nvEncodeAPI.dll
[+] patched successfully

Maybe something to do with patching in place?

PS: driver version is 496.49.

Originally posted by @ninbura in #5 (comment)

Thought I'd open a new issue as the issue explained in this message was not related to the original issue.

.so file?

Maybe I'm using this wrong, but the nvidia patch I saw your post in creates an SO file that can be used as an OBS plugin for shadowplay recording. does this utility do that? I dont see it anywhere when I make it.

Cannot perform NvFBC patch on 495.44

Built according to unstructions, ran the commands:
cp /usr/lib/libnvidia-fbc.so.495.44 .
./nvlax_fbc -i ./libnvidia-fbc.so.495.44 -o ./libnvidia-fbc.so.495.44

Got:

[+] libnvidia-fbc.so
Assertion 'found' failed (ERROR)
  in file lax_fbc.cc, line 77
  function: int main(int, char**)
terminate called after throwing an instance of 'ppk::assert::AssertionException'
  what():  
[1]    24138 IOT instruction (core dumped)  ./nvlax_fbc -i /usr/lib/libnvidia-fbc.so.495.44 -o

Errors while building

Im on Linux mint 20.3

heres the error

/home/gavin/nvlax/src/lax_encode.cc: In function ‘void patch_linux(LIEF::ELF::Binary*)’:
/home/gavin/nvlax/src/lax_encode.cc:45:78: error: request for member ‘value’ in ‘f_nvenc_ci’, which is of pointer type ‘LIEF::Symbol*’ (maybe you meant to use ‘->’ ?)
45 | _func_bytes = bin->get_content_from_virtual_address(f_nvenc_ci.value(), 0x260);
| ^~~~~

In file included from /home/gavin/nvlax/build/_deps/zydis-src/include/Zydis/Status.h:35,
from /home/gavin/nvlax/build/_deps/zydis-src/include/Zydis/Decoder.h:38,
from /home/gavin/nvlax/build/deps/zydis-src/include/Zydis/Zydis.h:39,
from /home/gavin/nvlax/src/lax_encode.cc:17:
/home/gavin/nvlax/src/lax_encode.cc:51:29: error: ‘ZydisDecoderDecodeBuffer’ was not declared in this scope; did you mean ‘ZydisDecoderDecodeFull’?
51 | while (ZYAN_SUCCESS(ZydisDecoderDecodeBuffer(&decoder, data, length, &instr))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/gavin/nvlax/build/deps/zydis-src/dependencies/zycore/include/Zycore/Status.h:82:9: note: in definition of macro ‘ZYAN_SUCCESS’
82 | (!((status) & 0x80000000u))
| ^~~~~~
/home/gavin/nvlax/src/lax_encode.cc:53:37: error: request for member ‘value’ in ‘f_nvenc_ci’, which is of pointer type ‘LIEF::Symbol*’ (maybe you meant to use ‘->’ ?)
53 | offset = f_nvenc_ci.value() +
| ^~~~~
/home/gavin/nvlax/src/lax_encode.cc:55:32: error: ‘ZydisDecodedInstruction’ {aka ‘struct ZydisDecodedInstruction
’} has no member named ‘operands’
55 | instr.operands[1].mem.disp.value;
| ^~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:59:63: error: ‘ZydisDecodedInstruction’ {aka ‘struct ZydisDecodedInstruction
’} has no member named ‘operands’
59 | if (instr.mnemonic == ZYDIS_MNEMONIC_MOV && instr.operands[0].mem.disp.value / 8 == 30) {
| ^~~~~~~~

In file included from /home/gavin/nvlax/build/_deps/zydis-src/include/Zydis/Status.h:35,
from /home/gavin/nvlax/build/deps/zydis-src/include/Zydis/Decoder.h:38,
from /home/gavin/nvlax/build/deps/zydis-src/include/Zydis/Zydis.h:39,
from /home/gavin/nvlax/src/lax_encode.cc:17:
/home/gavin/nvlax/src/lax_encode.cc:82:29: error: ‘ZydisDecoderDecodeBuffer’ was not declared in this scope; did you mean ‘ZydisDecoderDecodeFull’?
82 | while (ZYAN_SUCCESS(ZydisDecoderDecodeBuffer(&decoder, data, length, &instr))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:82:16: note: in expansion of macro ‘ZYAN_SUCCESS’
82 | while (ZYAN_SUCCESS(ZydisDecoderDecodeBuffer(&decoder, data, length, &instr))) {
| ^~~~~~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:84:23: error: ‘ZydisDecodedInstruction’ {aka ‘struct ZydisDecodedInstruction
’} has no member named ‘operands’
84 | instr.operands[0].reg.value == ZYDIS_REGISTER_EAX &&
| ^~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:85:23: error: ‘ZydisDecodedInstruction’ {aka ‘struct ZydisDecodedInstruction
’} has no member named ‘operands’
85 | instr.operands[1].reg.value == ZYDIS_REGISTER_EAX &&
| ^~~~~~~~
In file included from /home/gavin/nvlax/src/lax_encode.cc:19:
/home/gavin/nvlax/src/lax_encode.cc: In lambda function:
/home/gavin/nvlax/src/lax_encode.cc:145:39: error: ‘ZydisDecoderDecodeBuffer’ was not declared in this scope; did you mean ‘ZydisDecoderDecodeFull’?
145 | PPK_ASSERT_ERROR(ZYAN_SUCCESS(ZydisDecoderDecodeBuffer(&decoder,
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/gavin/nvlax/build/_deps/ppk_assert-src/src/ppk_assert.h:127:56: note: in definition of macro ‘PPK_ASSERT_LIKELY’
127 | #define PPK_ASSERT_LIKELY(arg) _builtin_expect(!!(arg), !0)
| ^~~
/home/gavin/nvlax/build/deps/ppk_assert-src/src/ppk_assert.h:605:50: note: in expansion of macro ‘PPK_ASSERT_3’
605 | #define PPK_ASSERT_2(level, expression, ...) PPK_ASSERT_3(level, expression, VA_ARGS)
| ^~~~~~~~~~~~
/home/gavin/nvlax/build/deps/ppk_assert-src/src/ppk_assert.h:169:44: note: in expansion of macro ‘PPK_ASSERT_2’
169 | #define PPK_ASSERT_1(level, expression) PPK_ASSERT_2(level, expression, PPK_ASSERT_NULLPTR)
| ^~~~~~~~~~~~
/home/gavin/nvlax/build/deps/ppk_assert-src/src/ppk_assert.h:87:39: note: in expansion of macro ‘PPK_ASSERT_1’
87 | #define PPK_ASSERT_JOIN
(lhs, rhs) lhs##rhs
| ^~~
/home/gavin/nvlax/build/deps/ppk_assert-src/src/ppk_assert.h:73:46: note: in expansion of macro ‘PPK_ASSERT
73 | #define PPK_ASSERT_ERROR(...) PPK_ASSERT
(ppk::assert::implementation::AssertLevel::Error, VA_ARGS)
| ^~~~~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:145:9: note: in expansion of macro ‘PPK_ASSERT_ERROR’
145 | PPK_ASSERT_ERROR(ZYAN_SUCCESS(ZydisDecoderDecodeBuffer(&decoder,
| ^~~~~~~~~~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:145:26: note: in expansion of macro ‘ZYAN_SUCCESS’
145 | PPK_ASSERT_ERROR(ZYAN_SUCCESS(ZydisDecoderDecodeBuffer(&decoder,
| ^~~~~~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:154:71: error: ‘ZydisDecodedInstruction’ {aka ‘struct ZydisDecodedInstruction
’} has no member named ‘operands’
154 | &instr.operands[0],
| ^~~~~~~~

/home/gavin/nvlax/build/_deps/ppk_assert-src/src/ppk_assert.h:127:56: note: in definition of macro ‘PPK_ASSERT_LIKELY’
127 | #define PPK_ASSERT_LIKELY(arg) __builtin_expect(!!(arg), !0)
| ^~~
/home/gavin/nvlax/build/deps/ppk_assert-src/src/ppk_assert.h:605:50: note: in expansion of macro ‘PPK_ASSERT_3’
605 | #define PPK_ASSERT_2(level, expression, ...) PPK_ASSERT_3(level, expression, VA_ARGS)
| ^~~~~~~~~~~~
/home/gavin/nvlax/build/deps/ppk_assert-src/src/ppk_assert.h:169:44: note: in expansion of macro ‘PPK_ASSERT_2’
169 | #define PPK_ASSERT_1(level, expression) PPK_ASSERT_2(level, expression, PPK_ASSERT_NULLPTR)
| ^~~~~~~~~~~~
/home/gavin/nvlax/build/deps/ppk_assert-src/src/ppk_assert.h:87:39: note: in expansion of macro ‘PPK_ASSERT_1’
87 | #define PPK_ASSERT_JOIN
(lhs, rhs) lhs##rhs
| ^~~
/home/gavin/nvlax/build/deps/ppk_assert-src/src/ppk_assert.h:73:46: note: in expansion of macro ‘PPK_ASSERT
73 | #define PPK_ASSERT_ERROR(...) PPK_ASSERT
(ppk::assert::implementation::AssertLevel::Error, VA_ARGS)
| ^~~~~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:153:9: note: in expansion of macro ‘PPK_ASSERT_ERROR’
153 | PPK_ASSERT_ERROR(ZYAN_SUCCESS(ZydisCalcAbsoluteAddress(&instr,
| ^~~~~~~~~~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:153:26: note: in expansion of macro ‘ZYAN_SUCCESS’
153 | PPK_ASSERT_ERROR(ZYAN_SUCCESS(ZydisCalcAbsoluteAddress(&instr,
| ^~~~~~~~~~~~
In file included from /home/gavin/nvlax/build/_deps/zydis-src/include/Zydis/Status.h:35,
from /home/gavin/nvlax/build/deps/zydis-src/include/Zydis/Decoder.h:38,
from /home/gavin/nvlax/build/deps/zydis-src/include/Zydis/Zydis.h:39,
from /home/gavin/nvlax/src/lax_encode.cc:17:
/home/gavin/nvlax/src/lax_encode.cc: In function ‘void patch_windows(LIEF::PE::Binary*)’:
/home/gavin/nvlax/src/lax_encode.cc:183:33: error: ‘ZydisDecoderDecodeBuffer’ was not declared in this scope; did you mean ‘ZydisDecoderDecodeFull’?
183 | while (ZYAN_SUCCESS(ZydisDecoderDecodeBuffer(&decoder, data, length, &instr))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/gavin/nvlax/build/deps/zydis-src/dependencies/zycore/include/Zycore/Status.h:82:9: note: in definition of macro ‘ZYAN_SUCCESS’
82 | (!((status) & 0x80000000u))
| ^~~~~~
/home/gavin/nvlax/src/lax_encode.cc:185:27: error: ‘ZydisDecodedInstruction’ {aka ‘struct ZydisDecodedInstruction
’} has no member named ‘operands’
185 | instr.operands[1].type == ZYDIS_OPERAND_TYPE_MEMORY)
| ^~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:189:34: error: ‘ZydisDecodedInstruction’ {aka ‘struct ZydisDecodedInstruction
’} has no member named ‘operands’
189 | instr.operands[1].mem.disp.value;
| ^~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:194:27: error: ‘ZydisDecodedInstruction’ {aka ‘struct ZydisDecodedInstruction
’} has no member named ‘operands’
194 | instr.operands[0].mem.disp.value / 8 == 30)
| ^~~~~~~~
In file included from /home/gavin/nvlax/build/_deps/zydis-src/include/Zydis/Status.h:35,
from /home/gavin/nvlax/build/deps/zydis-src/include/Zydis/Decoder.h:38,
from /home/gavin/nvlax/build/deps/zydis-src/include/Zydis/Zydis.h:39,
from /home/gavin/nvlax/src/lax_encode.cc:17:
/home/gavin/nvlax/src/lax_encode.cc:206:33: error: ‘ZydisDecoderDecodeBuffer’ was not declared in this scope; did you mean ‘ZydisDecoderDecodeFull’?
206 | while (ZYAN_SUCCESS(ZydisDecoderDecodeBuffer(&decoder, data, length, &instr))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/gavin/nvlax/build/deps/zydis-src/dependencies/zycore/include/Zycore/Status.h:82:9: note: in definition of macro ‘ZYAN_SUCCESS’
82 | (!((status) & 0x80000000u))
| ^~~~~~
/home/gavin/nvlax/src/lax_encode.cc:209:27: error: ‘ZydisDecodedInstruction’ {aka ‘struct ZydisDecodedInstruction
’} has no member named ‘operands’
209 | instr.operands[0].mem.base == ZYDIS_REGISTER_ESI &&
| ^~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:210:27: error: ‘ZydisDecodedInstruction’ {aka ‘struct ZydisDecodedInstruction
’} has no member named ‘operands’
210 | instr.operands[0].mem.disp.value / 4 == 31)
| ^~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:213:68: error: ‘ZydisDecodedInstruction’ {aka ‘struct ZydisDecodedInstruction
’} has no member named ‘operands’
213 | offset = follow_thunk(bin->rva_to_offset(instr.operands[1].imm.value.u));
| ^~~~~~~~

In file included from /home/gavin/nvlax/build/_deps/zydis-src/include/Zydis/Status.h:35,
from /home/gavin/nvlax/build/_deps/zydis-src/include/Zydis/Decoder.h:38,
from /home/gavin/nvlax/build/deps/zydis-src/include/Zydis/Zydis.h:39,
from /home/gavin/nvlax/src/lax_encode.cc:17:
/home/gavin/nvlax/src/lax_encode.cc:234:29: error: ‘ZydisDecoderDecodeBuffer’ was not declared in this scope; did you mean ‘ZydisDecoderDecodeFull’?
234 | while (ZYAN_SUCCESS(ZydisDecoderDecodeBuffer(&decoder, data, length, &instr))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/gavin/nvlax/build/deps/zydis-src/dependencies/zycore/include/Zycore/Status.h:82:9: note: in definition of macro ‘ZYAN_SUCCESS’
82 | (!((status) & 0x80000000u))
| ^~~~~~
/home/gavin/nvlax/src/lax_encode.cc:236:23: error: ‘ZydisDecodedInstruction’ {aka ‘struct ZydisDecodedInstruction
’} has no member named ‘operands’
236 | instr.operands[0].reg.value == ZYDIS_REGISTER_EAX &&
| ^~~~~~~~
/home/gavin/nvlax/src/lax_encode.cc:237:23: error: ‘ZydisDecodedInstruction’ {aka ‘struct ZydisDecodedInstruction
’} has no member named ‘operands’
237 | instr.operands[1].reg.value == ZYDIS_REGISTER_EAX &&
| ^~~~~~~~
make[2]: *** [CMakeFiles/nvlax_encode.dir/build.make:95: CMakeFiles/nvlax_encode.dir/src/lax_encode.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:170: CMakeFiles/nvlax_encode.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

Bypassing other limitations

Not sure how else to contact you, may not be the right place to ask this but it feels related.

NVENC isn't the only artificial limitation imposed on consumer end NVIDIA GPUs, another one I'm running into is a cap on the amount of unique displays you can have connected to a single GPU. NVIDIA has put that cap at 4, which even applies when using MST DisplayPort splitters or daisy chaining. Seems fairly similar to the NVENC cap as the same limitation is not imposed on Quadro GPUs of the same architecture.

I'm wondering if a patch can be similarly created to bypass this limitation.

Add patch to fix NvFBC not requesting proper Vulkan API version

Hello,

There is an issue with NvFBC: it's using the Vulkan API without requesting the proper API version. It didn't cause any harm until Vulkan was updated to version 1.3.204 which introduced a regression that made this improper use of its API starting to cause errors.

A patch for NvFBC was proposed to correct the API misuse, here's a link to the Vulkan-Loader issue with all the details (including the patch): KhronosGroup/Vulkan-Loader#894 (comment)

Could this patch be added to nvlax?

Regards,
Jules

Patching WSL2-imported .so

Hi!
Since I have system's DLL patched correctly (your patcher doesn't seem to pick up even 472.12, that's last patched driver by keylase/nvidia-patch), and from Windows itself invoking ffmpeg w/ nvenc accel doesn't result in session limiting, yet I still see session limiter in WSL itself:
image
I tried your patcher on /usr/lib/wsl/lib/libnvidia-encode.so.1 that's imported from host's %windir%\System32\DriverStore\FileRepository\nvmdi*\libnvidia-encode.so.1, and to my surprise, it seems as though this .so doesn't use libnvcuvid.so:
image

I looked at other issues in the repository, and it seems like providing .so would be helpful, so here it is:
libnvidia-encode.so.1.zip

Error running nvlax_encode

➜ ./nvlax_encode -i /usr/lib/libnvidia-encode.so.495.44 -o /usr/lib/libnvidia-encode.so.495.44
[+] libnvidia-encode.so
Assertion 'found' failed (ERROR)
  in file lax_encode.cc, line 98
  function: void patch_linux(LIEF::ELF::Binary*)
terminate called after throwing an instance of 'ppk::assert::AssertionException'
  what():  
[1]    11117 abort (core dumped)  ./nvlax_encode -i /usr/lib/libnvidia-encode.so.495.44 -o

Followed the build instructions from the readme. Not sure what wrong.

Nvlax can no longer be built because Zydis has made breaking changes

Zydis as introduces breaking changes that prevent nvlax from being compiled.

For the time being, you could use CPMAddPackage("gh:zyantific/zydis#55dd08c210722aed81b38132f5fd4a04ec1943b5") or CPMAddPackage("gh:zyantific/zydis#v3.2.1") with some regression changes needed, rather than CPMAddPackage("gh:zyantific/zydis#master") or make the needed changes to nvlax.

nvidia driver 5xx.x compatibility

Anyone confirmed that this patch is still working on newer drivers and/or causing issues or crashes?

~ > nvidia-smi
Wed Jun  7 05:00:03 2023       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 530.41.03              Driver Version: 530.41.03    CUDA Version: 12.1 

Can't compile on Ubuntu 21.10

Even having installed liblief-dev, it refuses to compile properly:

gitstore/nvlax/src/lax_encode.cc:45:78: error: ‘class LIEF::Symbol’ has no member named ‘value’
   45 |         auto v_func_bytes = bin->get_content_from_virtual_address(f_nvenc_ci.value(), 0x260);
      |                                                                              ^~~~~
gitstore/nvlax/src/lax_encode.cc:53:37: error: ‘class LIEF::Symbol’ has no member named ‘value’
   53 |                 offset = f_nvenc_ci.value() +
      |```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.