No VT change happens for images without pslash/missing polkit pkg

Fixed

Description

For agl-demo-platform pslash changes the vt before the compositor starts, while for others like agl-image-fluter this doesn't seem to happen (w/ latest master).

Now, I don't remember seeing this with dunfell and the agl-image-flutter but now this seems to be an issue at this point.

Environment

None

Activity

Show:

Walt Miner 
July 21, 2022 at 7:55 PM

Close for NN Milestone 1

Marius Vlad 
June 1, 2022 at 7:38 AM

For context, the discussion I prompted on that call was in the direction of if it makes sense to move polkit to oe-core / poky since it seems likely to be required for more things going forward.

Yeah, totally.

Wrt to other users of Weston, have no idea how they handle start-up. If they're using logind, unsure how that happens. Maybe they have some downstream patches that they use? There's been some discussions over the years, how to actually/properly have some systemd units and to some extent things have improving.

Have assigned myself an older Weston MR which looks into having a reference systemd unit for starting weston. When I get back to that, I'll investigate this systemd-logind + polkit further and see what's the status with it at that point. Seems that it should be upstream according to a comment: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/439#note_993563

Scott Murray 
May 31, 2022 at 8:27 PM

By others, I meant other users of Weston with Yocto, in the discussion on the YP call this morning there was expressed a belief that we should not need polkit as others (e.g. Garmin) find they do not need it.  For context, the discussion I prompted on that call was in the direction of if it makes sense to move polkit to oe-core / poky since it seems likely to be required for more things going forward.  I am not proposing that we stop using it in AGL unless that proves straightforward.

Marius Vlad 
May 31, 2022 at 8:01 PM

I know we're to some degree moving on, but just a note, upstream folks in Yocto think that this should not be required

Due to that patch I've linked in systemd-logind? If so, if that patch is in, it clearly doesn't work. Was getting a perm denied last time I had a look over the dbus "bus". There are some ifdes in that patch, so maybe they need to be enabled somehow?

There is some interest in a clearer definition as to why we need it when others do not

What are others? Weston? Weston also needs it. Fyi, all the launcher are in libweston, rather than in Weston.

One thing I note is our agl-compositor service unit is now missing a lot of the stuff that's in the stock weston one in oe-core/poky, is there any chance some of the configuration there around TTY settings that we don't have is related?

If there's an explicit chvt in ExecPreStart then yes (which would make this polkit discussion moot), otherwise I seriously doubt it there's something that the unit that does to change the way the compositor is started. Of course I'm assuming it still starts an user session rather than root.

Honestly I don't even know how to proceed further.... I feels to me like we're trying to band-aid things even more with some patches which upstream doesn't want. Why? Just because we don't want to pull in polkit?

Maybe there's a third solution here, and I've briefly hinted in the mail, using libseatd but without systemd-logind back-end. libseatd has multiple backends: a daemon, a built-in one, a logind one and a elogind one. The daemon can be started with sudo/runas while the built-in one is capable of switching VTs on its own using some tweaks. Basically, you can using libstead built-in back-end if you want to run the compositor over the command line, just like we had with the launcher direct.

So, if one builds weston/libweston with systemd-logind launcher, then you pull int polkit, if one builds libseatd with built-in/daemon (and no systemd-logind back-end) then don't pull polkit. Fyi, in the near future, libseatd will be the only launcher for libweston.

Note that doesn't mean that using the daemon or the built-in backend makes it work nicely with user systemd units, but if you make an argument that you want to have this installed in an embedded system, where you don't have sufficient resources to pull in polkit, you can create a system unit which just execs the compositor, just like that.

Scott Murray 
May 31, 2022 at 4:00 PM

I know we're to some degree moving on, but just a note, upstream folks in Yocto think that this should not be required, a change was specifically upstreamed into systemd so TTY switching could still work without polkit.  There is some interest in a clearer definition as to why we need it when others do not.  One thing I note is our agl-compositor service unit is now missing a lot of the stuff that's in the stock weston one in oe-core/poky, is there any chance some of the configuration there around TTY settings that we don't have is related?

Details

Assignee

Reporter

Fix versions

Labels

Priority

Created May 6, 2022 at 12:55 PM
Updated July 21, 2022 at 7:55 PM
Resolved May 27, 2022 at 5:48 AM