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
[RFC] Declare that non-seat0 seats can support multisession. #15337
Conversation
Hmm, what about seat0 there? Maybe we should return false for it, in case the VT subsystem is turned off in the kernel? @dvdhrm any idea why you claimed that CanMultiSession was false for all non-seat0 sessions back when you added multi-session support without VT to that? |
I never changed the logic. This is still from the original commit. I merely did some refactoring. I think this originates in:
Anyway, I did definitely introduce multi-session support for all seats. No idea why I never adjusted I do agree, the correct thing would be to return |
Are you sure it can be dropped? Because I see |
I mostly meant changing The only thing we need to be careful about is |
ah. makes sense. I have it changing seat_can_multi_session() now, to return true, so is this what you want? Or should I change something else like the commit message or something? |
That is up to the systemd maintainers to decide. I recommend dropping the |
Should I close this, and open a new one with the change message? not sure how in github to change the commit message... |
just force push the new version of your commit over the existing branch |
Ok, I think I figured it out |
Could you add a comment saying "All our seats can do multi-session these days" or so to the function, to indicate this is mostly a historical artifact? |
Let me know if that comment is good enough |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks a lot!
@dvdhrm thanks for the review! |
Follow-up for fa2cf64. Backwards-compat is retained. A short note is added in docs, in case people see sd_seat_can_multi_session() mentioned somewhere and wonder what happened to it. Also see systemd#15337 (comment).
Follow-up for fa2cf64. Backwards-compat is retained. A short note is added in docs, in case people see sd_seat_can_multi_session() mentioned somewhere and wonder what happened to it. Also see systemd#15337 (comment).
Follow-up for fa2cf64a917d31605d40d34e98ce9e2e066064fa. Backwards-compat is retained. A short note is added in docs, in case people see sd_seat_can_multi_session() mentioned somewhere and wonder what happened to it. Also see systemd/systemd#15337 (comment).
All seats supports multiple sessions: systemd/systemd#15337 systemd/systemd#15459 sd_seat_can_multi_session function has been deprecated and always returns true with systemd 246 or newer. Also CanMultiSession property no longer appears in D-Bus introspection data. This might have revealed bug somewhere as now generated gf_login_seat_gen_get_can_multi_session function returns false but property is supposed to be always true. Above causes user switch button to be hidden. As all seats should support multiple session remove can_multi_session check to restore user switch button in unlock dialog.
All seats supports multiple sessions: systemd/systemd#15337 systemd/systemd#15459 sd_seat_can_multi_session function has been deprecated and always returns true with systemd 246 or newer.
This should work now that seat_local_get_active_session returns the proper value for non-seat0 seats. Note: systemd-logind v245 and older erroneously report CanMultiSession=no on non-seat0 seats even when it is supported. This change will break those users. See <systemd/systemd#15337>.
This should work now that seat_local_get_active_session returns the proper value for non-seat0 seats. Note: systemd-logind v245 and older erroneously report CanMultiSession=no on non-seat0 seats even when it is supported. This change will break those users. See <systemd/systemd#15337>.
This should work now that seat_local_get_active_session returns the proper value for non-seat0 seats. Note: systemd-logind v245 and older erroneously report CanMultiSession=no on non-seat0 seats even when it is supported. This change will break those users. See <systemd/systemd#15337>.
This should work now that seat_local_get_active_session returns the proper value for non-seat0 seats. Note: systemd-logind v245 and older erroneously report CanMultiSession=no on non-seat0 seats even when it is supported. This change will break those users. See <systemd/systemd#15337>.
This should work now that seat_local_get_active_session returns the proper value for non-seat0 seats. Note: systemd-logind v245 and older erroneously report CanMultiSession=no on non-seat0 seats even when it is supported. This change will break those users. See <systemd/systemd#15337>.
This should work now that seat_local_get_active_session returns the proper value for non-seat0 seats. Note: systemd-logind v245 and older erroneously report CanMultiSession=no on non-seat0 seats even when it is supported. This change will break those users. See <systemd/systemd#15337>.
This should work now that seat_local_get_active_session returns the proper value for non-seat0 seats. Note: systemd-logind v245 and older erroneously report CanMultiSession=no on non-seat0 seats even when it is supported. This change will break those users. See <systemd/systemd#15337>.
This should work now that seat_local_get_active_session returns the proper value for non-seat0 seats. Note: systemd-logind v245 and older erroneously report CanMultiSession=no on non-seat0 seats even when it is supported. This change will break those users. See <systemd/systemd#15337>.
As talked about on the mailing list, multisession support does
work on nont-seat0 seats, but logind undersells this ability
and onlt sets CanMultiSession on seat0 with TTYs. This is because
seat_can_tty acts the same way as seat_can_multi_session() as and
only reports that the seat has TTYs, which hasn't been needed to
support multi session switching on non-seat0 seats since I tested
it first in at least 2017