Merge lp:~mterry/lightdm/multi-seat-vt-0 into lp:lightdm
Status: | Merged |
---|---|
Merge reported by: | Robert Ancell |
Merged at revision: | not available |
Proposed branch: | lp:~mterry/lightdm/multi-seat-vt-0 |
Merge into: | lp:lightdm |
Diff against target: |
58 lines (+18/-1) 3 files modified
src/seat-surfaceflinger.c (+2/-1) src/vt.c (+14/-0) src/vt.h (+2/-0) |
To merge this branch: | bzr merge lp:~mterry/lightdm/multi-seat-vt-0 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Ancell | Approve | ||
Review via email: mp+187303@code.launchpad.net |
Commit message
If we aren't in a multi-seat environment, pass logind XDG_VTNR=0 instead of 1 when using surfaceflinger.
Description of the change
If we aren't in a multi-seat environment, pass logind XDG_VTNR=0 instead of 1 when using surfaceflinger.
Logind treats VT numbers very differently depending on whether it determines it is in a multi-seat environment. If we are multi-seat, it does things "normally". But if we aren't, then it only accepts VTNR=0 and rejects anything else. It will assume whatever session it has is active.
Our previous solution was designed and tested on a mako device, which has CONFIG_VT=y (and thus has a /dev/tty0 device, and thus logind thinks is multi-seat). Oddly enough, it doesn't actually have working switching VTs. It just is stuck on VT1. Which is why we originally forced VTNR=1 for logind.
But maguro has CONFIG_VT=n, which stops /dev/tty0 from appearing. Which puts logind in a completely different code path that requires VTNR=0. So this branch detects which mode we are in, and passes the right VTNR for logind's benefit.
Tested on both mako and maguro devices.
This is slightly time-sensitive, as this is blocking lightdm landing in Ubuntu Touch.
So Robert, if you don't like something in this branch, could you please fix directly if it's simple, rather than going back and forth. And a release, even if just for this, would be welcome.