Repository: vscode
Issue: VSCode is sluggish and buggy on Fedora 37 with wayland + Nvidia drivers
Labels: bug,upstream,chromium,wayland

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

- VS Code Version: 
1.74.1/Insider/Exploration (w/ newer runtime)
- OS Version: 
Fedora 37
- Additional information

| **item**  | **value** |
| ------------- | ------------- |
| Processor        | AMD Ryzen™ 5 5600X × 12                             |
| GPU              | NVIDIA GeForce GTX 1660 Ti; Driver version 525.60.11 |
| GNOME Version    | 43                                                  |
| Windowing system | Wayland                                             |
| OS type          | 64 bit                                              |
| Memory           | 32 GB                                               | 

Similar issue #134255 (closed and didn't solve my issue)
Edit: Similar **Upstream** issue [bugs.chromium.org id=1378258](https://bugs.chromium.org/p/chromium/issues/detail?id=1378258)

VSCode stable and insider versions are sometimes unresponsive and buggy on my system when I am using Wayland with NVIDIA drivers on Fedora OS. This happens usually when I am typing on input fields or hovering over buttons. I have tried to find a solutions to this problem like:

- Enabling Vulkan (`--enable-features=Vulkan`) (**doesn't work**)
- Disabling GPU (`--disable-gpu`) (**doesn't work**)
- Switching temporarily to X11 (**works**)
- Edit: Adding Wayland window decorations (`--ozone-platform="wayland" --enable-features="WaylandWindowDecorations"`) (**doesn't work**)
- Edit: Disabling GPU sandbox (`--disable-gpu-sandbox`) (**doesn't work**)
  
Full list of problems (What i have noticed so there might be more problems): 

- VSCode window flickers sometimes (black)
- Buttons are not always responsive
- Typing on input fields is buggy

Errors (`code --verbose`):

- `'[9130:1218/182922.095257:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.`
- `libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)`
- `MESA-LOADER: failed to retrieve device information`
- `MESA-LOADER: failed to open nvidia-drm: /usr/lib64/dri/nvidia-drm_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib64/dri, suffix _dri)`
- `failed to load driver: nvidia-drm`
- `MESA-LOADER: failed to open zink: /usr/lib64/dri/zink_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib64/dri, suffix _dri)`
- `failed to load driver: zink`
- `MESA-LOADER: failed to open kms_swrast: /usr/lib64/dri/kms_swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib64/dri, suffix _dri)`
- `failed to load driver: kms_swrast`
- `MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib64/dri, suffix _dri)`
- `failed to load swrast driver`

All of those errors come on Wayland, not on X11.

Steps to Reproduce:

1. Open VSCode 1.74.1 or VSCode Insider on Fedora 37 with Wayland/NVIDIA