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

Open
Tracked by #212907
liheyuan opened this issue May 10, 2024 · 25 comments
Open
Tracked by #212907

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

liheyuan opened this issue May 10, 2024 · 25 comments
Assignees

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

@siashish
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

@VSCodeTriageBot VSCodeTriageBot 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
@VSCodeTriageBot VSCodeTriageBot 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...

@WaKeMaTTa
Copy link

WaKeMaTTa commented Jun 6, 2024

When I try to open VSCode it opens for a 1s and it closes automatically.

💥 In Ubuntu 24.04.4 LTS (Windows system: XOrg) + VSCode 1.90.0

Version: 1.90.0
Commit: 89de5a8d4d6205e5b11647eb6a74844ca23d2573
Date: 2024-06-04T19:43:07.605Z
Electron: 29.4.0
ElectronBuildId: 9593362
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.5.0-35-generic snap

✔️ Using Ubuntu 24.04.4 LTS (Windows system: Wayland) works fine.

@liheyuan
Copy link
Author

liheyuan commented Jun 6, 2024

Another try 1.90.0 with 24.04 LTS with wayland, sometimes works fine, sometimes UI not response....

Version: 1.90.0
Commit: 89de5a8
Date: 2024-06-04T19:43:07.605Z
Electron: 29.4.0
ElectronBuildId: 9593362
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.8.0-35-generic

@liheyuan
Copy link
Author

liheyuan commented Jun 6, 2024

I found that

When in ubuntu 24.04 with wayland, vscode opens as a smaller & non-full screen window by default, and there are basically no problems at this time.

Once enter the maxium window mode, it will easily trigger problems I mentioned, including unresponsive UI, mouse confusion, etc.

@liheyuan
Copy link
Author

liheyuan commented Jun 6, 2024

I found that

When in ubuntu 24.04 with wayland, vscode opens as a smaller & non-full screen window by default, and there are basically no problems at this time.

Once enter the maxium window mode, it will easily trigger problems I mentioned, including unresponsive UI, mouse confusion, etc.

Seems can be resolved by vscode configuration, Window: Title Bar Style to Custom instead of Native

According to this issue #179746

@alextdel
Copy link

alextdel commented Jun 6, 2024

I have a similar problem to many of the symptoms below.

  • VSCode (flathub) - on current 1.90.0 and previous version
  • Ubuntu 24.04 (gnome)
  • AMD GPU.

Process:
Open VSCode - typically an HTML and a CSS file open in adjacent split panes - has happened on tabbed single pane also.
Edit for a while with all functions working OK then

  • clicking in an edit window stops working.
  • when split view ... one edit window will work (click, select, type etc) the other will not respond to click, selection or any mouse interaction
  • application controls (close/maximise etc) will not respond
  • menus still seem to work OK (save/exit etc).

Can be after a reasonable period of working fine.
Only solution is to continue working in the functioning pane or close the application and reopen.
Hope this information helps.

@liheyuan
Copy link
Author

liheyuan commented Jun 6, 2024

Title Bar Style

Have you tried "Change Title Bar Style" above?

@alextdel

@WaKeMaTTa
Copy link

@liheyuan I tried. Didn't work for me.

@liheyuan
Copy link
Author

liheyuan commented Jun 7, 2024

When I try to open VSCode it opens for a 1s and it closes automatically.

💥 In Ubuntu 24.04.4 LTS (Windows system: XOrg) + VSCode 1.90.0

Version: 1.90.0
Commit: 89de5a8d4d6205e5b11647eb6a74844ca23d2573
Date: 2024-06-04T19:43:07.605Z
Electron: 29.4.0
ElectronBuildId: 9593362
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.5.0-35-generic snap

✔️ Using Ubuntu 24.04.4 LTS (Windows system: Wayland) works fine.

@WaKeMaTTa open vscode then crash seems to be Electron related problem

try this electron/electron#41066

@WaKeMaTTa
Copy link

@liheyuan I tried the temporal solution that they propose in electron/electron#41066

sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

but doesn't work 💥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests