xpra icon
Bug tracker and wiki

Opened 3 weeks ago

Closed 12 days ago

#2489 closed defect (fixed)

nvenc: no compatible devices found when compatible devices present

Reported by: mjlbach Owned by: mjlbach
Priority: major Milestone: 4.0
Component: server Version: 4.0.x
Keywords: Cc:

Description

Xpra 4.0-r24434 fails to find available devices for nvenc that are detected under 3.0.2.

Attachments (4)

_4.log.txt (14.6 KB) - added by mjlbach 3 weeks ago.
:4.log
loader.py.log.txt (1.3 KB) - added by mjlbach 3 weeks ago.
loader.py output
nv_util.py.log.txt (196 bytes) - added by mjlbach 3 weeks ago.
nv_util.py.log
video_helper.py.log.txt (5.7 KB) - added by mjlbach 3 weeks ago.
video_helper.py log

Download all attachments as: .zip

Change History (8)

Changed 3 weeks ago by mjlbach

Attachment: _4.log.txt added

:4.log

Changed 3 weeks ago by mjlbach

Attachment: loader.py.log.txt added

loader.py output

Changed 3 weeks ago by mjlbach

Attachment: nv_util.py.log.txt added

nv_util.py.log

Changed 3 weeks ago by mjlbach

Attachment: video_helper.py.log.txt added

video_helper.py log

comment:1 Changed 3 weeks ago by mjlbach

Component: androidserver

comment:2 Changed 3 weeks ago by Antoine Martin

Status: newassigned

Very likely to have been caused by #2416.

comment:3 Changed 12 days ago by Antoine Martin

Owner: changed from Antoine Martin to mjlbach
Status: assignednew

Summary from the logs:

  • the nvenc codec is installed and loads OK: nvenc/encoder.cpython-36m-x86_64-linux-gnu.so
  • we find libcuda and libnvidia-encode:
    NVENC encoder API version 8.1
    init_nvencode_library() will try to load libcuda.so
    init_nvencode_library() <bound method LibraryLoader.LoadLibrary of <ctypes.LibraryLoader object at 0x7f19dc3d0c18>>(libcuda.so)=<CDLL 'libcuda.so', handle 7f198c2620b0 at 0x7f199274cdd8>
    init_nvencode_library() libcuda.cuCtxGetCurrent=<_FuncPtr object at 0x7f195328ea70>
    init_nvencode_library() will try to load libnvidia-encode.so.1
    init_nvencode_library() <bound method LibraryLoader.LoadLibrary of <ctypes.LibraryLoader object at 0x7f19dc3d0c18>>(libnvidia-encode.so.1)=<CDLL 'libnvidia-encode.so.1', handle 7f198c2a0f90 at 0x7f19900cff98>
    init_nvencode_library() NvEncodeAPICreateInstance=<_FuncPtr object at 0x7f195328eb38>
    

But no devices:

CUDA initialization (this may take a few seconds)
nvenc: no compatible devices found
NVidia driver version 430.50

Fixes:

  • r24521 allow the 'load-balancing' config option to be loaded from the cuda.conf file(s)
  • r24522 actual fix: missing variable and missing initialization flag

With these changes, my card does show up as it should:

$ python3 ./xpra/codecs/cuda_common/cuda_context.py 
CUDA initialization (this may take a few seconds)
CUDA 10.0.0 / PyCUDA 2019.1.2, found 1 device:
  + GeForce GTX 1070 @ 0000:01:00.0 (memory: 85% free, compute: 6.1)
pycuda_info
* version                         : 2019.1.2
  - text                          : 2019.1.2
cuda_info
* driver
  - driver_version                : 10020
  - version                       : 10.0.0
preferences:
* disabled-devices                : none
* enabled-devices                 : all
* load-balancing                  : memory
device automatically selected:
 GeForce GTX 1070 @ 0000:01:00.0

@mjlbach: there are updated beta builds with these fixes, please close if those work for you.

comment:4 Changed 12 days ago by mjlbach

Resolution: fixed
Status: newclosed

Resolved! Tested on Fedora 31 and Ubuntu 18.04

Note: See TracTickets for help on using tickets.