[Bug] Login prompt not centered on boot #486

Open
opened 2023-02-26 07:04:51 +01:00 by wwsmiff · 24 comments
wwsmiff commented 2023-02-26 07:04:51 +01:00 (Migrated from github.com)

Im using arch and sway and whenever i boot/reboot the login prompt is not centered and only once i start typing in the details it gets centered. Is there a way to fix this? Also is there a way to set one WM/Desktop as the first preference?

Im using arch and sway and whenever i boot/reboot the login prompt is not centered and only once i start typing in the details it gets centered. Is there a way to fix this? Also is there a way to set one WM/Desktop as the first preference?
IlliaHalchun commented 2023-04-07 09:43:32 +02:00 (Migrated from github.com)

Have the same problem..

Have the same problem..
AnErrupTion commented 2023-06-14 23:59:49 +02:00 (Migrated from github.com)

and only once i start typing in the details it gets centered.

For now, I can only guess this is a termbox problem (the library Ly uses for making a TUI interface).

Also is there a way to set one WM/Desktop as the first preference?

Ly should use the last-used entry as the default.

> and only once i start typing in the details it gets centered. For now, I can only guess this is a termbox problem (the library Ly uses for making a TUI interface). > Also is there a way to set one WM/Desktop as the first preference? Ly should use the last-used entry as the default.
Pheon-Dev commented 2023-06-21 21:20:05 +02:00 (Migrated from github.com)

Me too. But it only does so when multiple monitors are connected, say two. Just as the default unpatched dwm cursor positions itself when the desktop is loaded. It defaults to center of the two monitors, so does ly. The login prompt would position itself right where the cursor would have been

Me too. But it only does so when multiple monitors are connected, say two. Just as the default unpatched dwm cursor positions itself when the desktop is loaded. It defaults to center of the two monitors, so does ly. The login prompt would position itself right where the cursor would have been
RikiReal commented 2023-06-22 01:02:54 +02:00 (Migrated from github.com)

This issue only started appearing for me after the last update to ly in the arch repo. That was on 2023-06-15 and the version is 0.6.0-1
https://archlinux.org/packages/?name=ly

This issue only started appearing for me after the last update to ly in the arch repo. That was on 2023-06-15 and the version is 0.6.0-1 https://archlinux.org/packages/?name=ly
RoccoRakete commented 2023-07-13 17:48:48 +02:00 (Migrated from github.com)

Same issue here

Same issue here
katekyy commented 2023-08-14 14:33:46 +02:00 (Migrated from github.com)

Same. Started appearing in 0.6.0.

Same. Started appearing in 0.6.0.
Rider3268 commented 2023-09-06 15:51:49 +02:00 (Migrated from github.com)

Same

Same
sanj0 commented 2023-09-22 22:59:26 +02:00 (Migrated from github.com)

I have the same issue on arch with a build of the current state on master. Any updates on this issue? I don't have a second monitor nor have I every connected one to this laptop so that's not the source of the issue for me @Pheon-Dev

I have the same issue on arch with a build of the current state on master. Any updates on this issue? I don't have a second monitor nor have I every connected one to this laptop so that's not the source of the issue for me @Pheon-Dev
Pheon-Dev commented 2023-09-23 05:35:32 +02:00 (Migrated from github.com)

At least now the bug can be zeroed down further. For now I'm using lemurs which is also a minimal login manager that has worked great for me so far

At least now the bug can be zeroed down further. For now I'm using [lemurs](https://github.com/coastalwhite/lemurs) which is also a minimal login manager that has worked great for me so far
sanj0 commented 2023-10-10 11:59:33 +02:00 (Migrated from github.com)

In trying (and succeeding) to change the colors of ly, I've stumbled upon a workaround fix for this issue. As the box centers as soon as I type the first character of my password, the following ExecStartPre not only changes the colors of ly (first hex is bg, second hex is fg) but also "simulates user input" I guess and therefore automatically centers the box:

# in /etc/systemd/system/display-manager.service
# ...
[Service]
# ...
ExecStartPre=/usr/bin/printf '%%b' '\e]P0DED8C9\e]P70E313A\ec'
ExecStart=/usr/bin/ly
# ...
In trying (and succeeding) to change the colors of ly, I've stumbled upon a workaround fix for this issue. As the box centers as soon as I type the first character of my password, the following `ExecStartPre` not only changes the colors of ly (first hex is bg, second hex is fg) but also "simulates user input" I guess and therefore automatically centers the box: ```service # in /etc/systemd/system/display-manager.service # ... [Service] # ... ExecStartPre=/usr/bin/printf '%%b' '\e]P0DED8C9\e]P70E313A\ec' ExecStart=/usr/bin/ly # ... ```
ghost commented 2023-10-20 15:35:41 +02:00 (Migrated from github.com)

I had the same issue with qtile on arch and nvidia graphics card, I noticed that after installing CUDA nvidia package from the repo fixed the problem. I don't know why tho.

I had the same issue with qtile on arch and nvidia graphics card, I noticed that after installing CUDA nvidia package from the repo fixed the problem. I don't know why tho.
StuSerious commented 2023-10-24 08:22:36 +02:00 (Migrated from github.com)

Same issue here with Arch master. As others stated above, user input centers it back to normal.

Same issue here with Arch master. As others stated above, user input centers it back to normal.
rudolflovrencic commented 2024-01-01 12:23:41 +01:00 (Migrated from github.com)

Same issue - user input centers it.

Same issue - user input centers it.
cprin21 commented 2024-02-02 08:32:09 +01:00 (Migrated from github.com)

Also getting same issue. It's rather frustrating because of the expectation of a clean TUI environment something like ly should have. Unsure why it doesn't centre until user input is given.

Also getting same issue. It's rather frustrating because of the expectation of a clean TUI environment something like ly should have. Unsure why it doesn't centre until user input is given.
StuSerious commented 2024-02-19 16:53:20 +01:00 (Migrated from github.com)

@cprin21 a bit late but I have since moved to greetd using tuigreet and it has been a flawless (if not better) substitute ever since. I recommend you give it a try if you fancy that ly aesthetic.

@cprin21 a bit late but I have since moved to [`greetd`](https://sr.ht/~kennylevinsen/greetd/) using [`tuigreet`](https://github.com/apognu/tuigreet) and it has been a flawless (if not better) substitute ever since. I recommend you give it a try if you fancy that `ly` aesthetic.
cprin21 commented 2024-02-19 17:42:27 +01:00 (Migrated from github.com)

Thanks! Not late at all. Checked it out and haven't had any top-left greeter moments.

Thanks! Not late at all. Checked it out and haven't had any top-left greeter moments.
marcocamilo commented 2024-08-06 23:58:48 +02:00 (Migrated from github.com)

Any updates on this? I have the same problem, but even when typing the login pane isn't centered. I'm using Arch, as display managers I have dwm and Gnome

Any updates on this? I have the same problem, but even when typing the login pane isn't centered. I'm using Arch, as display managers I have dwm and Gnome
AnErrupTion commented 2024-08-07 01:05:23 +02:00 (Migrated from github.com)

@marcocamilo Do you have 2 monitors with different resolutions, by any chance?

@marcocamilo Do you have 2 monitors with different resolutions, by any chance?
marcocamilo commented 2024-08-07 01:23:14 +02:00 (Migrated from github.com)

No, not at all. Im using it on my macbook. Do I have to set the definition somehow by default inside the tty?

Marco-Andrés Camilo-Pietri
On Aug 7, 2024 at 01:05 +0200, ShiningLea @.***>, wrote:

@marcocamilo Do you have 2 monitors with different resolutions, by any chance?

Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>

No, not at all. Im using it on my macbook. Do I have to set the definition somehow by default inside the tty? Marco-Andrés Camilo-Pietri On Aug 7, 2024 at 01:05 +0200, ShiningLea ***@***.***>, wrote: > @marcocamilo Do you have 2 monitors with different resolutions, by any chance? > — > Reply to this email directly, view it on GitHub, or unsubscribe. > You are receiving this because you were mentioned.Message ID: ***@***.***>
AnErrupTion commented 2024-08-09 18:48:10 +02:00 (Migrated from github.com)

Hm, then that's an odd one. You shouldn't have to set the resolution in the TTY yourself since it should just pick the highest one available.

Hm, then that's an odd one. You shouldn't have to set the resolution in the TTY yourself since it should just pick the highest one available.
Tadas commented 2024-12-31 01:13:08 +01:00 (Migrated from github.com)

Not sure if there are several different issues causing problems for everyone here, but here's how I've gotten Ly to use the full 4k main monitor even though I have a smaller side monitor as well.

Seems like the smallest monitor's size is used to set the TTY frame buffer size (which is being mirrored on all displays). That is why you see Ly (or the console for that matter) taking up only a portion of your larger screen starting from top left.

I've fixed it on my Debian bookworm with a systemd service to resize the frame buffer just before Ly starts:

$ cat /etc/systemd/system/fbset.service
[Unit]
Description=Framebuffer resolution
Before=display-manager.service

[Service]
Type=oneshot
User=root
ExecStart=/usr/bin/fbset -xres 3840 -yres 2160 -match --all
RemainAfterExit=yes
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target

Don't forget to systemctl daemon-reload and systemctl enable fbset. I was also missing the util itself so had to apt install fbset.

Linking #366 here for reference

Not sure if there are several different issues causing problems for everyone here, but here's how I've gotten Ly to use the full 4k main monitor even though I have a smaller side monitor as well. Seems like the smallest monitor's size is used to set the TTY frame buffer size (which is being mirrored on all displays). That is why you see Ly (or the console for that matter) taking up only a portion of your larger screen starting from top left. I've fixed it on my Debian bookworm with a systemd service to resize the frame buffer just before Ly starts: ``` $ cat /etc/systemd/system/fbset.service [Unit] Description=Framebuffer resolution Before=display-manager.service [Service] Type=oneshot User=root ExecStart=/usr/bin/fbset -xres 3840 -yres 2160 -match --all RemainAfterExit=yes StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target ``` Don't forget to `systemctl daemon-reload` and `systemctl enable fbset`. I was also missing the util itself so had to `apt install fbset`. Linking #366 here for reference
tedkaczynski-dev commented 2025-02-15 08:55:51 +01:00 (Migrated from github.com)

@Tadas Thank you! This fixed it for me on Arch. I have a monitor connected through an adapter which I suspect is constantly reporting itself as even when it's turned off as Ly, Lemurs, and Greetd were getting resized on my main monitor. Now Ly is perfectly centered, this did the trick.

@Tadas Thank you! This fixed it for me on Arch. I have a monitor connected through an adapter which I suspect is constantly reporting itself as even when it's turned off as Ly, Lemurs, and Greetd were getting resized on my main monitor. Now Ly is perfectly centered, this did the trick.
lpv11 commented 2025-02-26 20:47:58 +01:00 (Migrated from github.com)

Not sure if there are several different issues causing problems for everyone here, but here's how I've gotten Ly to use the full 4k main monitor even though I have a smaller side monitor as well.

Seems like the smallest monitor's size is used to set the TTY frame buffer size (which is being mirrored on all displays). That is why you see Ly (or the console for that matter) taking up only a portion of your larger screen starting from top left.

I've fixed it on my Debian bookworm with a systemd service to resize the frame buffer just before Ly starts:

$ cat /etc/systemd/system/fbset.service
[Unit]
Description=Framebuffer resolution
Before=display-manager.service

[Service]
Type=oneshot
User=root
ExecStart=/usr/bin/fbset -xres 3840 -yres 2160 -match --all
RemainAfterExit=yes
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target

Don't forget to systemctl daemon-reload and systemctl enable fbset. I was also missing the util itself so had to apt install fbset.

Linking #366 here for reference

I have the same problem with a 1440p main and a 1080p side monitor, I have adjusted the resolution in the service file accordingly but it still fails to start. In terminal it works fine. Any idea why it might be happening?

Feb 26 21:39:52 lp-linux fbset[632]: open /dev/fb0: No such file or directory
Feb 26 21:39:51 lp-linux systemd[1]: Starting Framebuffer resolution...
Feb 26 21:39:51 lp-linux systemd[1]: fbset.service: Main process exited, code=exited, status=1/FAILURE
Feb 26 21:39:51 lp-linux systemd[1]: fbset.service: Failed with result 'exit-code'.
Feb 26 21:39:51 lp-linux systemd[1]: Failed to start Framebuffer resolution.```
> Not sure if there are several different issues causing problems for everyone here, but here's how I've gotten Ly to use the full 4k main monitor even though I have a smaller side monitor as well. > > Seems like the smallest monitor's size is used to set the TTY frame buffer size (which is being mirrored on all displays). That is why you see Ly (or the console for that matter) taking up only a portion of your larger screen starting from top left. > > I've fixed it on my Debian bookworm with a systemd service to resize the frame buffer just before Ly starts: > > ``` > $ cat /etc/systemd/system/fbset.service > [Unit] > Description=Framebuffer resolution > Before=display-manager.service > > [Service] > Type=oneshot > User=root > ExecStart=/usr/bin/fbset -xres 3840 -yres 2160 -match --all > RemainAfterExit=yes > StandardOutput=journal > StandardError=journal > > [Install] > WantedBy=multi-user.target > ``` > > Don't forget to `systemctl daemon-reload` and `systemctl enable fbset`. I was also missing the util itself so had to `apt install fbset`. > > Linking [#366](https://github.com/fairyglade/ly/issues/366) here for reference I have the same problem with a 1440p main and a 1080p side monitor, I have adjusted the resolution in the service file accordingly but it still fails to start. In terminal it works fine. Any idea why it might be happening? ```Feb 26 21:39:52 lp-linux fbset[632]: open /dev/fb0: No such file or directory Feb 26 21:39:52 lp-linux fbset[632]: open /dev/fb0: No such file or directory Feb 26 21:39:51 lp-linux systemd[1]: Starting Framebuffer resolution... Feb 26 21:39:51 lp-linux systemd[1]: fbset.service: Main process exited, code=exited, status=1/FAILURE Feb 26 21:39:51 lp-linux systemd[1]: fbset.service: Failed with result 'exit-code'. Feb 26 21:39:51 lp-linux systemd[1]: Failed to start Framebuffer resolution.```
AnErrupTion changed title from Login prompt not being centered on boot to [Bug] Login prompt not centered on boot 2025-07-07 23:45:54 +02:00
Owner

I believe this can be properly fixed by making the code multi-threaded, as any input seems to solve the issue (because it triggers a screen refresh).

I believe this can be properly fixed by making the code multi-threaded, as any input seems to solve the issue (because it triggers a screen refresh).
AnErrupTion added this to the Future milestone 2025-08-29 14:26:32 +02:00
AnErrupTion modified the milestone from Future to 1.4.0 2025-12-01 13:50:21 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
fairyglade/ly#486
No description provided.