microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.11k stars 29.27k forks source link

Blank screen after update to version 1.49.0 on Fedora 32 #106691

Closed xurzua closed 4 years ago

xurzua commented 4 years ago

Steps to Reproduce:

  1. Open VSCode.
  2. That's it.

Does this issue occur when all extensions are disabled?: Yes

After updating to the latest version of VSCode on Linux (using the official Microsoft repo) the program opens but just a blank screen.

I've enabled the logs to see more about it:

[99350:0914/164223.917228:ERROR:gl_context_glx.cc(187)] Failed to create GL context with glXCreateNewContext.
[99350:0914/164223.917374:ERROR:gpu_info_collector.cc(76)] gl::init::CreateGLContext failed
[99350:0914/164223.917461:ERROR:gpu_info_collector.cc(208)] Could not create context for info collection.
[99350:0914/164223.917562:ERROR:gpu_init.cc(70)] gpu::CollectGraphicsInfo failed.
[99378:0914/164223.923325:ERROR:appcenter_api.cc(52)] expecting appcenter url prefix
[99350:0914/164223.958157:WARNING:x11_util.cc(1520)] X error received: serial 202, error_code 156 (GLXBadContext), request_code 150, minor_code 6 (X_GLXIsDirect)
[99350:0914/164223.958603:WARNING:x11_util.cc(1520)] X error received: serial 201, error_code 2 (BadValue (integer parameter out of range for operation)), request_code 150, minor_code 24 (X_GLXCreateNewContext)
[99350:0914/164223.958718:ERROR:viz_main_impl.cc(152)] Exiting GPU process due to errors during initialization

image

Full log here: https://gist.github.com/xurzua/aee4c1c1f06cc72c7ce34a3fa4797935

deepak1556 commented 4 years ago

Are you running on a remote X server ? Can you try launching with --no-xshm

xurzua commented 4 years ago

Hi @deepak1556 , thank you for your response.

Are you running on a remote X server ? Can you try launching with --no-xshm

Yep, I'm running VSCode inside a Fedora Container using Toolbox.

After using the argument it worked! awesome!!

image

Still some GPU related errors appear in the log, but the application works at least.

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[27070:0916/132429.768255:ERROR:gl_context_glx.cc(187)] Failed to create GL context with glXCreateNewContext.
[27070:0916/132429.768444:ERROR:gpu_info_collector.cc(76)] gl::init::CreateGLContext failed
[27070:0916/132429.768552:ERROR:gpu_info_collector.cc(208)] Could not create context for info collection.
[27070:0916/132429.768672:ERROR:gpu_init.cc(70)] gpu::CollectGraphicsInfo failed.
[main 2020-09-16T16:24:29.771Z] [storage state.vscdb] open(/var/home/xurzua/.config/Code/User/globalStorage/state.vscdb, retryOnBusy: true)
[main 2020-09-16T16:24:29.771Z] lifecycle (main): phase changed (value: 2)
[27070:0916/132429.772210:WARNING:x11_util.cc(1520)] X error received: serial 202, error_code 156 (GLXBadContext), request_code 150, minor_code 6 (X_GLXIsDirect)
[27070:0916/132429.772851:WARNING:x11_util.cc(1520)] X error received: serial 201, error_code 2 (BadValue (integer parameter out of range for operation)), request_code 150, minor_code 24 (X_GLXCreateNewContext)
[27070:0916/132429.773004:ERROR:viz_main_impl.cc(152)] Exiting GPU process due to errors during initialization

What does the --no-xshm argument do ? Also, I dunno if this is useful or not but this is the application launcher file and mesa drivers version:

code.desktop

[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=toolbox run --container develop code --no-sandbox --unity-launch %F
Icon=/var/home/xurzua/.local/share/applications/code.svg
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=Development;
MimeType=text/plain;inode/directory;
Actions=new-empty-window;
Keywords=vscode;

[Desktop Action new-empty-window]
Name=New Empty Window
Exec=toolbox run --container develop code --no-sandbox --new-window %F
Icon=/var/home/xurzua/.local/share/applications/code.svg

mesa-dri-drivers

Name         : mesa-dri-drivers
Version      : 20.1.7
Release      : 1.fc32
Architecture : x86_64
Size         : 70 M
Source       : mesa-20.1.7-1.fc32.src.rpm
Repository   : @System
From repo    : updates
Summary      : Mesa-based DRI drivers
URL          : http://www.mesa3d.org
License      : MIT
Description  : Mesa-based DRI drivers.

I've attached a new log file here btw: https://gist.github.com/xurzua/4be32a050524112ce495fa0477111ab6

deepak1556 commented 4 years ago

Thanks for testing, you can read more about why this is an issue for the remote scenario here https://github.com/microsoft/vscode/issues/101069#issuecomment-662150152 . Merging this to the other issue.

costela commented 4 years ago

Just for the record, because it took me a while to find this issue: it can happen if your running inside flatpak as well.

Thanks for pointing at the workaround @deepak1556 :+1: