Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode is sluggish and buggy on Fedora 37 with wayland + Nvidia drivers #169504

Open
Tracked by #190557
LukaHietala opened this issue Dec 18, 2022 · 70 comments
Open
Tracked by #190557
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug chromium Issues and items related to Chromium info-needed Issue requires more information from poster upstream Issue identified as 'upstream' component related (exists outside of VS Code) wayland Issue related to wayland display server

Comments

@LukaHietala
Copy link

LukaHietala commented Dec 18, 2022

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

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
@LukaHietala
Copy link
Author

LukaHietala commented Dec 18, 2022

I am also not sure that is this a problem with Electron or Wayland with Nvidia drivers.

@LukaHietala

This comment was marked as off-topic.

@deepak1556
Copy link
Contributor

Can you confirm if you are launching the application with --ozone-platform="wayland" --enable-features="WaylandWindowDecorations" ?

@deepak1556 deepak1556 added info-needed Issue requires more information from poster and removed triage-needed labels Dec 19, 2022
@LukaHietala
Copy link
Author

Can you confirm if you are launching the application with --ozone-platform="wayland" --enable-features="WaylandWindowDecorations" ?

Yes, I have tried that and the errors still remain.

@deepak1556 deepak1556 added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) chromium Issues and items related to Chromium confirmation-pending wayland Issue related to wayland display server confirm-with-newer-runtime Issues that need newer runtime builds to confirm and removed info-needed Issue requires more information from poster confirmation-pending labels Dec 19, 2022
@PleahMaCaka
Copy link

PleahMaCaka commented Dec 23, 2022

I am seeing the same logs, that logs occurs when running an all of electron app in wayland environment, and I use Arch + Wayland and it outputs the same log but no problem at all then I think maybe VSCode is slow because of other issue

@LukaHietala
Copy link
Author

I am seeing the same logs, that logs occurs when running an all of electron app in wayland environment, and I use Arch + Wayland and it outputs the same log but no problem at all then I think maybe VSCode is slow because of other issue

Yeah, it appears that the issue exist outside of VSCode and likely is related to Electron, which is why this issue has been labeled as an upstream issue.

@deepak1556
Copy link
Contributor

@LukaHietala can you check if the issue persists with our exploration builds that comes with a newer runtime. Thanks!

@deepak1556 deepak1556 added info-needed Issue requires more information from poster and removed confirm-with-newer-runtime Issues that need newer runtime builds to confirm labels Jan 23, 2023
@LukaHietala
Copy link
Author

@LukaHietala can you check if the issue persists with our exploration builds that comes with a newer runtime. Thanks!

It was WAY more buggier, it was hard to even run the code --verbose command.

  • Constant flickering
  • Crashed once
Errors ``` [6000:0124/213313.259547:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable. [main 2023-01-24T19:33:13.314Z] [File Watcher (node.js)] Request to start watching: /home/lukahietala/.config/Code/User (excludes: , includes: ),/home/lukahietala/.config/Code/User/settings.json (excludes: , includes: ) [main 2023-01-24T19:33:13.320Z] Sending env to running instance... libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) [main 2023-01-24T19:33:13.321Z] [File Watcher (node.js)] Started watching: '/home/lukahietala/.config/Code/User' [main 2023-01-24T19:33:13.321Z] [File Watcher (node.js)] Started watching: '/home/lukahietala/.config/Code/User/settings.json' 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 [main 2023-01-24T19:33:13.356Z] Sent env to running instance. Terminating... [main 2023-01-24T19:33:13.357Z] Lifecycle#kill() [main 2023-01-24T19:33:13.357Z] Lifecycle#onWillShutdown.fire() ```

@deepak1556
Copy link
Contributor

There are still issue with loading the dri files, can you check the permission of these files ? Also, try launching with --disable-gpu-sandbox --ozone-platform=wayland and see if it helps.

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)

You seem to be hitting the same issue as https://bugs.chromium.org/p/chromium/issues/detail?id=1378258

@deepak1556 deepak1556 added the upstream-issue-linked This is an upstream issue that has been reported upstream label Jan 25, 2023
@LukaHietala
Copy link
Author

LukaHietala commented Jan 25, 2023

@deepak1556 The command you provided worked, but did not solve the issue and I also checked the permissions of nvidia drm files and they are root level things.

image

But it's weird that they work on X11 and not on Wayland even though the permissions are the same

@vcharraut
Copy link

vcharraut commented Jan 25, 2023

I have the same configution except I use Fedora Silverblue 37, and I run vscode in a toolbox.
But I have often the same problem, vscode tends to be unresponsive sometimes and the screen is flickering in black too.

Without the --enable-features=UseOzonePlatform --ozone-platform=wayland args I just have a white window.
With them, everything is fine but still with the problems mentioned before.

Adding --disable-gpu-sandbox makes vscode freeze when I want to quit it with the messabe Disabling backups

I can provide logs if needed

@deepak1556
Copy link
Contributor

There is not much we can do here given this is an issue in the runtime, you can use the Xwayland workaround mentioned in upstream to use --ozone-platform=X11

@deepak1556 deepak1556 removed the info-needed Issue requires more information from poster label Jan 25, 2023
@LukaHietala
Copy link
Author

LukaHietala commented Jan 25, 2023

I have the same configution except I use Fedora Silverblue 37, and I run vscode in a toolbox. But I have often the same problem, vscode tends to be unresponsive sometimes and the screen is flickering in black too.

Without the --enable-features=UseOzonePlatform --ozone-platform=wayland args I just have a white window. With them, everything is fine but still with the problems mentioned before.

Adding --disable-gpu-sandbox makes vscode freeze when I want to quit it with the messabe Disabling backups

I can provide logs if needed

Yeah, when I was testing the permissions and stuff I enabled disabled-gpu-sandbox and got the same issue with closing VSCode windows

@onkoe
Copy link

onkoe commented Feb 5, 2023

Also having this problem on VSCode on Fedora 37 Wayland on two different laptops. One has an Intel Core 11k chip, where the problem is fixed by disabling Wayland launch flags. The other has a modern AMD Ryzen 6k chip, which has the problems no matter what when running on a Wayland display server. Neither of these machines have dedicated graphics.

For some reason, I'm not experiencing the problem on my MacBook Pro M1 Pro on Fedora 37 Wayland (w/ Asahi kernel). Which definitely SHOULD break first, but whatever... 😮‍💨

Is anyone else facing these problems on these non-NVIDIA machines too?

@istadem2077
Copy link

Upd. 1.81. Added --enable-features=UseOzonePlatform --ozone-platform=wayland flags.

I thought the flags were there all the time and not only in this update, or am I wrong?

Sorry, I'm afraid there can be misunderstanding between us. VSCode does not enable these flags by default. And did not add this for a long time.

Hmm? Those flags are known for a very long time.

Yes of course, but for some reason it worked now. Again misunderstanding ig. I meant I didn't add these flags. Ofc VSCode had those flag for quite some time.

@rossanodr
Copy link

Upd. 1.81. Added --enable-features=UseOzonePlatform --ozone-platform=wayland flags.

I thought the flags were there all the time and not only in this update, or am I wrong?

Sorry, I'm afraid there can be misunderstanding between us. VSCode does not enable these flags by default. And did not add this for a long time.

Hmm? Those flags are known for a very long time.

Yes of course, but for some reason it worked now. Again misunderstanding ig. I meant I didn't add these flags. Ofc VSCode had those flag for quite some time.

Can you tell me how to add these flags ? I'm new to fedora

@istadem2077
Copy link

istadem2077 commented Sep 4, 2023

Upd. 1.81. Added --enable-features=UseOzonePlatform --ozone-platform=wayland flags.

I thought the flags were there all the time and not only in this update, or am I wrong?

Sorry, I'm afraid there can be misunderstanding between us. VSCode does not enable these flags by default. And did not add this for a long time.

Hmm? Those flags are known for a very long time.

Yes of course, but for some reason it worked now. Again misunderstanding ig. I meant I didn't add these flags. Ofc VSCode had those flag for quite some time.

Can you tell me how to add these flags ? I'm new to fedora

From /usr/local/share/applications/(it might actually be /usr/share/applications/) copy code.desktop to ~/.local/share/applications/ and append these flags at the end of line which starts with Exec.
Or if you're on KDE you can just modify the entry using KDE tools.(just edit the applications menu)

@theIDinside
Copy link

I've struggled with this for months on end (years? probably) with no result.

On Fedora 38, I seem to get it working finally with

code --ozone-platform="wayland" --enable-features="WaylandWindowDecorations"

It seems to be responsive for now and no black pop ups.

@matihope
Copy link

matihope commented Nov 7, 2023

For anybody wondering if these issues have been fixed by the latest nvidia driver version 545, that supposedly fixes many Wayland-related issues... - no, not much has been fixed. Still laggy and unrendered frames.


Nvidia Driver Version: 545.29.02


VSCode:

Version: 1.84.1
Commit: 2b35e1e
Date: 2023-11-06T12:35:31.181Z
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 6.5.9-arch2-1

@istadem2077
Copy link

For anybody wondering if these issues have been fixed by the latest nvidia driver version 545, that supposedly fixes many Wayland-related issues... - no, not much has been fixed. Still laggy and unrendered frames.

Nvidia Driver Version: 545.29.02

VSCode:

Version: 1.84.1 Commit: 2b35e1e Date: 2023-11-06T12:35:31.181Z Electron: 25.9.2 ElectronBuildId: 24603566 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Linux x64 6.5.9-arch2-1

I guess that's Chromium/Electron problem, not Nvidia, interesting enough, I did not discover this issue on Ubuntu. Haven't tried other distributions though, on Fedora KDE issue also exists

@abique
Copy link

abique commented Dec 1, 2023

vscode is literally unusable on Gnome/Wayland/Nvidia/Archlinux.
It flickers like a disco ball.

gnome 45.0-1
code 1.84.2-1
nvidia 545.29.06-2

@milden6
Copy link

milden6 commented Dec 1, 2023

vscode is literally unusable on Gnome/Wayland/Nvidia/Archlinux. It flickers like a disco ball.

gnome 45.0-1 code 1.84.2-1 nvidia 545.29.06-2

At current moment there is one way - just switch to X11

@abique
Copy link

abique commented Dec 1, 2023

Actually if I disable the gpu rendering, then it is OK.

@GuaiGuaiOnMyComputer
Copy link

I'm using Fedora 38 KDE Plasma desktop environment with Wayland windowing system. GPU model is RTX-3060-LHR and driver version is 545.29.06. If I launch vscode from terminal with

code --disable-gpu

everything works fine. But without the disable-gpu flag, vscode flickers and starts dancing.

@gremo
Copy link

gremo commented Dec 12, 2023

Same problem here:

Fedora 39
Wayland
NVIDIA RTX 4070 with 535 RPM fusion driver

code --disable-gpu partially solve the problem (but still getting some flickers in the title bar, changing files)

@deepak1556
Copy link
Contributor

Based on the recent comments there is a mix of users who have the issue resolved and others still facing the issue. Can users still facing the issue, confirm that they are running the wayland backend by passing the flag --ozone-platform=wayland and also try it with latest insiders https://code.visualstudio.com/insiders, code-insiders --ozone-platform=wayland

@deepak1556 deepak1556 added info-needed Issue requires more information from poster and removed upstream-issue-linked This is an upstream issue that has been reported upstream labels Dec 15, 2023
@mikajed
Copy link

mikajed commented Dec 15, 2023

Based on the recent comments there is a mix of users who have the issue resolved and others still facing the issue. Can users still facing the issue, confirm that they are running the wayland backend by passing the flag --ozone-platform=wayland and also try it with latest insiders https://code.visualstudio.com/insiders, code-insiders --ozone-platform=wayland

Yep, all I did was creating a code-flags.conf file in my .config folder with this inside (and code - oss works perfect again):

--enable-features=UseOzonePlatform
--ozone-platform=wayland

@GuaiGuaiOnMyComputer
Copy link

Based on the recent comments there is a mix of users who have the issue resolved and others still facing the issue. Can users still facing the issue, confirm that they are running the wayland backend by passing the flag --ozone-platform=wayland and also try it with latest insiders https://code.visualstudio.com/insiders, code-insiders --ozone-platform=wayland

Fixed the problem by doing what @mikajed said, adding the code-flags.conf file under ~/.config/. Im using vscode version 1.85.1 with an Nvidia GPU and Wayland.

@nlavalle
Copy link

Based on the recent comments there is a mix of users who have the issue resolved and others still facing the issue. Can users still facing the issue, confirm that they are running the wayland backend by passing the flag --ozone-platform=wayland and also try it with latest insiders https://code.visualstudio.com/insiders, code-insiders --ozone-platform=wayland

I'm on a fresh install of Fedora 39 workstation running an Nvidia 3060 with wayland, the code-flags.conf didn't seem to work for me, running code --ozone-platform=wayland I get a Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium. and see spinning but then it seems to die out, no notifications. Running code-insiders --ozone-platform=wayland returns the same message but loads code insiders and doesn't appear to have the buggy issue.

Happy to try other steps if you'd like.

@GuaiGuaiOnMyComputer
Copy link

@nlavalle

I'm on a fresh install of Fedora 39 workstation running an Nvidia 3060 with wayland, the code-flags.conf didn't seem to work for me, running code --ozone-platform=wayland I get a Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium. and see spinning but then it seems to die out, no notifications. Running code-insiders --ozone-platform=wayland returns the same message but loads code insiders and doesn't appear to have the buggy issue.

I'm guessing you're launching vscode from the terminal by code --ozone-platform=wayland , resulting in the warning message.
You should create a file in ~/.config/code-flags.conf, and write the two lines

--enable-features=UseOzonePlatform
--OzonePlatform=wayland

into it.

@mikajed
Copy link

mikajed commented Jan 27, 2024

Based on the recent comments there is a mix of users who have the issue resolved and others still facing the issue. Can users still facing the issue, confirm that they are running the wayland backend by passing the flag --ozone-platform=wayland and also try it with latest insiders https://code.visualstudio.com/insiders, code-insiders --ozone-platform=wayland

I'm on a fresh install of Fedora 39 workstation running an Nvidia 3060 with wayland, the code-flags.conf didn't seem to work for me, running code --ozone-platform=wayland I get a Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium. and see spinning but then it seems to die out, no notifications. Running code-insiders --ozone-platform=wayland returns the same message but loads code insiders and doesn't appear to have the buggy issue.

Happy to try other steps if you'd like.

You could also try to

"window.titleBarStyle": "custom",
"editor.smoothScrolling": true

additional to the ~/.config/code-flags.conf

@unkemptArc99
Copy link

Similar experience here. My OS details -

❯ cat /etc/os-release
NAME="Fedora Linux"
VERSION="39 (Workstation Edition)"
ID=fedora
VERSION_ID=39
VERSION_CODENAME=""
PLATFORM_ID="platform:f39"
PRETTY_NAME="Fedora Linux 39 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:39"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f39/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=39
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=39
SUPPORT_END=2024-11-12
VARIANT="Workstation Edition"
VARIANT_ID=workstation

GPU - NVIDIA GeForce RTX 3050Ti
CPU - AMD Ryzen 7 5800H

❯ code --status
Version:          Code 1.85.2 (8b3775030ed1a69b13e4f4c628c612102e30a681, 2024-01-18T06:40:19.222Z)
OS Version:       Linux x64 6.6.13-200.fc39.x86_64
CPUs:             AMD Ryzen 7 5800H with Radeon Graphics (16 x 4441)
Memory (System):  15.47GB (9.15GB free)
Load (avg):       0, 0, 0
VM:               0%
Screen Reader:    no
Process Argv:     --no-sandbox --force-user-env --unity-launch --crash-reporter-id 7f67fdcf-795b-457a-8ce5-7d2c2305e456
GPU Status:       2d_canvas:                              enabled
                  canvas_oop_rasterization:               disabled_off
                  direct_rendering_display_compositor:    disabled_off_ok
                  gpu_compositing:                        enabled
                  multiple_raster_threads:                enabled_on
                  opengl:                                 enabled_on
                  rasterization:                          enabled
                  raw_draw:                               disabled_off_ok
                  video_decode:                           enabled
                  video_encode:                           disabled_software
                  vulkan:                                 disabled_off
                  webgl:                                  enabled
                  webgl2:                                 enabled
                  webgpu:                                 disabled_off

CPU %	Mem MB	   PID	Process
    0	   174	 14200	code main
    0	    32	 14204	   zygote
    0	    32	 14205	   zygote
    6	   269	 14266	window [1] (Welcome - Visual Studio Code)
    0	   127	 14236	   gpu-process
    0	    63	 14244	   utility-network-service
    0	   111	 14356	shared-process
    0	    79	 14357	fileWatcher [1]
    0	   174	 14383	extensionHost [1]
    0	    63	 14544	     electron-nodejs (/var/lib/snapd/snap/code/149/usr/share/code/code --ms-enable-electron-run-as-node /var/lib/snapd/snap/code/149/usr/share/code/resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=14383)
    0	    79	 14411	ptyHost
    0	     0	 14552	     /usr/bin/zsh -i

Tried to add the options -

--enable-features=UseOzonePlatform
--OzonePlatform=wayland

But still facing the same issue.

@nlavalle
Copy link

@nlavalle

I'm guessing you're launching vscode from the terminal by code --ozone-platform=wayland , resulting in the warning message. You should create a file in ~/.config/code-flags.conf, and write the two lines

--enable-features=UseOzonePlatform
--OzonePlatform=wayland

into it.

That was what I tried, I added the terminal warning message in case that'd help with troubleshooting. Those two lines in the ~/.config/code-flags.conf don't resolve the issue for me.

You could also try to

"window.titleBarStyle": "custom",
"editor.smoothScrolling": true

additional to the ~/.config/code-flags.conf

No luck with this either.

@GuaiGuaiOnMyComputer
Copy link

GuaiGuaiOnMyComputer commented Feb 14, 2024

@nlavalle

I'm on a fresh install of Fedora 39 workstation running an Nvidia 3060 with wayland, the code-flags.conf didn't seem to work for me, running code --ozone-platform=wayland I get a Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium. and see spinning but then it seems to die out, no notifications. Running code-insiders --ozone-platform=wayland returns the same message but loads code insiders and doesn't appear to have the buggy issue.

I'm guessing you're launching vscode from the terminal by code --ozone-platform=wayland , resulting in the warning message. You should create a file in ~/.config/code-flags.conf, and write the two lines

--enable-features=UseOzonePlatform
--OzonePlatform=wayland

into it.

Weird.... After reinstalling vscode through dnf, this method no longer work for me. So for now, I just disable hardware acceleration by ctrl+shift+p preference:configure runtime arguments, and uncomment the line

"disable-hardware-acceleration": true,
The version of my vscode is 1.86.1

@larspontoppidan
Copy link

I faced this problem on a fresh KDE Neon (Plasma 6.0.2) install on an AMD platform with an NVIDIA GPU (driver version: 535.161.07). I tried the latest regular code (version: 1.87.2) with various combinations of parameters and nothing fully fixed the black flickering and the jumpiness to the view port and cursor when scrolling.

All the issues went away for me by running the latest code-insider version from the Microsoft PPA (version: 1.88.0-1711043310) with the flags: --enable-features=UseOzonePlatform --ozone-platform=wayland. Like that it works flawlessly and responsively. Frankly, it's the smoothest vscode experience I've had so far.

I wasn't sure how to pass those parameters permanently to code-insiders. The ~/.config/code-flags.conf file didn't seem to work. What I did instead was to edit the code-insiders.desktop launcher so the flags are in the arguments and to make a shell alias (in ~/.bashrc) like this:

alias code='code-insiders --enable-features=UseOzonePlatform --ozone-platform=wayland'

Only slight annoyance is that it prints the Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium. every time code is started from the terminal.

@KaeLL
Copy link

KaeLL commented Apr 29, 2024

Problem still persists on F40 KDE Spin + Nvidia 550.76 + vscode 1.88.1
Followed the steps mentioned by @larspontoppidan and it worked great.
Will this ever be addressed?

@rzippo
Copy link

rzippo commented May 7, 2024

Same issue persist on Fedora 40 with VS Code 1.89.0, I followed the steps by @larspontoppidan and it worked.
I also had the same issue with Chrome (v 124.0) and the same steps work there as well.

@istadem2077
Copy link

Reading the replies and stuff, it seems like the issue is not even with Chromium/Electron, but rather the NovideoNvidia, whose drivers are just broken/do not support neccesary functionality requested by the Chromium/Electron.

Buying nvidia machine I thought that situation with nvidia+Wayland got better.

Problem still persists on F40 KDE Spin + Nvidia 550.76 + vscode 1.88.1 Followed the steps mentioned by @larspontoppidan and it worked great. Will this ever be addressed?

@waweber
Copy link

waweber commented May 17, 2024

I am also experiencing the issue on F40 KDE + vscode 1.89.1

VS code does not appear to honor the flags when added to code-flags.conf nor electron-flags.conf, but it does work when passed explicitly on the command line. These flags also do not appear to be supported by the "Configure Runtime Arguments" preferences.

If you dislike seeing the warning from the terminal, it seems to work for me if I only pass --ozone-platform=wayland, so try updating your alias to that.

@KaeLL
Copy link

KaeLL commented May 20, 2024

@waweber will try that, and if I don't reply to you again, it means it worked.

@bchanez
Copy link

bchanez commented Jun 6, 2024

Same issue.

I added to vscode and chromium-browser and it worked :

In /usr/share/applications/code.desktop and in /usr/share/applications/chromium-browser.desktop, add --ozone-platform="wayland" to the ligne that starts by Exec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug chromium Issues and items related to Chromium info-needed Issue requires more information from poster upstream Issue identified as 'upstream' component related (exists outside of VS Code) wayland Issue related to wayland display server
Projects
None yet
Development

No branches or pull requests