WARNING: lavapipe is not a conformant vulkan implementation, testing use only.【已解决】

ubuntu系统
某天照常打开carla突然出现如下警告,并且carla黑屏:

WARNING: lavapipe is not a conformant vulkan implementation, testing use only.

1.经过警告提示,误以为是vulkan库的问题,所以安装了vulkan库,但是依旧报如上警告并黑屏

sudo apt install libvulkan-dev vulkan-tools

2.问了gpt之后,建议重装nvidia驱动,这个时候想起来用nvidia-smi命令查看nvidia驱动状态,得到如下报错:

Failed to initialize NVML: Driver/library version mismatch
NVML library version: 535.146

意思是NVIDIA 管理库 (NVML) 的版本与当前安装的 NVIDIA 显卡驱动程序的版本不匹配,看了一下NVIDIA管理库的更新日志,即/var/log/apt/history.log文件,得到如下信息

Start-Date: 2024-01-16  17:56:57
Commandline: /usr/bin/unattended-upgrade
Upgrade: libnvidia-extra-535:amd64 (535.129.03-0ubuntu0.20.04.1, 535.146.02-0ubuntu0.20.04.1)
End-Date: 2024-01-16  17:56:57 

libnvidia被自动更新到535.146.02版本,与当前显卡版本不匹配,于是我在’软件和更新’的’更新’选项中关闭了自动更新,并将显卡重装,升级到了535.146.02版本。
在使用nvidia-smi命令正确得到显卡信息之后,运行carla还是得到:

WARNING: lavapipe is not a conformant vulkan implementation, testing use only.

尝试强制carla使用独显,还是不行

./CarlaUE4.sh -prefernvidia -quality-level=Low

3.在网上搜索该警告信息,尝试nvidia论坛上的解决方案
将/etc/vulkan/icd.d/nvidia_icd.json中的内容拷贝到/usr/share/vulkan/icd.d文件中,依旧无效
{
“file_format_version” : “1.0.0”,
“ICD”: {
“library_path”: “libGLX_nvidia.so.0”,
“api_version” : “1.3.205” #这里可能不一样
}
}
在以上nvidia论坛问题中看到如下信息:
在这里插入图片描述
如果你没有特定的内核要求,显卡只是用来玩游戏的,可以尝试这个方案,将内核升级,但是一般情况下不要轻易将内核升级或降级,可能会导致很多已安装配置好的软件无法使用

4.走投无路时决定把nvidia显卡驱动以及cuda,cudnn全部卸载重装,恢复最初版本

nvidia历史版本搜索:https://www.nvidia.cn/Download/Find.aspx?lang=cn
在这里插入图片描述
选择WHQL版本的安装

卸载nvidia驱动(runfile安装版本)

sudo /usr/bin/nvidia-uninstall

过程中提示:

 If you plan to no longer use the NVIDIA driver, you should make sure that no 
  X screens are configured to use the NVIDIA X driver in your X configuration  
  file. If you used nvidia-xconfig to configure X, it may have created a       
  backup of your original configuration. Would you like to run `nvidia-xconfig --restore-original-backup` to attempt restoration of the original X          
  configuration file?

在命令行执行

nvidia-xconfig  --restore-original-backup

xorg.conf文件被删除

完成后再次打开carla,发现可以正常运行

./CarlaUE4.sh -prefernvidia -quality-level=Low

5.安装系统内核和gcc时请注意与cuda版本的适配关系:在网页https://developer.nvidia.com/cuda-toolkit-archive对应版本的documentation中Installation Guide Linux查看依赖关系,以ubuntu20.04系统cuda11.6为例
在这里插入图片描述
安装完ubuntu系统后一定要及时关闭自动更新!以免出现依赖不匹配的问题!
关于cuda版本的选择,参看本人另外一篇博文环境配置踩坑记录(ubuntu系统)

  • 6
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
JSON++ Build Status Introduction JSON++ is a light-weight JSON parser, writer and reader written in C++. JSON++ can also convert JSON documents into lossless XML documents. Contributors http://github.com/hjiang http://github.com/elanthis http://github.com/r-lyeh If you've made substantial contribution, please add your link here. Why another JSON parser? Perhaps because web service clients are usually written in dynamic languages these days, none of the existing C++ JSON parsers fitted my needs very well, so I wrote one that I used in another project. My goals for JSON++ were: Efficient in both memory and speed. No third party dependencies. JSON++ only depends on the standard C++ library. Cross platform. Robust. Small and convenient API. Most of the time, you only need to call one function and two function templates. Easy to integrate. JSON++ only has one source file and one header file. Just compile the source file and link with your program. Able to construct documents dynamically. JSON writer: write documents in JSON format. Other contributors have sinced added more functionalities: XML writer: convert documents to JSONx format. See http://goo.gl/I3cxs for details. XML writer: convert documents to JXML format. See https://github.com/r-lyeh/JXML for details. XML writer: convert documents to JXMLex format. See https://github.com/r-lyeh/JXMLex for details. XML writer: convert documents to tagged XML format. See https://github.com/hjiang/jsonxx/issues/12 for details. Compiler version You need a modern C++ compiler. For older compilers, please try legacy branch. Configuration Strict/permissive parsing JSONxx can parse JSON documents both in strict or permissive mode. When jsonxx::Settings::Parser is set to Strict, JSONxx parser will accept: Fully conformant JSON documents only. When jsonxx::Settings::Parser is set to Permissive, JSONxx parser will accept: Fully conformant JSON documents Ending commas in arrays and objects: { "array": [0,1,2,], } Single quoted strings: ['hello', "world"] C++ style comments: { "width": 320, "height": 240 } //Picture details Default value is Permissive. When jsonxx::Settings::UnquotedKeys is set to Enabled, JSONxx parser will accept: Unquoted keys: {name: "world"} Default value is Disabled. Assertions JSONxx uses internally JSONXX_ASSERT(...) macro that works both in debug and release mode. Set jsonxx::Settings::Assertions value to Disabled to disable assertions. Default value is Enabled. Usage The following snippets are from one of the unit tests. They are quite self-descriptive. using namespace std; using namespace jsonxx; string teststr( "{" " \"foo\" : 1," " \"bar\" : false," " \"person\" : {\"name\" : \"GWB\", \"age\" : 60,}," " \"data\": [\"abcd\", 42]," "}" ); // Parse string or stream Object o; assert(o.parse(teststr)); // Validation. Checking for JSON types and values as well assert(1 == o.get<Number>("foo")); assert(o.has<Boolean>("bar")); assert(o.has<Object>("person")); assert(o.get<Object>("person").has<Number>("age")); assert(!o.get<Object>("person").has<Boolean>("old")); assert(o.get<Object>("person").get<Boolean>("old", false)); assert(o.has<Array>("data")); assert(o.get<Array>("data").get<Number>(1) == 42); assert(o.get<Array>("data").get<String>(0) == "abcd"); assert(o.get<Array>("data").get<String>(2, "hello") == "hello"); assert(!o.has<Number>("data")); cout << o.json() << endl; // JSON output cout << o.xml(JSONx) << endl; // JSON to XML conversion (JSONx subtype) cout << o.xml(JXML) << endl; // JSON to XML conversion (JXML subtype) cout << o.xml(JXMLex) << endl; // JSON to XML conversion (JXMLex subtype) // Generate JSON document dynamically using namespace std; using namespace jsonxx; Array a; a << 123; a << "hello world"; a << 3.1415; a << 99.95f; a << 'h'; a << Object("key", "value"); Object o; o << "key1" << "value"; o << "key2" << 123; o << "key3" << a; cout << o.json() << endl; To do Custom JSON comments (C style /**/) when permissive parsing is enabled.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值