Ray Strode [Sat, 28 Mar 2015 05:08:03 +0000 (01:08 -0400)]
device-manager: drop seat abstraction in public interface
The seat abstraction turns out to be pretty wrong headed.
It forces us to make a decision on which output devices to couple
the input device to, which doesn't really make sense in the face
of multiple video cards.
This commit drops the seat object from the device manager api,
and changes the users of the api to work on the underlying
device objects directly.
Under the hood the device manager code still uses ply_seat_t.
That will get mopped up in a future commit.
Ray Strode [Sun, 22 Mar 2015 04:42:22 +0000 (21:42 -0700)]
two-step: fix drawing of background image
The background image is tiled to cover the entire screen, so
we must pass a fill area that covers the screen or sampling
will be wrong. But we must also pass a clip area or we will
have expensive overdraw.
Sjoerd Simons [Mon, 8 Dec 2014 10:50:47 +0000 (11:50 +0100)]
script: Don't draw backgrounds if they're obscured
When drawing sprites it's a waste to draw the background if the target
area will be obscured by the sprit to draw. Optimize for the common case
where only one sprite is being drawn by peeking at the first item in the
sprite list to check if it is opaque and fills the area.
Sjoerd Simons [Mon, 8 Dec 2014 10:47:12 +0000 (11:47 +0100)]
ply-image: Don't do alpha pre-multiplication for opaque pixels
When transforming the output of libpng to ARG32 with pre-multiplied
alpha, only do the multiplications if the pixel isn't opaque. Otherwise
plymouth is just applying a very complicated identity function.
Sjoerd Simons [Mon, 8 Dec 2014 10:42:26 +0000 (11:42 +0100)]
pixel-buffer: Optimize filling with opaque buffers
If the source buffer is known to be fully opaque and the fill is done at
full opacity, simply memcpy the data row-by-row instead of iterating over
every pixel and blending it with the target buffer.
This could be optimized more, in the future, in some cases, by memcpy of
the entire block instead of row-by-row.
Sjoerd Simons [Mon, 8 Dec 2014 10:39:39 +0000 (11:39 +0100)]
pixel-buffer: add ability track opaqueness
Pixel buffers contain ARGB32 data. Add functionality to mark a buffer as
containing only fully opaque pixels. This functionality can be used by
rendering functions to be able to optimize drawing of such buffers.
Yixun Lan [Fri, 20 Mar 2015 17:02:35 +0000 (13:02 -0400)]
systemd: Allow specifying unit dir to configure
systemd isn't necessarily in the buildroot at the time that plymouth
gets built, so autodetection of the unitdir from pkgconfig isn't
necessarily feasible.
This commit adds a new option to configure, --with-systemdunitdir,
that lets distros specify the unit directory manually.
two-step: Add separate startup / shutdown animations
In the case of Endless, we have a very fluid active bootup animation
that looks quite excellent for turning the computer on, but when turning
it off or restarting, it's sort of awkward to have the same animation
play. For our use case, we want to simply show our watermark.
ply-animation: Fix drawing if it happens before the timeout
animation->frame_area isn't filled in until the timeout, but clients
might draw it beforehand. Since animation->frame_area isn't used
anywhere else and we already have the x/y values in animation->x/y,
just use those and remove animation->frame_area.
Ray Strode [Fri, 7 Nov 2014 18:30:33 +0000 (10:30 -0800)]
animation: don't report success when no frames were added
Currently, the animation object will report success when assets are *found* in
the directory. When loading those assets, code will apply more checks to
determine if the assets are meant for the animation.
In case none of them are, we'll end up not adding any frames, so we
should not report a successful load.
Cosimo Cecchi [Fri, 7 Nov 2014 18:30:33 +0000 (10:30 -0800)]
throbber: don't report success when no frames were added
Currently, the throbber will report success when assets are *found* in
the directory. When loading those assets, code will apply more checks to
determine if the assets are meant for the throbber.
In case none of them are, we'll end up not adding any frames, so we
should not report a successful load.
Cosimo Cecchi [Fri, 7 Nov 2014 18:12:52 +0000 (10:12 -0800)]
throbber: don't report successful load when no assets
Currently, the throbber will report a successful load when zero assets
are loaded. Change it so that zero assets do not result in a
successfully loaded throbber.
Sjoerd Simons [Thu, 13 Nov 2014 12:09:34 +0000 (13:09 +0100)]
script: Add SetRefreshRate function
The script plugin hardcodes an FPS value of 50, which for some themes
and various devices is a bit much. Add a new function
(Plymouth.SetRefreshRate) which sets the rate at which the
RefreshFunction gets called so each script theme can determine their most
appropriate rate.
Ray Strode [Wed, 22 Oct 2014 15:27:31 +0000 (11:27 -0400)]
main: fix up mode confusion
plymouthd runs in a particular mode "boot" "shutdown" "updates" at any
given time. Likewise, the plymouth splash object also takes a mode.
These modes map 1-to-1 with each other, and there is more than one place
in the code where we need to get the splash mode from the overall mode.
This commit adds a helper function to perform this translation, and
cleans up the places where the wrong mode type is used or the
translation performed is incomplete.
Ray Strode [Mon, 28 Jul 2014 13:58:49 +0000 (09:58 -0400)]
text-step-bar: use correct utf-8 multibyte sequence for ■
For some reason in commit 113526408c5706c9efc7f43c3f8258354e762677
I commited the sequence \x25\x96\xa0 in place of the block character
that was there before. I don't know where I got \x25 from, but it's
not right (and couldn't even be right since the high order bit isn't
set which is a requirement for the first byte in multi-byte utf-8
sequences).
This commit uses \xe2 instead which I got from doing:
Ray Strode [Mon, 14 Jul 2014 12:04:54 +0000 (08:04 -0400)]
seat: be a little more forgiving in the case there's no open terminal
We can end up in a situation where a seat object doesn't have a terminal
associated with it. In that case we shouldn't crash, but continue on
with no input available for that seat.
configure: bump point release and ABI versions of libraries.
Due to removed interfaces since 0.8.8:
ply_boot_splash_set_keyboard
ply_boot_splash_unset_keyboard
ply_boot_splash_add_pixel_display
ply_boot_splash_remove_pixel_display
ply_boot_splash_add_text_display
ply_boot_splash_remove_text_display
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.