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

cosmic-comp 8 times out of 10 panics at startup #504

Closed
gabriele2000 opened this issue May 24, 2024 · 10 comments
Closed

cosmic-comp 8 times out of 10 panics at startup #504

gabriele2000 opened this issue May 24, 2024 · 10 comments

Comments

@gabriele2000
Copy link

gabriele2000 commented May 24, 2024

Laptop.

  • GPU: Nvidia GTX1050TI + Intel UHD630

journalctl shows this notable stuff:

mag 24 19:17:04 msi-gp72m cosmic-comp[1187]: thread 'main' panicked at 'IndexMap: index out of bounds': src/shell/mod.rs:841
                                                0: <unknown>
                                                1: <unknown>
                                                2: <unknown>
                                                3: <unknown>
                                                4: <unknown>
                                                5: <unknown>
                                                6: <unknown>
                                                7: <unknown>
                                                8: <unknown>
                                                9: <unknown>
                                               10: <unknown>
                                               11: <unknown>
                                               12: <unknown>
                                               13: <unknown>
                                               14: <unknown>
                                               15: <unknown>
                                               16: __libc_start_call_main
                                                          at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
                                               17: __libc_start_main_impl
                                                          at ./csu/../csu/libc-start.c:392:3
                                               18: <unknown>
mag 24 19:17:04 msi-gp72m cosmic-session[1152]: process ' COSMIC_SESSION_SOCK=12 cosmic-comp ' failed with code 101
mag 24 19:17:04 msi-gp72m cosmic-session[1152]: cosmic-comp exited with error code 101
mag 24 19:17:04 msi-gp72m /usr/libexec/gdm-wayland-session[1152]: 2024-05-24T17:17:04.332971Z ERROR launch_pad: process ' COSMIC_SESSION_SOCK=12 cosmic-comp ' failed with code 101
mag 24 19:17:04 msi-gp72m /usr/libexec/gdm-wayland-session[1152]: 2024-05-24T17:17:04.332999Z ERROR cosmic_session::comp: cosmic-comp exited with error code 101
mag 24 19:17:04 msi-gp72m /usr/libexec/gdm-wayland-session[1152]: 2024-05-24T17:17:04.333012Z  INFO launch_pad: draining stdin receiver before restarting process
mag 24 19:17:04 msi-gp72m /usr/libexec/gdm-wayland-session[1152]: 2024-05-24T17:17:04.333043Z  INFO launch_pad: sleeping for 0ms before restarting process cosmic-comp (restart 0)
mag 24 19:17:04 msi-gp72m cosmic-session[1152]: draining stdin receiver before restarting process
mag 24 19:17:04 msi-gp72m cosmic-session[1152]: sleeping for 0ms before restarting process cosmic-comp (restart 0)
mag 24 19:17:04 msi-gp72m cosmic-session[1152]: restarted process ' COSMIC_SESSION_SOCK=12 cosmic-comp ', now at 1 restarts
mag 24 19:17:04 msi-gp72m cosmic-session[1152]: process 'ProcessKey(1v1)' cancelled
mag 24 19:17:04 msi-gp72m /usr/libexec/gdm-wayland-session[1152]: 2024-05-24T17:17:04.334598Z  INFO launch_pad: restarted process ' COSMIC_SESSION_SOCK=12 cosmic-comp ', now at 1 restarts
mag 24 19:17:04 msi-gp72m /usr/libexec/gdm-wayland-session[1152]: 2024-05-24T17:17:04.334649Z  INFO launch_pad: process 'ProcessKey(1v1)' cancelled

I understand the basics of the basics of rust, but english? This, I can understand.

In line 841 there's a reference on workspaces.
I think cosmic-comp is trying to remove what hasn't been created yet, workspaces "in between" since the default are two workspaces.

1 is active, 2 is being created dinamically.

I believe #268 (c0f7524) is the culprit.

@Yemi-1020
Copy link

I have also come across this. Currently makes it impossible to start a session in COSMIC the majority of the time with few instances where I can, usually when I already logged into the old Gnome Desktop then logout and then login into COSMIC.

Also attempted this again after reinstalling the desktop to make it's nothing I've changed and the issue still occurred.

@Drakulix
Copy link
Member

Please delete .config/cosmic/com.system76.CosmicComp/v1/workspaces

@gabriele2000
Copy link
Author

gabriele2000 commented Jul 11, 2024

Please delete .config/cosmic/com.system76.CosmicComp/v1/workspaces

That fixed the problem.
Related: using cosmic-greeter as session manager fails with this

lug 11 13:01:13 msi-gp72m cosmic-comp[1172]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })': src/config/mod.rs:173
                                                0: <unknown>
                                                1: <unknown>
                                                2: <unknown>
                                                3: <unknown>
                                                4: <unknown>
                                                5: <unknown>
                                                6: <unknown>
                                                7: <unknown>
                                                8: <unknown>
                                                9: <unknown>
                                               10: <unknown>
                                               11: <unknown>
                                               12: <unknown>
                                               13: __libc_start_call_main
                                                          at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
                                               14: __libc_start_main_impl
                                                          at ./csu/../csu/libc-start.c:392:3
                                               15: <unknown>

@Drakulix
Copy link
Member

Related: using cosmic-greeter as session manager fails with this

lug 11 13:01:13 msi-gp72m cosmic-comp[1172]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })': src/config/mod.rs:173

Not related, this looks like a misconfiguration on your side. It looks like cosmic-comp isn't allowed access to the greeter-user's home-directory.

@gabriele2000
Copy link
Author

Related: using cosmic-greeter as session manager fails with this

lug 11 13:01:13 msi-gp72m cosmic-comp[1172]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })': src/config/mod.rs:173

Not related, this looks like a misconfiguration on your side. It looks like cosmic-comp isn't allowed access to the greeter-user's home-directory.

How can I fix it?
I should delete a config file, right?

@Drakulix
Copy link
Member

Related: using cosmic-greeter as session manager fails with this

lug 11 13:01:13 msi-gp72m cosmic-comp[1172]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })': src/config/mod.rs:173

Not related, this looks like a misconfiguration on your side. It looks like cosmic-comp isn't allowed access to the greeter-user's home-directory.

How can I fix it? I should delete a config file, right?

No, that is a deeper distro integration issue. greetd needs a user-account and that user-account needs to have a home directory for cosmic-greeter and that needs to have the right unix permissions. If your distro doesn't set this up properly, when installing greetd or if you have messed with the user or it's home dir, then this issue would appear.

@gabriele2000
Copy link
Author

No, that is a deeper distro integration issue. greetd needs a user-account and that user-account needs to have a home directory for cosmic-greeter and that needs to have the right unix permissions. If your distro doesn't set this up properly, when installing greetd or if you have messed with the user or it's home dir, then this issue would appear.

The funny thing is that I'm using Pop_Os and I don't think I've messed up enough things in my home directory.
Is there something that I can do to "repair" the damage?

@Drakulix
Copy link
Member

The funny thing is that I'm using Pop_Os and I don't think I've messed up enough things in my home directory.

It's not your home directory, the greeter-daemon has it's own user and home dir.
@jackpot51 Any ideas?

@gabriele2000
Copy link
Author

This issue still happens; I'm now on Pop!_Os 24.04.
I shall print the full error message, just to be sure.

ott 24 01:10:05 msi-gp72m wireplumber[1679]: failed to create directory /home/cosmic-greeter/.local/state/wireplumber: Permission denied
ott 24 01:10:05 msi-gp72m wireplumber[1679]: SPA handle 'api.libcamera.enum.manager' could not be loaded; is it installed?
ott 24 01:10:05 msi-gp72m wireplumber[1679]: PipeWire's libcamera SPA missing or broken. libcamera not supported.
ott 24 01:10:05 msi-gp72m wireplumber[1679]: failed to create directory /home/cosmic-greeter/.local/state/wireplumber: Permission denied
ott 24 01:10:05 msi-gp72m wireplumber[1679]: failed to create directory /home/cosmic-greeter/.local/state/wireplumber: Permission denied
ott 24 01:10:05 msi-gp72m wireplumber[1679]: failed to create directory /home/cosmic-greeter/.local/state/wireplumber: Permission denied
ott 24 01:10:05 msi-gp72m rtkit-daemon[1718]: Successfully made thread 1679 of process 1679 owned by '996' high priority at nice level -11.
ott 24 01:10:05 msi-gp72m rtkit-daemon[1718]: Supervising 1 threads of 1 processes of 1 users.
ott 24 01:10:05 msi-gp72m rtkit-daemon[1718]: Successfully made thread 1688 of process 1688 owned by '996' high priority at nice level -11.
ott 24 01:10:05 msi-gp72m rtkit-daemon[1718]: Supervising 2 threads of 2 processes of 1 users.
ott 24 01:10:05 msi-gp72m rtkit-daemon[1718]: Successfully made thread 1721 of process 1688 owned by '996' RT at priority 20.
ott 24 01:10:05 msi-gp72m rtkit-daemon[1718]: Supervising 3 threads of 2 processes of 1 users.
ott 24 01:10:05 msi-gp72m rtkit-daemon[1718]: Successfully made thread 1676 of process 1676 owned by '996' high priority at nice level -11.
ott 24 01:10:05 msi-gp72m rtkit-daemon[1718]: Supervising 4 threads of 3 processes of 1 users.
ott 24 01:10:05 msi-gp72m rtkit-daemon[1718]: Successfully made thread 1719 of process 1676 owned by '996' RT at priority 20.
ott 24 01:10:05 msi-gp72m rtkit-daemon[1718]: Supervising 5 threads of 3 processes of 1 users.
ott 24 01:10:05 msi-gp72m rtkit-daemon[1718]: Successfully made thread 1727 of process 1679 owned by '996' RT at priority 20.
ott 24 01:10:05 msi-gp72m rtkit-daemon[1718]: Supervising 6 threads of 3 processes of 1 users.
ott 24 01:10:05 msi-gp72m cosmic-comp[1678]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })': src/config/mod.rs:156
                                                0: <unknown>
                                                1: <unknown>
                                                2: <unknown>
                                                3: <unknown>
                                                4: <unknown>
                                                5: <unknown>
                                                6: <unknown>
                                                7: <unknown>
                                                8: <unknown>
                                                9: <unknown>
                                               10: <unknown>
                                               11: <unknown>
                                               12: <unknown>
                                               13: __libc_start_call_main
                                                          at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
                                               14: __libc_start_main_impl
                                                          at ./csu/../csu/libc-start.c:360:3
                                               15: <unknown>
ott 24 01:10:05 msi-gp72m greetd[1635]: pam_unix(cosmic-greeter:session): session closed for user cosmic-greeter
ott 24 01:10:05 msi-gp72m greetd[1631]: error: check_children: greeter exited without creating a session
ott 24 01:10:05 msi-gp72m systemd[1]: session-2.scope: Deactivated successfully.
ott 24 01:10:05 msi-gp72m systemd-logind[891]: Session 2 logged out. Waiting for processes to exit.
ott 24 01:10:05 msi-gp72m systemd[1]: cosmic-greeter.service: Deactivated successfully.
ott 24 01:10:05 msi-gp72m systemd-logind[891]: Removed session 2.

@gabriele2000
Copy link
Author

I FIXED IT YEAH!

Here's how.
A lot of stuff was broken on flatpak apps, so I figured out that dbus was the culprit.
I stopped it, started it, everything was fixed until the next reboot.

Since cosmic-greeter wasn't working (the panic stuff, access denied) I was using emptty to log-in.
Turns out that cosmic-greeter apparently starts dbus and connects it to the various services, so that prompted me to figure out how to finally fix cosmic-greeter.

It relies on greetd, so I purged both cosmic-greeter and greetd, then reinstalled them.
dpkg said that user "greeter" and "cosmic-greeter" were already present, so I removed them, purged and reinstalled the packages again, they created the users with correct permissions.

I restarted the computer, boom everything's fine!
Fonts on flatpaks are now perfect, icons aren't missing, the giant pointer isn't an issue anymore!

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

3 participants