pop-os / cosmic-epoch

Next generation Cosmic desktop environment
3.11k stars 84 forks source link

All XWayland windows are blank / only have Window borders #349

Closed ported-pw closed 3 months ago

ported-pw commented 5 months ago

I installed cosmic-session on latest Pop!OS as per the instructions in the README, and I'm quite enjoying the tiling and speed :)

All applications/windows that are not Wayland-native render a transparent window for me, only showing Window decorations where the application is not rendering custom ones. They are listed in xlsclients and seem to function normally otherwise.

Some examples include many Electron apps when not forced to Wayland, JetBrains IDEs, and the Steam Linux client.

I'm not sure if there is some configuration issue as I do not see any reference to XWayland being this broken anywhere in the issues. (I also cannot make the screenshot tool work to take a screenshot).

~> apt-cache policy cosmic-session
cosmic-session:
  Installed: 0.1.0~1716221666~22.04~d8ff979
  Candidate: 0.1.0~1716221666~22.04~d8ff979
  Version table:
 *** 0.1.0~1716221666~22.04~d8ff979 1001
       1001 http://apt.pop-os.org/release jammy/main amd64 Packages
        100 /var/lib/dpkg/status

 ~> apt-cache policy cosmic-comp
cosmic-comp:
  Installed: 0.1~1716312710~22.04~4f076e0
  Candidate: 0.1~1716312710~22.04~4f076e0
  Version table:
 *** 0.1~1716312710~22.04~4f076e0 1001
       1001 http://apt.pop-os.org/release jammy/main amd64 Packages
        100 /var/lib/dpkg/status

Any debugging hints or further information you need would be greatly appreciated :)

mmstick commented 5 months ago

Did you install the XWayland 24.1 update from popdev:master?

ported-pw commented 5 months ago

I upgraded from popdev:master and now I no longer have the option to switch to COSMIC or Pop on Wayland in GDM :thinking: The following packages were upgraded:

cosmic-settings-daemon:amd64 (0.1.0~1715819490~22.04~dd195a8, 0.1.0~1716421185~22.04~4e9a2ae)
cosmic-comp:amd64 (0.1~1716312710~22.04~4f076e0, 0.1~1716496914~22.04~dcc4873)
cosmic-app-library:amd64 (0.1.0~1716303061~22.04~e97d7c2, 0.1.0~1716482192~22.04~a121f33)
gnome-shell-extension-cosmic-workspaces:amd64 (0.1.0~1654603041~22.04~c5f2c5d, 0.1.0~1716422595~22.04~6d90fb4)
libwayland-cursor0:amd64 (1.20.0-1ubuntu0.1, 1.22.0-2pop1~1716444939~22.04~b8002be)
libwayland-cursor0:i386 (1.20.0-1ubuntu0.1, 1.22.0-2pop1~1716444939~22.04~b8002be)
libwayland-server0:amd64 (1.20.0-1ubuntu0.1, 1.22.0-2pop1~1716444939~22.04~b8002be)
libwayland-server0:i386 (1.20.0-1ubuntu0.1, 1.22.0-2pop1~1716444939~22.04~b8002be)
cosmic-applets:amd64 (0.1.0~1716252283~22.04~5b2bc8e, 0.1.0~1716390521~22.04~c6dd730)
xwayland:amd64 (2:22.1.1-1ubuntu0.13, 2:24.1.0-1pop1~1716447027~22.04~eb750bb)
wayland-protocols:amd64 (1.32-1~1701103839~22.04~202ca2e, 1.35-1pop1~1716443961~22.04~708608e)
cosmic-osd:amd64 (0.1.0~1714588109~22.04~dc4df2c, 0.1.0~1716322519~22.04~3063271)
cosmic-launcher:amd64 (0.1.0~1716299822~22.04~93eb482, 0.1.0~1716488312~22.04~953a5b6)
xdg-desktop-portal-cosmic:amd64 (0.1.0pop1~1715564681~22.04~0372e0c, 0.1.0pop1~1716390546~22.04~ddafa7b)
libwayland-egl1:amd64 (1.20.0-1ubuntu0.1, 1.22.0-2pop1~1716444939~22.04~b8002be)
libwayland-egl1:i386 (1.20.0-1ubuntu0.1, 1.22.0-2pop1~1716444939~22.04~b8002be)
libwayland-bin:amd64 (1.20.0-1ubuntu0.1, 1.22.0-2pop1~1716444939~22.04~b8002be)
libwayland-dev:amd64 (1.20.0-1ubuntu0.1, 1.22.0-2pop1~1716444939~22.04~b8002be)
x11proto-dev:amd64 (2021.5-1, 2024.1-1pop1~1716445297~22.04~53eb823)
libwayland-client0:amd64 (1.20.0-1ubuntu0.1, 1.22.0-2pop1~1716444939~22.04~b8002be)
libwayland-client0:i386 (1.20.0-1ubuntu0.1, 1.22.0-2pop1~1716444939~22.04~b8002be)

I then tried removing popdev:master again and the following packages were downgraded back:

cosmic-settings-daemon:amd64 (0.1.0~1716421185~22.04~4e9a2ae, 0.1.0~1715819490~22.04~dd195a8)
cosmic-comp:amd64 (0.1~1716496914~22.04~dcc4873, 0.1~1716312710~22.04~4f076e0)
cosmic-app-library:amd64 (0.1.0~1716482192~22.04~a121f33, 0.1.0~1716303061~22.04~e97d7c2)
gnome-shell-extension-cosmic-workspaces:amd64 (0.1.0~1716422595~22.04~6d90fb4, 0.1.0~1654603041~22.04~c5f2c5d)
cosmic-applets:amd64 (0.1.0~1716390521~22.04~c6dd730, 0.1.0~1716252283~22.04~5b2bc8e)
wayland-protocols:amd64 (1.35-1pop1~1716443961~22.04~708608e, 1.32-1~1701103839~22.04~202ca2e)
cosmic-osd:amd64 (0.1.0~1716322519~22.04~3063271, 0.1.0~1714588109~22.04~dc4df2c)
cosmic-launcher:amd64 (0.1.0~1716488312~22.04~953a5b6, 0.1.0~1716299822~22.04~93eb482)
xdg-desktop-portal-cosmic:amd64 (0.1.0pop1~1716390546~22.04~ddafa7b, 0.1.0pop1~1715564681~22.04~0372e0c)

but I can still not choose anything in GDM.

The config file changes mentioned in the README are still in place. In hindsight I should have probably only upgraded xwayland from popdev:master, but yeah :/

avatar4d commented 5 months ago

@mmstick

Did you install the XWayland 24.1 update from popdev:master?

I'm experiencing the blank windows as well. I noticed it with Brave browser, which seems to load fine (i.e. I can see the previous session reload and display), but then blanks out as soon as I try to scroll down the page. While I installed cosmic-session from the primary Pop repo, not popdev:main, it does appear to be running XWayland 24.1.

From apt policy xwayland:

xwayland: Installed: 2:24.1.0-1pop1~1716447027~22.04~eb750bb Candidate: 2:24.1.0-1pop1~1716447027~22.04~eb750bb Version table: *** 2:24.1.0-1pop1~1716447027~22.04~eb750bb 1001 1001 http://apt.pop-os.org/release jammy/main amd64 Packages 100 /var/lib/dpkg/status 2:22.1.1-1ubuntu0.13 500 500 http://apt.pop-os.org/ubuntu jammy-security/main amd64 Packages 500 http://apt.pop-os.org/ubuntu jammy-updates/main amd64 Packages 2:22.1.1-1 500 500 http://apt.pop-os.org/ubuntu jammy/main amd64 Packages

boderg commented 5 months ago

I am also experiencing the blank window issue. I have not installed xwayland update from popdev:master VSCode will open and then blank out when trying to scroll. VSCode also will not close when the close button is clicked, it will only minimize. Steam will not open at all and pops up a window stating that it cannot open a connection to x. I also have to run a tty5 to restart gdm before i get a display from cosmic, otherwise it loads to a black screen with no cursor. My system runs on an amd 5700x cpu with an nvidia rtx 2070 My xwayland policy is: xwayland: Installed: 2:24.1.0-1pop1~1716447027~22.04~eb750bb Candidate: 2:24.1.0-1pop1~1716447027~22.04~eb750bb Version table: *** 2:24.1.0-1pop1~1716447027~22.04~eb750bb 1001 1001 http://apt.pop-os.org/release jammy/main amd64 Packages 100 /var/lib/dpkg/status 2:22.1.1-1ubuntu0.13 500 500 http://apt.pop-os.org/ubuntu jammy-security/main amd64 Packages 500 http://apt.pop-os.org/ubuntu jammy-updates/main amd64 Packages 2:22.1.1-1 500 500 http://apt.pop-os.org/ubuntu jammy/main amd64 Packages

ported-pw commented 5 months ago

@avatar4d @boderg Pretty sure your problem is different from mine, I was talking about XWayland just not working entirely, only window decorations being shown.

ported-pw commented 5 months ago

I've now made sure to downgrade and reinstall all packages that were installed from popdev:master, and double-checked both config files again, but I still cannot select any options in GDM anymore. How can I debug this, are there any specific log files to look at?

This is what journalctl -u gdm looks like for one boot and login:

Jun 06 12:20:14 pop-os systemd[1]: Starting GNOME Display Manager...
Jun 06 12:20:14 pop-os systemd[1]: Started GNOME Display Manager.
Jun 06 12:20:14 pop-os gdm-launch-environment][2183]: pam_unix(gdm-launch-environment:session): session opened for user gdm(uid=111) by (uid=0)
Jun 06 12:20:17 pop-os gdm3[1984]: Gdm: GdmDisplay: Session never registered, failing
Jun 06 12:20:17 pop-os gdm3[1984]: Gdm: GdmDisplay: Session never registered, failing
Jun 06 12:20:17 pop-os gdm-launch-environment][4709]: pam_unix(gdm-launch-environment:session): session opened for user gdm(uid=111) by (uid=0)
Jun 06 12:21:17 pop-os gdm-password][6911]: gkr-pam: unable to locate daemon control file
Jun 06 12:21:17 pop-os gdm-password][6911]: gkr-pam: stashed password to try later in open session
Jun 06 12:21:17 pop-os gdm-password][6911]: pam_unix(gdm-password:session): session opened for user <user>(uid=1000) by (uid=0)
Jun 06 12:21:17 pop-os gdm-password][6911]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
Jun 06 12:21:24 pop-os gdm3[1984]: Gdm: Child process -5290 was already dead.
avatar4d commented 5 months ago

screenshot-2024-06-06-13-52-08

@ported-pw
The screenshot shortcut didn't work for me (perhaps the key combo changed?), but I was able to use the app launcher to search for and start the Cosmic screenshot tool to take a picture. It sounds like the same problem to me, but happy to open another issue if this is different.

ported-pw commented 5 months ago

Hmm yeah that looks the same as it did for me. I was unable to take a screenshot even searching for the tool though (it didn't open), but I was also unable to re-test since I opened the issue since the GDM option to actually switch to COSMIC is gone for me and I don't really know why.

boderg commented 5 months ago

@avatar4d @boderg Pretty sure your problem is different from mine, I was talking about XWayland just not working entirely, only window decorations being shown.

They may not be exactly the same but I think the issues are related. I have also had the missing gdm entries and a black screen on login. The only fix I could find for the missing gdm entries and black screen was to open a tty5 (tty3 didn't work) and do a sudo systemctl restart gdm. This brings back the missing entries and also allows login to cosmic where then if I open certain apps they appear ok until usage, then they disappear leaving only window decorations which then will not close. The fact that steam also won't open and throws an x connection error would appear to indicate an xwayland issue.

boderg commented 5 months ago

Here is a screenshot with vscode and firefox both open. Firefox has completely blanked out and vscode is window decorations only.

screenshot-2024-06-07-06-50-38

Arigato-Scientisto commented 5 months ago

I have the same Problem as @avatar4d

mdinsmore commented 5 months ago

Some comments on here mentioned chromium based browsers like brave - The chromium project does have the option to run in 'Wayland mode' as described here (article refers to Arch but works on Pop!_OS too) : https://pychao.com/2021/01/04/using-google-chrome-chromium-with-native-wayland-backend-in-arch-linux/

As I still also run the gnome plugin version of cosmic, I copied the desktop file e.g. for the Brave browser brave-browser.desktop from /usr/share/applications/ to ~/.local/share/applications/ and edited to include the --enable-features=UseOzonePlatform --ozone-platform=wayland parameters on the end of the Exec= line, which allows Brave to works on cosmic DE (this will create a new option on the applications menu called "Brave Web Browser (local)" - I then pinned this to the dock for Cosmic DE. This works for vscode and google chrome as well.

This obviously does not fix the issue with XWayland (which was still in the version of Cosmic DE from the Pop!_OS repos a at the beginning of June) but hopefully provides a work around for some.

avatar4d commented 5 months ago

@mdinsmore Thanks for the suggestion. Clearly this is still a bug, but running directly under Wayland via Ozone certainly seems to solve the problem. Signal unfortunately has a minor annoyance: it doesn't show the window upon starting the app unless you add the --use-tray-icon flag and then click on the tray icon to click on Show Window.

avatar4d commented 5 months ago

Note: this Ozone workaround is not required when running Gnome-based Pop Shell under Wayland/XWayland

ported-pw commented 5 months ago

This issue is specifically not about how to get applications running on Wayland natively, but that the ones that do not don't work because XWayland is broken.

avatar4d commented 5 months ago

Right, and they run fine on XWayland under Gnome+PopShell is what I am saying. Not sure why they are failing under Cosmic DE.

~> echo $XDG_SESSION_TYPE wayland

~> xlsclients pop gsd-xsettings pop ibus-x11 pop gnome-shell pop brave pop signal-desktop

GwenDRSutton commented 5 months ago

This has affected me as well, both Discord and Caprine, which are electron users and therefor Xwayland, will blank out, becoming transparent except the borders. I will try upgrading xwayland and seeing if that helps.

Edit: Version number XWayland 24.1 update from popdev:maste, so look slike I already have the 24.1 update. and it's still affecting me.

Edit2: it happens most when I try scrolling with my mousewheel. In fact, at one point, I had both discord and caprine open, discord focused, and scrolled down. Immediately and simultaneously, (like split second timing), both apps went transparent.

Also, they click through, you can't interact with things blindly, you just click the desktop.

limflag commented 4 months ago

this issue is still happening, but it seems to be related to the mouse input itself, when scrolling using the touchpad the windows stays normal

ry755 commented 4 months ago

I had this issue as well (despite already running xwayland 24.1) but it seems to be fixed for me after upgrading to popdev:master. Will do more testing to make sure it is actually fixed and not just a fluke.

Arigato-Scientisto commented 4 months ago

popdev:master works for me to

avatar4d commented 4 months ago

Confirmed this appears resolved with popdev:master versions

Rajeev1503 commented 3 months ago

what is popdev master and how to upgrade as i am also facing the crashing problem upon mouse scroll @avatar4d help needed!

avatar4d commented 3 months ago

It’s where to get development versions of Pop software. I wouldn’t recommend using it if you aren’t familiar with managing apt/Debian-based systems. Use at your own risk. The paint can still be very wet.

zsilet commented 3 months ago

Just installed cosmic-epoch (not from popdev master) and can confirm the same problem where scrolling via mouse wheel causes all chromium-based apps to go blank. Scrolling every other way seems to work fine.

mmstick commented 3 months ago

@zsilet If you're using the submodules from the cosmic-epoch repository, make sure to recursively update all submodules before compiling. Then you'll have the most recent updates.

luccahuguet commented 3 months ago

what is popdev master and how to upgrade as i am also facing the crashing problem upon mouse scroll @avatar4d help needed!

sudo apt-manage add popdev:master
sudo apt update
sudo apt dist-upgrade
luccahuguet commented 3 months ago

this bug was awful, I'm so glad it does not happen anymore. |

it stopped happening as soon as i ran the commands above

zsilet commented 3 months ago

@luccahuguet @mmstick thank you both, updated and it's working!

baaannnaaannn commented 3 months ago

Same problem here

zsilet commented 3 months ago

@baaannnaaannn , have you tried updating from popdev:master (as instructed by @luccahuguet 's post on Jul 17th). I ask because updating as he indicated immediately fixed the issue for me (whereas it was 100% reproducible, making the whole thing pretty much unusable for me before the update).

baaannnaaannn commented 3 months ago

@baaannnaaannn , have you tried updating from popdev:master (as instructed by @luccahuguet 's post on Jul 17th). I ask because updating as he indicated immediately fixed the issue for me (whereas it was 100% reproducible, making the whole thing pretty much unusable for me before the update).

Same here That update fixed for me that bug

luccahuguet commented 3 months ago

Cool

Now what about @ported-pw did you manage to fix it?

ported-pw commented 3 months ago

Now what about @ported-pw did you manage to fix it?

I'm still unable to confirm or deny due to not being able to select COSMIC in GDM, asked in detail here: https://chat.pop-os.org/pop-os/pl/8u3ou3fhmtd8jmebj9bpxepp1r

luccahuguet commented 3 months ago

Now what about @ported-pw did you manage to fix it?

I'm still unable to confirm or deny due to not being able to select COSMIC in GDM, asked in detail here: https://chat.pop-os.org/pop-os/pl/8u3ou3fhmtd8jmebj9bpxepp1r

I see... (thanks for the link btw, lots of activity there it seems)

did you try using https://github.com/pop-os/cosmic-greeter?

Drakulix commented 3 months ago

Now what about @ported-pw did you manage to fix it?

I'm still unable to confirm or deny due to not being able to select COSMIC in GDM, asked in detail here: https://chat.pop-os.org/pop-os/pl/8u3ou3fhmtd8jmebj9bpxepp1r

Have you enabled wayland-sessions by editing your gdm config?

Android789515 commented 3 months ago

I had this issue as well (despite already running xwayland 24.1) but it seems to be fixed for me after upgrading to popdev:master. Will do more testing to make sure it is actually fixed and not just a fluke.

Thank you. Works for me, too. See https://github.com/pop-os/cosmic-epoch/issues/349#issuecomment-2233940067 for how to use popdev:master.