flathub / com.vscodium.codium

https://flathub.org/apps/details/com.vscodium.codium
94 stars 19 forks source link

Last update `Fix nosocket is not needed` breaks a few things. #303

Closed AlirezaDastyar closed 4 months ago

AlirezaDastyar commented 4 months ago

I've just updated to the latest refresh and the Fix nosocket is not needed commit breaks a few things for me.

  1. The vscodium icon is replaced with generic wayland icon
  2. The global menu on KDE is not working anymore(flathub/com.vscodium.codium/issues/102 )
noonsleeper commented 4 months ago

@AlirezaDastyar try this

flatpak override --user --socket=x11 --nosocket=wayland --nosocket=fallback-x11 com.vscodium.codium

this overrides the new wayland config and relay again on xwayland. With these changes I also added a section on the readme about it https://github.com/flathub/com.vscodium.codium?tab=readme-ov-file#wayland-vs-x11

AlirezaDastyar commented 4 months ago

@AlirezaDastyar try this

flatpak override --user --socket=x11 --nosocket=wayland --nosocket=fallback-x11 com.vscodium.codium

this overrides the new wayland config and relay again on xwayland. With these changes I also added a section on the readme about it https://github.com/flathub/com.vscodium.codium?tab=readme-ov-file#wayland-vs-x11

With those overrides the app does not open.

$ flatpak override --user --socket=x11 --nosocket=wayland --nosocket=fallback-x11 com.vscodium.codium
$ flatpak run com.vscodium.codium 
codium-wrapper: Setting up NPM packages
codium-wrapper: Setting up Cargo packages
codium-wrapper: Setting up Python packages
codium-wrapper: Setting up Ruby packages
Warning: 'ozone-platform-hint' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium.

I'm on a wayland session btw.

noonsleeper commented 4 months ago

try this, clean all your overrides for codium, maybe you need to backup all of that first

flatpak permission-reset com.vscodium.codium
flatpak override --user --reset com.vscodium.codium
flatpak override --user --socket=x11 com.vscodium.codium

also try to force x11 on the terminal

flatpak run com.vscodium.codium . --ozone-platform=x11 --verbose
AlirezaDastyar commented 4 months ago

Already done the reset part but here you go:

$ flatpak permission-reset com.vscodium.codium
$ flatpak override --user --reset com.vscodium.codium
$ flatpak info --show-permissions com.vscodium.codium
[Context]
shared=network;ipc;
sockets=x11;wayland;pulseaudio;fallback-x11;ssh-auth;
devices=all;
features=devel;
filesystems=xdg-run/gnupg:ro;xdg-config/kdeglobals:ro;host;
persistent=.vscode-oss;

[Session Bus Policy]
org.freedesktop.Flatpak=talk
org.kde.kwalletd5=talk
com.canonical.AppMenu.Registrar=talk
org.freedesktop.secrets=talk

[System Bus Policy]
org.freedesktop.login1=talk

[Environment]
XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons

$ flatpak override --user --socket=x11 com.vscodium.codium
$ flatpak info --show-permissions com.vscodium.codium
[Context]
shared=network;ipc;
sockets=x11;wayland;pulseaudio;fallback-x11;ssh-auth;
devices=all;
features=devel;
filesystems=xdg-run/gnupg:ro;xdg-config/kdeglobals:ro;host;
persistent=.vscode-oss;

[Session Bus Policy]
org.freedesktop.Flatpak=talk
org.kde.kwalletd5=talk
com.canonical.AppMenu.Registrar=talk
org.freedesktop.secrets=talk

[System Bus Policy]
org.freedesktop.login1=talk

[Environment]
XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons

$ flatpak run com.vscodium.codium . --ozone-platform=x11 --verbose
codium-wrapper: Setting up NPM packages
codium-wrapper: Setting up Cargo packages
codium-wrapper: Setting up Python packages
codium-wrapper: Setting up Ruby packages
Warning: 'ozone-platform-hint' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium.
[18 zypak-helper] Using spawn strategy test 1 as set by environment
[18:0222/193853.346455:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[18:0222/193853.346506:ERROR:env.cc(255)] The platform failed to initialize.  Exiting.
The futex facility returned an unexpected error code.
noonsleeper commented 4 months ago

Sorry my mistake the command needs to be

flatpak permission-reset com.vscodium.codium
flatpak override --user --reset com.vscodium.codium

and then

flatpak override --user --socket=x11 --nosocket=wayland com.vscodium.codium
flatpak run com.vscodium.codium --ozone-platform=x11 --verbose
noonsleeper commented 4 months ago

since ozone-platform-hint is in auto if detect wayland try to start always on it. But if this works, I will need to add some kind of env-var to force --ozone-platform=x11 to those that are having problems with wayland.

AlirezaDastyar commented 4 months ago

That was it, now it's working as before.

daiyam commented 4 months ago

@noonsleeper If it's a recurrent issue, do you want to add the fix in https://github.com/VSCodium/vscodium/blob/master/docs/troubleshooting.md?

noonsleeper commented 4 months ago

@daiyam I was pointed to a good solution, https://github.com/flathub/com.vscodium.codium/pull/305 this take care of the ARGS for X11 and Wayland in runtime then the only thing that the user need to do is run the override that I mention on the README.md this update will be available on about ~4h more, also the build able to test for 24h using this command flatpak install --user https://dl.flathub.org/build-repo/84888/com.vscodium.codium.flatpakref

About your idea to add this common problems to the main documentation, I think is a good one =).

ghost commented 4 months ago

With those overrides the app does not open.

I did document this issue on my initial PR. I also faced the same issue.

VSC Wayland native on Wayland -> works VSC X11 on Xorg -> works VSC X11 on Wayland (via Xwayland) -> broken

AlirezaDastyar commented 4 months ago

I can confirm that after the last update the issue is resolved (for me) by disabling wayland.

noonsleeper commented 4 months ago

@AlirezaDastyar then I will close this. If you found any other problem, don't hesitate and open a new issue.