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 not compatible with Ubuntu 24.04 with wayland default #212430

Closed
Tracked by #212907
liheyuan opened this issue May 10, 2024 · 51 comments
Closed
Tracked by #212907

VSCode is not compatible with Ubuntu 24.04 with wayland default #212430

liheyuan opened this issue May 10, 2024 · 51 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmation-pending electron Issues and items related to Electron linux Issues with VS Code on Linux upstream Issue identified as 'upstream' component related (exists outside of VS Code) wayland Issue related to wayland display server

Comments

@liheyuan
Copy link

liheyuan commented May 10, 2024

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

  • VS Code Version: 1.89.1
  • OS Version: Ubuntu 24.04 (wayland enabled)

Steps to Reproduce:

  1. Fresh install Ubuntu 24.04
  2. apt install code latest version (have try many version back to 1.85 or deb from official side or snap)
  3. open a exist folder contains file
  4. open file / terminal , vscode
  5. VSCode began to experience many strange behaviors, including not responding to shortcut keys, clicking buttons on the UI was not respond, and click button on dialog box but automatically switched to other app UI. It's basically unavailable...

I upload the following video to show parts of the issue

Screencast.from.2024-05-10.18-43-29.webm

When my mouse is hovering over the popup or terminal, I actually click a lot of mouse or type a lot of keyboard, but vscode does not respond.

However, I disable wayland by editing '/etc/gdm3/custom.conf' , add following line

WaylandEnable=false

And reboot, everything works like charms.

Not sure if it's wayland bug or vscode problem, seems not compatible with wayland under linux.

@liheyuan
Copy link
Author

https://askubuntu.com/questions/1512758/window-cursor-wont-lock-in-games-with-ubuntu-24-04-multi

This article says that maybe Ubuntu 24.04 wayland + multi-screen is the cause, I will try it

@liheyuan
Copy link
Author

https://askubuntu.com/questions/1512758/window-cursor-wont-lock-in-games-with-ubuntu-24-04-multi

This article says that maybe Ubuntu 24.04 wayland + multi-screen is the cause, I will try it

24.04 wayland + single screen, not work

@skbtwiz
Copy link

skbtwiz commented May 10, 2024

Working just fine on 24.04 LTS with wayland enabled by adding flags to the .desktop file. I have installed using .deb package from official website and not a snap package.

Device is a Macbook Pro 13,2 (2016 Touchbar 13"). Using internal display.

@liheyuan
Copy link
Author

Working just fine on 24.04 LTS with wayland enabled by adding flags to the .desktop file. I have installed using .deb package from official website and not a snap package.

Device is a Macbook Pro 13,2 (2016 Touchbar 13"). Using internal display.

I tried deb from official webside / apt / snap , Unfortunately, it's still the same problem.

@mistletoe235
Copy link

I also encountered the same problem

@mrskycriper
Copy link

with wayland enabled by adding flags to the .desktop file

@skbtwiz Hi, can you please share those flags? I'm hoping that forcing Wayland will fix the blurriness when using fractional scaling. I've googled the problem but all the issues are from 1-2 years ago and the flags from them seem to be removed in the current version of Chromium.

@liheyuan
Copy link
Author

liheyuan commented May 14, 2024

with wayland enabled by adding flags to the .desktop file

@skbtwiz Hi, can you please share those flags? I'm hoping that forcing Wayland will fix the blurriness when using fractional scaling. I've googled the problem but all the issues are from 1-2 years ago and the flags from them seem to be removed in the current version of Chromium.

This is work for me:

/usr/share/applications/code.desktop

[Desktop Entry]
...
#Exec=/usr/share/code/code %F
Exec=/usr/share/code/code --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto %F
...

[Desktop Action new-empty-window]
...
#Exec=/usr/share/code/code --new-window %F
Exec=/usr/share/code/code --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto --new-window %F
...

@mrskycriper

@ashishsinghin
Copy link

Same issue on ubuntu 24.04
Screencast from 2024-05-15 12-07-24.webm

@mrskycriper
Copy link

@liheyuan Thank you! It worked, the window is not blurry anymore.

@jaime-ez
Copy link

I'm having the same issue, vscode and vscode-insiders installed from snap store. Using two displays with different resolution. chromium adjusts scale factor automatically after running chromium --enable-features=UseOzonePlatform --ozone-platform=wayland but vscode does not.

Ubuntu 22.04 using wayland
Vscode 1.89.1

Tried running :
code --enable-features=UseOzonePlatform --ozone-platform=wayland code did not launch
code-insiders --enable-features=UseOzonePlatform --ozone-platform=wayland did not launch
code-insiders --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations did not launch

Any help is appreciated

@liheyuan
Copy link
Author

I'm having the same issue, vscode and vscode-insiders installed from snap store. Using two displays with different resolution. chromium adjusts scale factor automatically after running chromium --enable-features=UseOzonePlatform --ozone-platform=wayland but vscode does not.

Ubuntu 22.04 using wayland Vscode 1.89.1

Tried running : code --enable-features=UseOzonePlatform --ozone-platform=wayland code did not launch code-insiders --enable-features=UseOzonePlatform --ozone-platform=wayland did not launch code-insiders --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations did not launch

Any help is appreciated

@jaime-ez

Have you tried single screen and is it working properly?

@arbabkhalil
Copy link

@liheyuan Thanks, this seems to fix my issue.

@jaime-ez
Copy link

@liheyuan code nor code-insiders don´t launch on ubuntu 22.04.4 when running any of the commands I described earlier, independently if I have external displays or not.

@liheyuan-kanyun
Copy link

@liheyuan code nor code-insiders don´t launch on ubuntu 22.04.4 when running any of the commands I described earlier, independently if I have external displays or not.

It may be caused by other reasons, the phenomenon is not similar.

@youngqqcn
Copy link

youngqqcn commented May 22, 2024

with wayland enabled by adding flags to the .desktop file

@skbtwiz Hi, can you please share those flags? I'm hoping that forcing Wayland will fix the blurriness when using fractional scaling. I've googled the problem but all the issues are from 1-2 years ago and the flags from them seem to be removed in the current version of Chromium.

This is work for me:

/usr/share/applications/code.desktop

[Desktop Entry]
...
#Exec=/usr/share/code/code %F
Exec=/usr/share/code/code --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto %F
...

[Desktop Action new-empty-window]
...
#Exec=/usr/share/code/code --new-window %F
Exec=/usr/share/code/code --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto --new-window %F
...

@mrskycriper

It's work , but after fixed this issue, I couldn't input Chinese in vscode by using fcitx5.

I disabled wayland mode by uncomment this config in /etc/gdm3/custom.conf

WaylandEnable=false

It's work for me

@vscodenpa vscodenpa added the stale Issues that have not been triaged in an appropriate amount of time label May 29, 2024
@aeschli aeschli assigned deepak1556 and unassigned aeschli May 29, 2024
@vscodenpa vscodenpa removed triage-needed stale Issues that have not been triaged in an appropriate amount of time labels May 29, 2024
@zamoosh
Copy link

zamoosh commented Jun 5, 2024

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

  • VS Code Version: 1.89.1
  • OS Version: Ubuntu 24.04 (wayland enabled)

Steps to Reproduce:

  1. Fresh install Ubuntu 24.04
  2. apt install code latest version (have try many version back to 1.85 or deb from official side or snap)
  3. open a exist folder contains file
  4. open file / terminal , vscode
  5. VSCode began to experience many strange behaviors, including not responding to shortcut keys, clicking buttons on the UI was not respond, and click button on dialog box but automatically switched to other app UI. It's basically unavailable...

I upload the following video to show parts of the issue

Screencast.from.2024-05-10.18-43-29.webm
When my mouse is hovering over the popup or terminal, I actually click a lot of mouse or type a lot of keyboard, but vscode does not respond.

However, I disable wayland by editing '/etc/gdm3/custom.conf' , add following line

WaylandEnable=false

And reboot, everything works like charms.

Not sure if it's wayland bug or vscode problem, seems not compatible with wayland under linux.

Hello, I'm not sure this is related to vscode or any other app, also after logging out every thing fixes. may wayland is the problem...

@copinta
Copy link

copinta commented Jun 12, 2024

Do a snap remove of vscode and pull the official repo from Microsoft 1-Add the microsoft GPG key 2-Add the official repo of Vscode 3-Update 4-Install

curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/
rm packages.microsoft.gpg

sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

sudo apt update

sudo apt install code

This should make you able to use VScode again in version 24.04 of Ubuntu in any template you have running ubuntu.

It did work for me. thanks

@tro-nic
Copy link

tro-nic commented Jun 13, 2024

Hi I can´t fix it, just uninstall snap and install via apt-get and done VS code work perfect.

@invy
Copy link

invy commented Jun 17, 2024

Installing without snap did help

@thediveo
Copy link

nope, installing from .deb does not fix vscode hanging on using the file open dialog, including trying to open a different workspace.

@abhijeetps
Copy link

Hi, I had the same issue with installing vscode from snap store i ubuntu 24.04.

I solved this issue by

1. Download vscode from https://code.visualstudio.com/Download, and install it.

2. Change window. titleBarStyle in userSetting.json from "native" to "custom"

3. Disable wayland by following this article https://linuxconfig.org/how-to-enable-disable-wayland-on-ubuntu-22-04-desktop

Hope it can help.

Thanks @ken999999999999999 .
I tried removing snap version and reinstalling via Microsoft's official repo inititally, but I was still facing the crashing issue.
However, your solution of using custom titleBar and disabling Wayland helped.
Thanks! 🙌🏽

@youngqqcn
Copy link

youngqqcn commented Jul 5, 2024

my vsocde version 1.91.0 , vscode on Ubuntu24.04 has many issues, sometimes all is fine, but sometimes occurs many issues as below:

  • sometimes click on vscode's terminal console but show other application's window which is the behind the vscode window, WTF! I can't use terminal in vscode!
  • sometimes when I max scale the vscode window, I can't click and type words in vscode's terminal console
  • sometims vsocde cat't be scaled and closed by top right button , when click "close" button on top right, it's close other application window which behind the vscode , WTF?

"Clicking on bottom half of applications switches to background application"

"Strange UI issue with Electron apps on 24.04"

"Issues with Wayland on 24.04"


Now I open vscode with code --ozone-platform=wayland mydir , but I can't use Chinese inputs in vscode ...

brave/brave-browser#37860

@aldolammel
Copy link

WaylandEnable=false

It is working fine so far. Thanks.

@sanbei101
Copy link

Oh my god, I thought my computer was broken, but it turns out it's Electron that hasn't been updated for 24.04.

@EichiUehara
Copy link

Title Bar Style setting from native to custom works for me

Screenshot from 2024-07-19 20-29-28

Screenshot from 2024-07-19 20-30-03

@youngqqcn
Copy link

Title Bar Style setting from native to custom works for me

Screenshot from 2024-07-19 20-29-28

Screenshot from 2024-07-19 20-30-03

Currently , it's also works for me , thanks!

@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) linux Issues with VS Code on Linux electron Issues and items related to Electron confirmation-pending wayland Issue related to wayland display server labels Jul 22, 2024
@chaituskc
Copy link

Title Bar Style setting from native to custom works for me

Screenshot from 2024-07-19 20-29-28

Screenshot from 2024-07-19 20-30-03

With this, it works for me thanks

@liheyuan
Copy link
Author

Try upgrade to latest Ubuntu 24.04.1

It seems mutter ralated pkg fix this problem

mutter (46.2-1ubuntu0.24.04.1) noble; urgency=medium

[ Daniel van Vugt ]

New upstream release 46.2 (LP: #2068598)
Fixed mouse clicks falling through to the window behind (LP: #2026194)
...

@doug65536
Copy link

doug65536 commented Sep 1, 2024

Lucky you. If I disable Wayland, it freezes at black screen before logon screen. I don't have a workaround. Try not to completely downplay your own bug report, implying that you should just leave Wayland off and it's not a bug. Wayland is forced down most people's throat. Canonical thinks they can dictate like Microsoft. They need to get a grip on reality.

@hildogjr
Copy link

hildogjr commented Sep 9, 2024

Also disable Wayland can create issues in other software used. IMHO, this still a issue to be addressed. Disable it is just a workaround that works for some users.

@hildogjr
Copy link

hildogjr commented Sep 9, 2024

#193165

Appear to be related.

@hildogjr
Copy link

hildogjr commented Sep 9, 2024

I deleted the ~\.config\code and ~\.vscode folders and made a fresh extension reinstall. So far, appear fixed.

@dubaksk
Copy link

dubaksk commented Sep 15, 2024

I deleted the ~\.config\code and ~\.vscode folders and made a fresh extension reinstall. So far, appear fixed.

This worked for me. None of the solutions above. Thanks @hildogjr

@icew4y
Copy link

icew4y commented Oct 2, 2024

titleBarStyle

Thanks, finally this works for me on ubuntu 24

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Oct 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug confirmation-pending electron Issues and items related to Electron linux Issues with VS Code on Linux 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