Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914656 - x11-misc/sddm: Rootless mode doesn't switch to vt7 after login
Summary: x11-misc/sddm: Rootless mode doesn't switch to vt7 after login
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LxQt maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-25 11:30 UTC by silverqx
Modified: 2023-12-29 19:58 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description silverqx 2023-09-25 11:30:40 UTC
I upgraded to the latest x11-misc/sddm ~amd64 because of rootless X, I waited a long time for this feature.

Just adding the DisplayServer=x11-user to the sddm.conf is enough and the X server will start rootless. 👌

I have been using it for the last month or so and everything works fine for me but I have one big issue.

When I log into the system, write the password down and press enter, then the sddm switches me to the tty1 (ctrl+alt+F1) to the first console and I have to manually switch to the vt7 (alt+F7). If I don't do this it stays on the tty1 for around 1min or so and then it switches to the vt7, it takes soo long and I'm not even sure if it automatically switches to the vt7 after 1min because I didn't try this a long time. 🐛

The X server is started like this:

exec /usr/bin/X -nolisten tcp -keeptty "$@" "vt$XDG_VTNR"


And the $XDG_VTNR is set to the 7 number, I don't think changing it to the 1 would be a good idea.

This problem is not happening without the DisplayServer=x11-user so with the previous so-called root mode. It is only happening with this new rootless mode.

Also, I looked at the gui-libs/display-manager-init source code I didn't find anything how can I workaround it or fix it:

equery files gui-libs/display-manager-init

Here is a link to the sddm rootless mode https://github.com/sddm/sddm/pull/1371

Is there any workaround for this or a patch? How can I force the sddm to switch to the vt7 after login?
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-27 02:19:06 UTC
(In reply to silverqx from comment #0)
> [...]
> 
> Is there any workaround for this or a patch? How can I force the sddm to
> switch to the vt7 after login?

You could do something like: mkdir -p /etc/portage/env/x11-misc && echo 'MYCMAKEARGS="-DSDDM_INITIAL_VT=7"' > /etc/portage/env/x11-misc/sddm.

But I think there might be another problem here if there's no runtime variable to allow display-manager-init to control which VT to use.
Comment 2 silverqx 2023-09-27 08:11:16 UTC
(In reply to Sam James from comment #1)
> You could do something like: mkdir -p /etc/portage/env/x11-misc && echo
> 'MYCMAKEARGS="-DSDDM_INITIAL_VT=7"' > /etc/portage/env/x11-misc/sddm.

Great thank you, I know about this cmake option but didn't know how to use it, it works great, thx.
 
> But I think there might be another problem here if there's no runtime
> variable to allow display-manager-init to control which VT to use.

There is, I think the latest sddm logic is like this, they discarded MinimumVT config. option from v0.20 as is described eg. here https://wiki.archlinux.org/title/SDDM#SDDM_starts_on_tty1_instead_of_tty7 and everything should be autodetected but it doesn't work correctly in some situations.

I saw somewhere that the logic can also be to pick the first free or available vt terminal.