Pali Rohár [Sat, 23 Nov 2013 16:39:53 +0000 (17:39 +0100)]
Add support for operation log messages
This patch adding support for operation log messages and updating upstart
bridge code to use it. This is usefull for verbose log output (e.g daemon
starting, stopping).
Set state of operation ssh to wait:
$ plymouth update --operation-id=ssh --status="wait"
Details plugin will show: 'Starting OpenSSH server ssh... [wait]'
Set state of operation ssh to done:
$ plymouth update --operation-id=ssh --status="done"
Details plugin will show: 'Starting OpenSSH server ssh... [done]'
I think this patch was accidentally pushed, since the commit date is
years older than the push date, and it seems to overlap in already
existing pid-file functionality.
If we actually do need this commit we can always add it back of course.
Ray Strode [Thu, 6 Mar 2014 19:42:16 +0000 (14:42 -0500)]
seat: make sure to open terminal when adding text displays
If we have a pixel display, the renderer will handle opening the
associated terminal. but if we don't have a pixel display, something
needs to open the terminal.
Ray Strode [Mon, 3 Mar 2014 22:55:59 +0000 (17:55 -0500)]
device-manager: ignore udev if only console is serial console
Right now we use the heuristic, "more than one entry in
/sys/class/tty/console/active" to mean "has serial consoles".
We used to use the heuristic "file has more than tty0 in it".
The older heuristic is more accurate because a user may have
console=ttyS0 without console=tty0 on the kernel command line.
Ray Strode [Mon, 3 Mar 2014 22:25:44 +0000 (17:25 -0500)]
device-manager: defer /dev/fb compat processing until after coldplug
We never want to use a /dev/fb device if a DRM device will work instead
(since it supports multi-monitor, isn't a legacy interface, etc)
Unfortunately, right now plymouthd notices efifb at early start up,
see's there is no DRM device associated with it and chooses it for
the main display, which causes all sort of problems.
This commit defers using /dev/fb devices until after udev settles.
Ray Strode [Mon, 3 Mar 2014 18:27:30 +0000 (13:27 -0500)]
device-manager: handle drm hotplug separately from /dev/fb
Right now, we piggyback off fb subsystem events to know whether or
not a drm device is hotplugged (since all drm devices have fb devices
for backward compat).
This commit makes drm and fb processing more independent, so we don't
rely on the compat device being available for drm hotplug to work..
Ray Strode [Fri, 7 Feb 2014 21:40:07 +0000 (16:40 -0500)]
client: support plymouth.debug on kernel command line
We used to use plymouth:debug to enable debugging in the
plymouth daemon, and changed it to plymouth.debug to be more
consistent with other users of the kernel command line.
We neglected to update the client to support the new format
though. This commit does that.
Ray Strode [Thu, 6 Feb 2014 20:22:54 +0000 (15:22 -0500)]
main: detach from keyboard on hide-splash
Currently plymouth stays in control of the terminal
after hide-splash. This is wrong. Once plymouth is
hidden, the terminal should be free to use for other
programs.
This commit makes sure we free up the terminal on
hide splash.
Ray Strode [Wed, 5 Feb 2014 20:12:17 +0000 (15:12 -0500)]
main: cancel show_splash timeout on deactivate
This fixes a race/crash where plymouthd get deactivated
right before the show timer fires and it tries to
show itself after things have been torn down.
populate-initrd: install binaries to their configured location
If plymouth is configured --with-system-root-install=no then the
systemd unitd files will write the paths of plymouth and plymouthd
relative to /usr . The script currently hardcodes installing them
to the initrd's /
This commit makes sure they get placed on the same part of the of
the initrd filesystem as systemd expects to find them.
Ray Strode [Fri, 24 Jan 2014 20:08:10 +0000 (15:08 -0500)]
seat: proceed without renderer if type is AUTO and renderer fails
If a seat gets opened with a renderer type of AUTO, and the renderer
fails to open, then it's okay and expected to proceed without a
renderer (and just use the terminal). The code attempted to do this
but failed to nullify the seat->renderer object, so it ended up
going down the renderer-active code path.
Ray Strode [Fri, 24 Jan 2014 19:29:31 +0000 (14:29 -0500)]
main: disable hotplug events and splash delay if details forced
There's no point in waiting for a graphics device if details are
forced, and we shouldn't ever delay showing details. If details
are requested, we shouldn't be hiding them.
Ray Strode [Fri, 24 Jan 2014 19:08:16 +0000 (14:08 -0500)]
plymouthd: build with -rdynamic so built-in module works
The details plugin is "built in" to the plymouthd binary, so
it's always available even if the details module isn't installed
(say /usr isn't mounted yet or something)
Unfortunately, this feature isn't working because plymouthd isn't
built with -rdynamic (except for in my local CFLAGS).
If plymouth show-splash blocks until the splash screen is shown,
then systemd-ask-for-password-plymouth will block for 5 seconds
before asking for the password (which would have canceled the 5
second delay if it weren't for the dependency on plymouth-start.service)
Ray Strode [Fri, 10 Jan 2014 18:01:02 +0000 (13:01 -0500)]
main: introduce delay as a daemon option
Briefly, the two-step plugin would delay showing itself
for a few seconds (in case the machine boots quickly).
That got reverted, because i'm not convinced any longer
that doing it in the splash is the right level. Also,
the implementation had various bugs causing the delay
to show up at the wrong time.
This commit makes it a daemon option instead.
This makes it easier to apply to all themes, and also makes it
so the admin can opt-out without changing themes.
Ray Strode [Fri, 10 Jan 2014 16:47:08 +0000 (11:47 -0500)]
main: clear is_shown state from hide_splash
Right now we clear is_shown after calling hide_splash in a couple
of places. It makes more sense to clear this flag in one place,
in hide_splash, rather than duplicating code.
Ray Strode [Fri, 10 Jan 2014 18:26:16 +0000 (13:26 -0500)]
main: load default splash settings at start up
There's no reason to load them lazily, and when
we extend the functions to add a theme delay setting,
we're going to want to have the settings available as early as
possible.
Ray Strode [Fri, 10 Jan 2014 16:10:16 +0000 (11:10 -0500)]
main: refactor theme loading code to reduce duplication
Right now we read /usr/share/plymouthd/plymouthd.defaults
and /etc/plymouth/plymouthd.conf to find the configured splash
screen. The two functions that do this are basically copy-and-paste
of each other.
This commits splits some of the duplicated code out into a common
function for clarity. Doing this also helps to facilitate adding
more configuration options, which we'll need to do in the future
to support a global start up delay.
Ray Strode [Fri, 10 Jan 2014 15:33:14 +0000 (10:33 -0500)]
main: don't skip asking for password if splash is coming up
If the client asks for a password and we don't have a splash
screen, we currently reply with a NOANSWER reply which makes
the client ask for the password instead. This is so ask-for-password
requests that come up when plymouthd isn't controlling the tty can be
handled.
These days show-splash requests are asynchronous and so a splash screen
might not be around "right now" but will be around in the near
future. In these cases, we really want plymouth to handle asking for
the password, because it's going to take control of the tty imminently,
so the client won't able able to ask for the password (and, of course,
we'd rather the splash ask for the password anyway, since it's a better
user experience)
This commit checks if there's a looming show splash request. If there
is, it avoids doing the NOANSWER reply and instead just sits tight
waiting for the splash to come up and the user to enter the password.
build-goo: link libudev with libply-splash-core instead of plymouthd
The libply-splash-core library provides functions for controlling the
input and output of the splash screen.
Recently it gained support for device enumeration from udev using the
libudev library. When that support was added, the linker and compiler
flags of the plymouthd binary were augmented, instead of the the
libply-splash-core library directly. That broke the build on some
systems.
This commit moves the linker and compiler flags to the correct place.
Ray Strode [Wed, 11 Dec 2013 17:53:38 +0000 (12:53 -0500)]
device-manager: protect against local console seat getting created more than once
We watch for udev events even after forcing fall back, so we need to
make sure we don't allocate two seats for the local console if we
fallback then get a late event.
Ray Strode [Tue, 10 Dec 2013 21:07:01 +0000 (16:07 -0500)]
main: reconsolidate loading and showing of splashes
Recently, loading a splash was separated from showing the
splash. This ends up breaking fall back to the text splash,
because we don't know if we need to fall back until after
the default splash fails to show.
Ray Strode [Tue, 10 Dec 2013 18:38:41 +0000 (13:38 -0500)]
device-manager: handle text fallback better
Right now, we'll wait indefinitely for graphics devices to show up
before showing the splash screen.
This means text splashes don't get shown, at all.
This commit changes the initial scan for graphics devices, to
include uninitialized ones. If there aren't any, then we fall
back. If there are some, we know an add event will be coming, so
we don't fall back. We still handle already initialized devices
right away.
Ray Strode [Wed, 11 Dec 2013 17:10:08 +0000 (12:10 -0500)]
systemd-units: ensure udevd is started before plymouthd
We need to make sure udevd is started before plymouthd since we
need to know that "queue is empty" means "coldplug complete" not
"coldplug hasn't started yet".
Ray Strode [Tue, 10 Dec 2013 06:29:30 +0000 (01:29 -0500)]
branch-merge: land udev support
A certain class of machines don't work in plymouth because
they draw the kernel console to /dev/dri/card1 instead of
/dev/dri/card2.
This branch fixes that, by adding support for querying udev
to determine the available drm devices.
As part of this effort, some clean up was performed:
1) a bunch of bit rotted tests were removed
2) large chunks of code were moved from main.c to helper
objects implemented in other files.
3) Other parts of main.c were moved around or refactored
so they were easier to read.
Based on work from Kevin Murphy <kemurphy.cmu@gmail.com>
Ray Strode [Mon, 9 Dec 2013 18:13:38 +0000 (13:13 -0500)]
device-manager: add support for udev device enumeration
At the moment, we hardcode /dev/dri/card0 for the DRM device.
This works well enough in the lion's share of cases, but there are cases
where it falls over. Namely, machines with multiple GPUs, such as
optimus hardware, sometimes end up with the kernel fb console going to
/dev/dri/card1.
Rather than trying /dev/dri/card0 then /dev/dri/card1 etc in succession,
this commit, instead, adds support for querying udev for the
information.
Ray Strode [Tue, 10 Dec 2013 02:13:13 +0000 (21:13 -0500)]
renderer: add way to get device_name that was passed to constructor
It's useful to be able to figure out which renderer a given renderer
is, by examining the device that is associated with it.
This commit adds and accessor function to return the device that
was passed to ply_renderer_new.
At the moment, it does not return the device name if NULL was passed
to the constructor and the device was figured out automatically. A
future commit may add that ability if it becomes necessary.
Ray Strode [Mon, 9 Dec 2013 19:28:42 +0000 (14:28 -0500)]
drm: support activating without terminal
If there are multiple DRM devices, only one
can really be reading from the terminal at a time.
We currently punt this issue by ignoring all but
the first drm device.
In preparation for supporting more than one DRM device,
we need to come up with a solution.
This commit changes the DRM renderer plugin to allow getting
a NULL terminal. In this way, we can assign the terminal to
one of the DRM cards, but still output to the others.
Note, we never pass NULL for a terminal yet, that comes later.
Ray Strode [Mon, 9 Dec 2013 02:09:15 +0000 (21:09 -0500)]
main: use new device manager class
Now that we have a class for managing our seats, let's use it.
This gets a lot of the nitty gritty logic out of main.c and
paves the way for us to do smartcard device management going
forward.
Ray Strode [Mon, 9 Dec 2013 02:03:46 +0000 (21:03 -0500)]
splash-core: add device manager class
There's quite a bit of logic for managing input and output in
main.c right now. That code is already a bit too complicated,
but will get even more complicated going forward if we want
to add udev support, etc.
In an effort to keep things from getting too unwieldly, this
commit breaks out a lot of the logic into a new
ply-device-manager class.
A subsequent commit will make main.c use the new class.
Ray Strode [Tue, 3 Dec 2013 03:37:30 +0000 (22:37 -0500)]
boot-splash: strip out old api
Now that main.c is attaching seat objects to the boot splash,
instead of the seat's individual components, we can drop the
apis that allow doing things piecewise.
Ray Strode [Fri, 29 Nov 2013 16:28:52 +0000 (11:28 -0500)]
boot-splash: add support for seat objects
ply_boot_splash_t currently gets notified about displays and keyboard
objects to pass along to the splash plugins.
Now that we have a ply_seat_t object that can encapsulate display
and keyboard objects, we should add support to ply_boot_splash_t for
using it.
This commit does that. For now, it does it without changing the plugin
interface (which is still in terms of displays and keyboards).
Note, this commit only adds support for seat objects to
ply_boot_splash_t. It doesn't actually change any of the calling code
to use that support. That will come in a subsequent commit.
Ray Strode [Thu, 5 Dec 2013 20:02:35 +0000 (15:02 -0500)]
main: get rid of start_boot_splash
start_boot_splash is a convenience function that's going to
get in the way in the future. It also has the annoying
"boolean argument" problem that load_theme had.
This commit gets rid of start_boot_splash entirely.
Ray Strode [Thu, 5 Dec 2013 19:39:50 +0000 (14:39 -0500)]
main: split start_boot_splash up into two functions
Right now start_boot_splash loads the theme, then
shows it.
It's going to be useful in the future to preload the
theme, so this commit breaks the two operations out
into two functions, load_theme and show_theme,
and makes start_boot_splash just call those two
functions.
Ray Strode [Tue, 3 Dec 2013 03:07:37 +0000 (22:07 -0500)]
boot-splash: set KD_TEXT from main instead of boot_splash object
Now that debugging keybindings are gone, ply-boot-splash is really
just a wrapper around splash plugins. As such, it doesn't really
make sense to be mucking with terminal objects from it.
This commit moves that mucking to main until I can find a better
destination for it.
Ray Strode [Sun, 1 Dec 2013 01:34:24 +0000 (20:34 -0500)]
terminal: add new get_name() method
The name is passed in at construct time, but it gets canonicalized.
This commit adds api to get the final name. The api is also useful,
since it prevents callers that need the mapping from having to maintain
it separately, which will be good for a future clean up.