pop-os / cosmic-comp

Compositor for the COSMIC desktop environment
GNU General Public License v3.0
476 stars 85 forks source link

Missing X server or $DISPLAY #591

Closed luccahuguet closed 3 months ago

luccahuguet commented 3 months ago

A lot of app are not working apparently because the $DISPLAY is missing

what works:

What does not work:

the error message:

❯ brave-browser
[25189:25189:0701/185224.352771:ERROR:ozone_platform_x11.cc(244)] Missing X server or $DISPLAY
[25189:25189:0701/185224.352802:ERROR:env.cc(258)] The platform failed to initialize.  Exiting.

My system: screenshot-2024-07-01-21-55-51

the gpu: nvidia 940MX

luccahuguet commented 3 months ago

if I try to run cosmic-comp on the terminal:

❯ cosmic-comp
2024-07-01T22:18:09.353271Z ERROR cosmic_comp::config: Failed to read config 'workspaces' err=NoConfigDirectory
2024-07-01T22:18:09.353745Z  WARN cosmic_comp::config::types: Key-Binding 'Period' only matched case insensitive for "period"
2024-07-01T22:18:09.353784Z  WARN cosmic_comp::config::types: Key-Binding 'Comma' only matched case insensitive for "comma"
2024-07-01T22:18:09.353812Z  WARN cosmic_comp::config::types: Key-Binding 'Period' only matched case insensitive for "period"
2024-07-01T22:18:09.353836Z  WARN cosmic_comp::config::types: Key-Binding 'Comma' only matched case insensitive for "comma"

and it opens a grey window

luccahuguet commented 3 months ago

it would appear this also works

~
❯ $env.DISPLAY = WAYLAND
❯ brave-browser
Opening in existing browser session.
Drakulix commented 3 months ago

If you just open cosmic-comp, there is no way it could set a DISPLAY variable (or WAYLAND_DISPLAY for that matter). That functionality is provided by cosmic-session. You should select cosmic from your display manager. Also make sure xwayland is installed otherwise it also won't work.

If you still have issues please post the output of journalctl --user _COMM=cosmic-comp.

luccahuguet commented 3 months ago

If you just open cosmic-comp, there is no way it could set a DISPLAY variable (or WAYLAND_DISPLAY for that matter). That functionality is provided by cosmic-session. You should select cosmic from your display manager. Also make sure xwayland is installed otherwise it also won't work.

yeah, please disregard that, that was not-smart of me

If you still have issues please post the output of journalctl --user _COMM=cosmic-comp.

jul 01 19:45:57 pop-os cosmic-comp[4571]: Failed to update Xwm stacking order.
jul 01 19:45:57 pop-os cosmic-comp[4571]: Failed to update Xwm stacking order.
jul 01 19:45:57 pop-os cosmic-comp[4571]: Failed to update Xwm stacking order.
...skipping...
jul 01 20:28:22 pop-os cosmic-comp[4667]: Failed to update Xwm stacking order.
jul 01 20:28:22 pop-os cosmic-comp[4667]: Failed to update Xwm stacking order.
jul 01 20:28:22 pop-os cosmic-comp[4667]: Failed to update Xwm stacking order.
jul 01 20:28:22 pop-os cosmic-comp[4667]: Failed to update Xwm stacking order

additional info:

and I did follow the instructions in https://github.com/pop-os/cosmic-epoch#installing-on-pop_os

How do I install xwayland?

i'll try to reinstall cosmic-session though

mmstick commented 3 months ago

You have to either select COSMIC on the login screen, or run cosmic-session from a TTY.

luccahuguet commented 3 months ago

You have to either select COSMIC on the login screen, or run cosmic-session from a TTY.

ok, then I surely did that, since I selected COSMIC from the login screen

luccahuguet commented 3 months ago

additional info: everything works fine for like 5 minutes, only then the bug appears

mmstick commented 3 months ago

It may be worth adding the staging repository if you don't already have it.

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

It may be worth adding the staging repository if you don't already have it.

sudo apt-manage add popdev:master
sudo apt update
sudo apt dist-upgrade

ok, I did that and restarted the laptop. It's been like 10 minutes, and things haven't crashed yet, remarkably. whatever it was might've been fixed.

I'll update this message in an hour or if it breaks

luccahuguet commented 3 months ago

I am calling it: The bug is fixed.

I hope I'm not wrong.

last question: I just migrated to staging right? how do I go back to stable cosmic?

btw, if someone runs into this again, I think it had something to with electron or webGL

luccahuguet commented 3 months ago

ok, the issue can be closed now. The odds of the bug resurfacing are very slim, I think.

Thank you so much! This bug has been bothering me for about two months, something like that

one last thing:

last question: I just migrated to staging right? how do I go back to stable cosmic?

Drakulix commented 3 months ago

last question: I just migrated to staging right? how do I go back to stable cosmic?

sudo apt-manage remove popdev-master

luccahuguet commented 3 months ago

last question: I just migrated to staging right? how do I go back to stable cosmic?

sudo apt-manage remove popdev-master

thanks.