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

Huge slowness #3

Open
Limones-07 opened this issue Oct 4, 2022 · 19 comments
Open

Huge slowness #3

Limones-07 opened this issue Oct 4, 2022 · 19 comments

Comments

@Limones-07
Copy link

I've been using sea-greeter for some time, and it works flawlessly, congrats. :)
But it is slow as hell to load up on boot. It boots and I have to wait like, 10 to 20 seconds to the theme finally pop up, and it's kind of annoying. Do you have any clue of what is causing this? (If you could upload this greeter to the AUR it would be insane, would be so much easier to update lol.)

@JezerM
Copy link
Owner

JezerM commented Oct 5, 2022

Hmm, I think it could be either LightDM being slow at startup (I don't think so), or perhaps other services that slow down or delay the startup of LightDM. I've run this greeter on a pretty low powered PC (a 2014 Intel Celeron with integrated graphics), and 10 seconds is the most it takes to start the theme in VoidLinux when LightDM service is started.

Also, I have some questions: these 10 to 20 seconds is the total time from boot to sea-greeter? Or is it from when Linux would prompt you to login in TTY (or when the LightDM service is initiated) until sea-greeter? Does another LightDM greeter like lightdm-gtk-greeter or web-greeter display faster than sea-greeter?

About the AUR, it could be considered when I fix the remaining bugs and completed the features~

@Limones-07
Copy link
Author

Also, I have some questions: these 10 to 20 seconds is the total time from boot to sea-greeter? Or is it from when Linux would prompt you to login in TTY (or when the LightDM service is initiated) until sea-greeter? Does another LightDM greeter like lightdm-gtk-greeter or web-greeter display faster than sea-greeter?

When Linux would prompt me to login in TTY. When it should happen, we count 28 seconds (time the greeter took to show up on the last boot I did) and the greeter appears. I tested lightdm-gtk-greeter, and it runs as fast as it should.

@JezerM
Copy link
Owner

JezerM commented Oct 6, 2022

Ok, I will look into that. Also, can you provide the sea-greeter's log at /var/log/lightdm/seat0-greeter.log?

@Limones-07
Copy link
Author

Limones-07 commented Oct 6, 2022

Ok, I will look into that. Also, can you provide the sea-greeter's log at /var/log/lightdm/seat0-greeter.log?

/etc/lightdm/Xgreeter: linha 5: xsetroot: comando não encontrado
** Message: 17:42:43.508: Starting lightdm-gtk-greeter 2.0.8 (Sep  6 2022, 14:12:08)
** Message: 17:42:43.511: [Configuration] Reading file: /etc/lightdm/lightdm-gtk-greeter.conf

(lightdm-gtk-greeter:694): Gtk-WARNING **: 17:42:43.778: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node menubar owner GreeterMenuBar)

(lightdm-gtk-greeter:694): Gtk-WARNING **: 17:42:50.750: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node menubar owner GreeterMenuBar)

(lightdm-gtk-greeter:694): Gtk-WARNING **: 17:42:52.635: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node menubar owner GreeterMenuBar)

(lightdm-gtk-greeter:694): Gtk-WARNING **: 17:42:52.820: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node menubar owner GreeterMenuBar)

(lightdm-gtk-greeter:694): Gtk-WARNING **: 17:42:52.836: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node menubar owner GreeterMenuBar)

@JezerM
Copy link
Owner

JezerM commented Oct 7, 2022

I meant, actually, to show sea-greeter's log. Set your session-greeter as sea-greeter, restart the LightDM service, wait until sea-greeter is presented, log in, and provide the log at /var/log/lightdm/seat0-greeter.log

@Limones-07
Copy link
Author

Limones-07 commented Oct 9, 2022

I meant, actually, to show sea-greeter's log. Set your session-greeter as sea-greeter, restart the LightDM service, wait until sea-greeter is presented, log in, and provide the log at /var/log/lightdm/seat0-greeter.log

Wrong file 💀.
Actual /var/log/lightdm/seat0-greeter.log:

/etc/lightdm/Xgreeter: linha 5: xsetroot: comando não encontrado
2022-10-08 20:28:10 [ DEBUG ] settings.c 398: Configuration loaded
2022-10-08 20:28:35 [ DEBUG ] lightdm.c 735: LightDM API connected
2022-10-08 20:28:36 [ DEBUG ] greeter.c 37: Extension initialized
2022-10-08 20:28:36 [ DEBUG ] theme.c 259: Theme loaded
2022-10-08 20:28:36 [ DEBUG ] browser-web-view.c 124: Sea greeter started win: 1

If you need, /var/log/lightdm/lightdm.log:

[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.32.0, UID=0 PID=617
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /var/lib/flatpak/exports/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /etc/xdg/lightdm/lightdm.conf.d/90-greeter-wrapper.conf
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf.d/20-optimus-manager.conf
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Registered seat module local
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.00s] DEBUG: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
[+0.00s] DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
[+0.00s] DEBUG: Monitoring logind for seats
[+0.00s] DEBUG: New seat added from logind: seat0
[+0.00s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.00s] DEBUG: Seat seat0 has property CanMultiSession=no
[+0.00s] DEBUG: Seat seat0: Starting
[+0.00s] DEBUG: Seat seat0: Creating greeter session
[+0.00s] DEBUG: Seat seat0: Creating display server of type x
[+0.01s] DEBUG: Seat seat0: Plymouth is running on VT 1, but this is less than the configured minimum of 7 so not replacing it
[+0.01s] DEBUG: Quitting Plymouth
[+0.08s] DEBUG: Using VT 7
[+0.08s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.08s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.08s] DEBUG: XServer 0: Writing X server authority to /run/lightdm/root/:0
[+0.08s] DEBUG: XServer 0: Launching X Server
[+0.08s] DEBUG: Launching process 625: /usr/bin/X :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.08s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.08s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.08s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+3.16s] DEBUG: Loading users from org.freedesktop.Accounts
[+3.16s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+3.19s] DEBUG: Got signal 10 from process 625
[+3.19s] DEBUG: XServer 0: Got signal from X server :0
[+3.19s] DEBUG: XServer 0: Connecting to XServer :0
[+3.19s] DEBUG: Launching process 660: /sbin/prime-offload
[+3.64s] DEBUG: Process 660 exited with return value 0
[+3.64s] DEBUG: Seat seat0: Exit status of /sbin/prime-offload: 0
[+3.65s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+3.65s] DEBUG: Session pid=668: Started with service 'lightdm-greeter', username 'lightdm'
[+3.66s] DEBUG: Session pid=668: Authentication complete with return value 0: Success
[+3.66s] DEBUG: Seat seat0: Session authenticated, running command
[+3.66s] DEBUG: Launching process 671: /usr/bin/numlockx on
[+3.67s] DEBUG: Process 671 exited with return value 0
[+3.67s] DEBUG: Seat seat0: Exit status of /usr/bin/numlockx on: 0
[+3.67s] DEBUG: Session pid=668: Running command /etc/lightdm/Xgreeter /usr/local/bin/sea-greeter
[+3.67s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+3.67s] DEBUG: Session pid=668: Logging to /var/log/lightdm/seat0-greeter.log
[+3.86s] DEBUG: Activating VT 7
[+3.86s] DEBUG: Activating login1 session c1
[+3.86s] DEBUG: Seat seat0 changes active session to c1
[+3.86s] DEBUG: Session c1 is already active
[+29.20s] DEBUG: Greeter connected version=1.32.0 api=1 resettable=false
[+29.21s] DEBUG: Greeter requests data directory for user limones
[+29.21s] DEBUG: Creating shared data directory /var/lib/lightdm-data/limones
[+2777.01s] DEBUG: Greeter start authentication for limones
[+2777.01s] DEBUG: Session pid=1171: Started with service 'lightdm', username 'limones'
[+2777.01s] DEBUG: Session pid=1171: Got 1 message(s) from PAM
[+2777.01s] DEBUG: Prompt greeter with 1 message(s)
[+2781.82s] DEBUG: Continue authentication
[+2783.06s] DEBUG: Session pid=1171: Authentication complete with return value 7: Authentication failure
[+2783.06s] DEBUG: Authenticate result for user limones: Authentication failure
[+2783.06s] DEBUG: Session pid=1171: Exited with return value 1
[+2783.06s] DEBUG: Seat seat0: Session stopped
[+2783.06s] DEBUG: Cancel authentication
[+2783.07s] DEBUG: Greeter start authentication for limones
[+2783.07s] DEBUG: Session pid=1174: Started with service 'lightdm', username 'limones'
[+2783.07s] DEBUG: Session pid=1174: Got 1 message(s) from PAM
[+2783.07s] DEBUG: Prompt greeter with 1 message(s)
[+2787.16s] DEBUG: Continue authentication
[+2787.18s] DEBUG: Session pid=1174: Authentication complete with return value 0: Success
[+2787.21s] DEBUG: Authenticate result for user limones: Success
[+2787.21s] DEBUG: User limones authorized
[+2787.61s] DEBUG: Greeter requests session bspwm
[+2787.61s] DEBUG: Seat seat0: Stopping greeter; display server will be re-used for user session
[+2787.61s] DEBUG: Terminating login1 session c1
[+2787.62s] DEBUG: Session pid=668: Sending SIGTERM
[+2787.63s] DEBUG: Greeter closed communication channel
[+2787.63s] DEBUG: Session pid=668: Exited with return value 1
[+2787.63s] DEBUG: Seat seat0: Session stopped
[+2787.63s] DEBUG: Seat seat0: Greeter stopped, running session
[+2787.63s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+2787.63s] DEBUG: Session pid=1174: Running command /etc/lightdm/Xsession bspwm
[+2787.63s] DEBUG: Creating shared data directory /var/lib/lightdm-data/limones
[+2787.63s] DEBUG: Session pid=1174: Logging to .xsession-errors
[+2788.92s] DEBUG: Activating VT 7
[+2788.92s] DEBUG: Activating login1 session 2
[+2788.92s] DEBUG: Seat seat0 changes active session to 2
[+2788.92s] DEBUG: Session 2 is already active

The time I took to login is because I powered on the PC and went to take a shower lol.

@Limones-07
Copy link
Author

Just updated sea-greeter redoing the installation process, still the same problem.
/var/log/lightdm/seat0-greeter.log:

/etc/lightdm/Xgreeter: linha 5: xsetroot: comando não encontrado
2022-10-13 17:26:22 [ DEBUG ] settings.c 398: Configuration loaded
2022-10-13 17:26:47 [ DEBUG ] lightdm.c 735: LightDM API connected
2022-10-13 17:26:47 [ DEBUG ] greeter.c 37: Extension initialized
2022-10-13 17:26:47 [ DEBUG ] theme.c 244: Theme loaded
2022-10-13 17:26:47 [ DEBUG ] browser-web-view.c 124: Sea greeter started win: 1

@JezerM
Copy link
Owner

JezerM commented Oct 13, 2022

Hmm, the gap occurs between the Configuration loading and the Connection to LightDM. I don't know what it could be right now, but I will look into it soon~

@JezerM
Copy link
Owner

JezerM commented Oct 23, 2022

Hello! If you're still interested in this issue, I'd like to ask you to do provide further info with the following steps:

  1. Edit the /etc/lightdm/Xgreeter file:
    • Change exec $@ to G_MESSAGES_DEBUG=all exec $@ 1>&2
  2. Restart the lightdm service with sea-greeter as the default greeter.
  3. Wait until sea-greeter shows.
  4. Provide the log at /var/log/lightdm/seat0-greeter.log.

With these steps, you configured to display all the GLIB debug messages, so I could trace where the slowness may occur.

Also, sorry for the late response. I've been busy with college assignments xd

@Limones-07
Copy link
Author

Sup! I really understand you, many college/school assignments sucks xD.

/var/log/lightdm/seat0-greeter.log:

2022-10-24 15:25:13 [ DEBUG ] settings.c 398: Configuration loaded
(sea-greeter:13972): GLib-GIO-DEBUG: 15:25:13.730: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
(sea-greeter:13972): GLib-DEBUG: 15:25:13.843: unsetenv() is not thread-safe and should not be used after threads are created
(sea-greeter:13972): Gtk-DEBUG: 15:25:13.843: Connecting to session manager
(sea-greeter:13972): Gtk-DEBUG: 15:25:13.844: Failed to get the GNOME session proxy: The name org.gnome.SessionManager is not owned
(sea-greeter:13972): Gtk-DEBUG: 15:25:13.845: Failed to get the Xfce session proxy: The name org.xfce.SessionManager is not owned
(sea-greeter:13972): Gtk-DEBUG: 15:25:38.296: Failed to get an inhibit portal proxy: Erro ao chamar StartServiceByName para org.freedesktop.portal.Desktop: O tempo limite foi alcançado
(sea-greeter:13972): GLib-GIO-DEBUG: 15:25:38.371: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
** (sea-greeter:13972): DEBUG: 15:25:38.396: Connecting to display manager...
** (sea-greeter:13972): DEBUG: 15:25:38.397: Wrote 26 bytes to daemon
** (sea-greeter:13972): DEBUG: 15:25:38.397: Read 8 bytes from daemon
** (sea-greeter:13972): DEBUG: 15:25:38.397: Read 158 bytes from daemon
** (sea-greeter:13972): DEBUG: 15:25:38.397: Connected api=1 version=1.32.0 hide-users=false has-guest-account=false default-session=bspwm show-manual-login=false show-remote-login=true
(sea-greeter:13972): GLib-GIO-DEBUG: 15:25:38.398: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
** (sea-greeter:13972): DEBUG: 15:25:38.399: Loading users from org.freedesktop.Accounts
** (sea-greeter:13972): DEBUG: 15:25:38.399: User /org/freedesktop/Accounts/User1000 added
** (sea-greeter:13972): DEBUG: 15:25:38.436: Ensuring data directory for user limones
** (sea-greeter:13972): DEBUG: 15:25:38.437: Wrote 19 bytes to daemon
** (sea-greeter:13972): DEBUG: 15:25:38.440: Read 8 bytes from daemon
** (sea-greeter:13972): DEBUG: 15:25:38.440: Read 33 bytes from daemon
2022-10-24 15:25:38 [ DEBUG ] lightdm.c 735: LightDM API connected
2022-10-24 15:25:38 [ DEBUG ] greeter.c 37: Extension initialized
2022-10-24 15:25:38 [ DEBUG ] theme.c 244: Theme loaded
(process:14041): GLib-GIO-DEBUG: 15:25:38.522: Failed to initialize portal (GNetworkMonitorPortal) for gio-network-monitor: Not using portals
(process:14041): GLib-GIO-DEBUG: 15:25:38.524: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
(process:14041): GLib-GIO-DEBUG: 15:25:38.526: _g_io_module_get_default: Found default implementation networkmanager (GNetworkMonitorNM) for ?gio-network-monitor?
(process:14041): GLib-GIO-DEBUG: 15:25:38.532: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
(process:14041): GLib-GIO-DEBUG: 15:25:38.534: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ?gio-vfs?
(process:14041): GLib-GIO-DEBUG: 15:25:38.536: Failed to initialize portal (GPowerProfileMonitorPortal) for gio-power-profile-monitor: Not using portals
(process:14041): GLib-GIO-DEBUG: 15:25:38.536: _g_io_module_get_default: Found default implementation dbus (GPowerProfileMonitorDBus) for ?gio-power-profile-monitor?
(WebKitWebProcess:14042): GLib-GIO-DEBUG: 15:25:38.554: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
(WebKitWebProcess:14042): GLib-GIO-DEBUG: 15:25:38.556: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
(WebKitWebProcess:14042): GLib-GIO-DEBUG: 15:25:38.615: Failed to initialize portal (GPowerProfileMonitorPortal) for gio-power-profile-monitor: Not using portals
(WebKitWebProcess:14042): GLib-GIO-DEBUG: 15:25:38.616: _g_io_module_get_default: Found default implementation dbus (GPowerProfileMonitorDBus) for ‘gio-power-profile-monitor’
(WebKitWebProcess:14042): GLib-GIO-DEBUG: 15:25:38.616: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
** (sea-greeter:13972): DEBUG: 15:25:38.892: Loading sessions from org.freedesktop.DisplayManager
** (sea-greeter:13972): DEBUG: 15:25:38.897: Loaded session /usr/share/xsessions/bspwm.desktop (bspwm, Binary space partitioning window manager)
2022-10-24 15:25:38 [ DEBUG ] browser-web-view.c 124: Sea greeter started win: 1
** (sea-greeter:13972): DEBUG: 15:26:44.112: Wrote 8 bytes to daemon
** (sea-greeter:13972): DEBUG: 15:26:44.123: Starting authentication for user limones...
** (sea-greeter:13972): DEBUG: 15:26:44.123: Wrote 23 bytes to daemon
** (sea-greeter:13972): DEBUG: 15:26:44.154: Read 8 bytes from daemon
** (sea-greeter:13972): DEBUG: 15:26:44.154: Read 37 bytes from daemon
** (sea-greeter:13972): DEBUG: 15:26:44.155: Prompt user with 1 message(s)
** (sea-greeter:13972): DEBUG: 15:26:48.512: Providing response to display manager
** (sea-greeter:13972): DEBUG: 15:26:48.513: Wrote 25 bytes to daemon
** (sea-greeter:13972): DEBUG: 15:26:48.569: Read 8 bytes from daemon
** (sea-greeter:13972): DEBUG: 15:26:48.569: Read 19 bytes from daemon
** (sea-greeter:13972): DEBUG: 15:26:48.569: Authentication complete for user limones with return code 0
** (sea-greeter:13972): DEBUG: 15:26:48.972: Starting session bspwm
** (sea-greeter:13972): DEBUG: 15:26:48.972: Wrote 17 bytes to daemon

@JezerM
Copy link
Owner

JezerM commented Oct 25, 2022

Thanks!

It strikes me that this seems to be, perhaps, a Gtk or LightDM bug regarding to portals, as your log describes in Failed to get an inhibit portal proxy, the time limit was reached:

(sea-greeter:13972): Gtk-DEBUG: 15:25:13.843: Connecting to session manager
(sea-greeter:13972): Gtk-DEBUG: 15:25:13.844: Failed to get the GNOME session proxy: The name org.gnome.SessionManager is not owned
(sea-greeter:13972): Gtk-DEBUG: 15:25:13.845: Failed to get the Xfce session proxy: The name org.xfce.SessionManager is not owned
(sea-greeter:13972): Gtk-DEBUG: 15:25:38.296: Failed to get an inhibit portal proxy: Erro ao chamar StartServiceByName para org.freedesktop.portal.Desktop: O tempo limite foi alcançado

I'll look about it, though it could be that a Gtk portal is not installed; however, I'm not sure why you would need a Portal to connect to the Display Manager.

@JezerM
Copy link
Owner

JezerM commented Oct 27, 2022

After some research, I found this Github issue: flatpak/xdg-desktop-portal#274.

I couldn't find any solution, neither to replicate it in my own environment; I was able to get some similar errors like Failed to execute program org.freedesktop.portal.Desktop: Permission denied or Failed to execute program org.freedesktop.portal.Desktop: No such file or directory, but I couldn't provoke a Timeout was reached (O tempo limite foi alcançado) error.

However, you could try to do a forced reinstall of the xdg-desktop-portal package.

@Limones-07
Copy link
Author

Closed by mistake, sorry xD

@Limones-07
Copy link
Author

I'm not home right now, I'll try reinstalling it later.

Another thing, about 1 week ago I installed Bedrock Linux over my Arch install, but it didn't change anything.

@lakejason0
Copy link

lakejason0 commented Jan 26, 2023

I ran into the same problem, and reinstalling xdg-desktop-portal on Arch Linux didn't seem to do anything.
I'm using KDE Plasma. Installing xdg-desktop-portal-gtk won't work.
Anyway, litarvan kinda works in web-greeter, but it doesn't save my setting…

@LuNeder
Copy link

LuNeder commented Apr 14, 2023

Uninstall xdg-desktop-portal-gnome

@AkechiShiro
Copy link

AkechiShiro commented May 15, 2023

@LuNeder your answer should be documented, it worked all fine for me and fixed any slowness, I recently encountered using swappy.

@LuNeder
Copy link

LuNeder commented May 15, 2023

Yeah, portal gnome was causing mad slowness to open many apps for me too so when I discovered it was the cause I decided to tell everyone that was having the same problem haha

@BobbyBabes
Copy link

I've been using sea-greeter for some time, and it works flawlessly, congrats. :) But it is slow as hell to load up on boot. It boots and I have to wait like, 10 to 20 seconds to the theme finally pop up, and it's kind of annoying. Do you have any clue of what is causing this? (If you could upload this greeter to the AUR it would be insane, would be so much easier to update lol.)

Is this still an issue?

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

6 participants