Skip to content

Commit

Permalink
#1260: require a recent driver version so we can be sure that we'll d…
Browse files Browse the repository at this point in the history
…etect the correct card model and blacklist it if necessary

git-svn-id: https://xpra.org/svn/Xpra/trunk@14473 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Nov 23, 2016
1 parent 98eaccb commit 61df2f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/xpra/codecs/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def codec_import_check(name, description, top_module, class_module, *classnames)
selftest(FULL_SELFTEST)
except Exception as e:
log.warn("Warning: %s failed its self test", name)
log.warn(" %s", e)
for x in str(e).splitlines():
log.warn(" %s", x)
log("%s failed", selftest, exc_info=True)
continue
finally:
Expand Down
6 changes: 5 additions & 1 deletion src/xpra/codecs/nvenc7/encoder.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2678,7 +2678,11 @@ def cleanup_module():
reset_state()

def selftest(full=False):
get_nvidia_module_version(True)
v = get_nvidia_module_version(True)
if v and v<[375, 10]:
NVENC_UNSUPPORTED_DRIVER_VERSION = envbool("XPRA_NVENC_UNSUPPORTED_DRIVER_VERSION", False)
if not NVENC_UNSUPPORTED_DRIVER_VERSION:
raise ImportError("unsupported NVidia driver version %s\nuse XPRA_NVENC_UNSUPPORTED_DRIVER_VERSION=1 to force enable it" % pver(v))
#this is expensive, so don't run it unless "full" is set:
if full:
from xpra.codecs.codec_checks import get_encoder_max_sizes
Expand Down

0 comments on commit 61df2f4

Please sign in to comment.