You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Fedora 38系统下VS Code启动崩溃的解决方法

VS Code启动崩溃问题(DNF更新后)

几次DNF更新后,VS Code启动时出现崩溃现象,执行code --verbose命令得到如下日志:

$ code --verbose
[2270098:0920/003958.296920:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
[main 2023-09-20T07:39:58.374Z] [File Watcher (node.js)] Request to start watching: /home/mike/.config/Code/User (excludes: <none>, includes: <all>),/home/mike/.config/Code/User/settings.json (excludes: <none>, includes: <all>)
[main 2023-09-20T07:39:58.384Z] Sending env to running instance...
[main 2023-09-20T07:39:58.384Z] [File Watcher (node.js)] Started watching: '/home/mike/.config/Code/User'
[main 2023-09-20T07:39:58.385Z] [File Watcher (node.js)] Started watching: '/home/mike/.config/Code/User/settings.json'
[2270137:0920/003958.432675:WARNING:sandbox_linux.cc(380)] InitializeSandbox() called with multiple threads in process gpu-process.
[2270137:0920/003958.442280:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[2270137:0920/003958.442489:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
...
[2270137:0920/003958.447300:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[main 2023-09-20T07:39:59.374Z] Sent env to running instance. Terminating...
[main 2023-09-20T07:39:59.375Z] Lifecycle#kill()
[main 2023-09-20T07:39:59.375Z] Lifecycle#onWillShutdown.fire()

该软件一周前还可在本地及通过SSH远程正常运行,目前未发现权限问题,寻求解决启动崩溃的方法。

解决方法

  • 禁用GPU加速启动
    日志中gbm_wrapper.cc的错误指向GPU渲染冲突,先尝试禁用GPU启动:

    code --disable-gpu
    

    若能正常启动,进入VS Code设置,搜索GPU,将Terminal > Integrated: Gpu Acceleration和Window: Enable GPU Acceleration设为off,重启后生效。

  • 重置用户配置
    DNF更新可能引发配置兼容性问题,重置配置步骤:

    1. 关闭所有VS Code进程
    2. 备份原配置(可选):
      mv ~/.config/Code/User ~/.config/Code/User_backup
      
    3. 重新启动VS Code,会生成默认配置,检查是否恢复正常。
  • 重新安装VS Code
    配置重置无效时,彻底重装:

    sudo dnf remove code
    rm -rf ~/.config/Code ~/.vscode  # 清理残留配置
    sudo dnf install code
    
  • 更新图形依赖库
    系统图形库版本不兼容可能导致崩溃,更新相关库:

    sudo dnf update mesa-libgbm mesa-dri-drivers
    

    更新完成后重启系统,再尝试启动VS Code。

  • 清理残留进程
    日志显示有运行中的实例残留,先清理进程:

    pkill -f code
    

    之后重新启动VS Code。

内容的提问来源于stack exchange,提问作者DarkSky

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.10 19:01:24