rharish101 / ReGreet

Clean and customizable greeter for greetd
GNU General Public License v3.0
390 stars 16 forks source link

ReGreet takes up to 30 seconds before showing up #39

Closed pescepalla closed 10 months ago

pescepalla commented 1 year ago

I was a happy ReGreet user until yesterday morning, when it started acting up and now it drops me in a black screen for up to 30 seconds before the greeter shows up.

Here's my config:

$ cat /etc/greetd/config.toml
[terminal]
vt = 1

[default_session]
command = "cage -s -- regreet"
user = "greeter"

$ cat /etc/greetd/regreet.toml
[background]
path = "/usr/local/share/backgrounds/2560x1440-cityscape.jpg"
fit = "Cover"

[env]

[GTK]
application_prefer_dark_theme = true
cursor_theme_name = "Adwaita"
font_name = "Cantarell 20"
icon_theme_name = "Adwaita"
theme_name = "Adwaita"

[commands]
reboot = [ "off", "-r" ]
poweroff = [ "off", "" ]

And here's the output of journalctl:

$ journalctl -xeu greetd
Sep 02 13:29:18 stellaris greetd[677]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: Specific(1), switch: true }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run" }, default_session: ConfigSession { command: "cage -s -- regreet", user: "greeter" },
Sep 02 13:29:18 stellaris greetd[677]:  initial_session: None }, internal: ConfigInternal { session_worker: 0 } }
Sep 02 13:29:18 stellaris systemd[1]: Started Greeter daemon.
░░ Subject: A start job for unit greetd.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit greetd.service has finished successfully.
░░ 
░░ The job identifier is 111.
Sep 02 13:29:18 stellaris greetd[679]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run" }, default_session: ConfigSession { command: "", user: "" }, initial_session: None }, internal: ConfigInternal { session_worker: 11 } }
Sep 02 13:29:18 stellaris greetd[679]: pam_unix(greetd:session): session opened for user greeter(uid=971) by greeter(uid=0)
Sep 02 13:29:58 stellaris greetd[1202]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run" }, default_session: ConfigSession { command: "", user: "" }, initial_session: None }, internal: ConfigInternal { session_worker: 12 } }
Sep 02 13:30:02 stellaris greetd[1202]: pam_unix(greetd:session): session opened for user alessandro(uid=1000) by alessandro(uid=0)

For context, my setup uses polkit and I regret I need NVIDIA drivers. Launching regreet through sway instead of cage works.

$ uname -r
6.4.12-arch1-1

$ pacman -Q greetd
greetd 0.9.0-3

$ pacman -Q greetd-regreet
greetd-regreet 0.1.1-1
pescepalla commented 1 year ago

And here's the output from regreet -l debug:

2023-09-03T17:56:35.212240111+02:00 DEBUG regreet::sysutil: UID_MIN: 1000, UID_MAX: 60000
2023-09-03T17:56:35.212300593+02:00 DEBUG regreet::sysutil: Found user 'alessandro' with UID '1000' and empty full name
2023-09-03T17:56:35.212313095+02:00 DEBUG regreet::sysutil: Found user 'zoe' with UID '1001' and empty full name
2023-09-03T17:56:35.213071851+02:00 DEBUG regreet::sysutil: Checking session directory: /usr/share/xsessions
2023-09-03T17:56:35.21322634+02:00  INFO regreet::sysutil: Now scanning session file: /usr/share/xsessions/xfce.desktop
2023-09-03T17:56:35.213457794+02:00 DEBUG regreet::sysutil: Found name 'Xfce Session' for session: /usr/share/xsessions/xfce.desktop
2023-09-03T17:56:35.213470295+02:00 DEBUG regreet::sysutil: Checking session directory: /usr/share/wayland-sessions
2023-09-03T17:56:35.21363086+02:00  INFO regreet::sysutil: Now scanning session file: /usr/share/wayland-sessions/hyprland.desktop
2023-09-03T17:56:35.21407114+02:00 DEBUG regreet::sysutil: Found name 'Hyprland' for session: /usr/share/wayland-sessions/hyprland.desktop
2023-09-03T17:56:35.214083013+02:00  INFO regreet::sysutil: Now scanning session file: /usr/share/wayland-sessions/sway.desktop
2023-09-03T17:56:35.214271514+02:00 DEBUG regreet::sysutil: Found name 'Sway' for session: /usr/share/wayland-sessions/sway.desktop
2023-09-03T17:56:35.215160035+02:00  INFO regreet::tomlutils: Loaded TOML file: /var/cache/regreet/cache.toml
2023-09-03T17:56:35.215606112+02:00  INFO regreet::tomlutils: Loaded TOML file: /etc/greetd/regreet.toml
2023-09-03T17:56:35.251799472+02:00  INFO regreet::client: Cancelling greetd session
2023-09-03T17:56:35.304204392+02:00 DEBUG choose_monitor{display_name="wayland-0"}: regreet::gui::model: Found monitor: Monitor
2023-09-03T17:56:35.712725558+02:00 DEBUG regreet::gui::component: Setting dark theme: true
2023-09-03T17:56:35.728744914+02:00 DEBUG regreet::gui::component: Setting cursor theme: Adwaita
2023-09-03T17:56:35.728767892+02:00 DEBUG regreet::gui::component: Setting font: Cantarell 18
2023-09-03T17:56:35.728806374+02:00 DEBUG regreet::gui::component: Setting icon theme: Adwaita
2023-09-03T17:56:35.728811123+02:00 DEBUG regreet::gui::component: Setting theme: Adwaita
2023-09-03T17:56:35.736688173+02:00 DEBUG regreet::gui::component: Found user: alessandro
2023-09-03T17:56:35.736848947+02:00 DEBUG regreet::gui::component: Found user: zoe
2023-09-03T17:56:35.736881424+02:00 DEBUG regreet::gui::component: Found session: Xfce Session
2023-09-03T17:56:35.736953989+02:00 DEBUG regreet::gui::component: Found session: Hyprland
2023-09-03T17:56:35.736981157+02:00 DEBUG regreet::gui::component: Found session: Sway
2023-09-03T17:56:35.737065455+02:00 DEBUG update_with_view{input=UserChanged(UserSessInfo { user_id: Some("alessandro"), user_text: "", sess_id: None, sess_text: "" }) component="regreet::gui::model::Greeter" id="0x7fff52107f50"}: regreet::gui::component: Got input message: UserChanged(UserSessInfo { user_id: Some("alessandro"), user_text: "", sess_id: None, sess_text: "" })
2023-09-03T17:56:35.737075582+02:00 DEBUG update_with_view{input=UserChanged(UserSessInfo { user_id: Some("alessandro"), user_text: "", sess_id: None, sess_text: "" }) component="regreet::gui::model::Greeter" id="0x7fff52107f50"}:user_change_handler: regreet::gui::model: Retrieved username 'alessandro' from options
rharish101 commented 1 year ago

For context, my setup uses polkit and I regret I need NVIDIA drivers. Launching regreet through sway instead of cage works.

You mean ReGreet starts up fast if you're using Sway, and takes up to 30s when using Cage?

pescepalla commented 1 year ago

Yes. I've pinned it down to xdg-desktop-portal.

See https://github.com/flatpak/xdg-desktop-portal/issues/1115

When xdg-desktop-portal is uninstalled, I can use cage with regreet.

pescepalla commented 10 months ago

Solved upstream with release of xdg-desktop-portal 0.18.2