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.
This commit drops the aging fallback code for when
/sys/class/tty/console/active is unavailable.
This should have no impact for people running recent kernels, and
minimal impact for people running old kernels.
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.
The boot splash currently lets the user hit ctrl-L to refresh,
ctrl-T to force text mode, and ctrl-V to toggle verbose messages.
These easter eggs are undocumented and really only used when I
was first writing plymouth.
These days it's just taking up space, so drop it.
Currently terminals are created in the main file and passed
down to other layers, with no direct reference maintained in
the main file.
There are points when we need to get references to all those
terminals again, and we have to fish them out from other layers.
This commit makes it all more explicit, maintaining the terminals
in a hash table in the main state object.
Right now there's no easy way to know if a hash table is empty,
which I'm going to need in a future commit.
This commit adds a get_size method to return the number of items in
the hash table.
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.
ply_renderer_new takes a path to a renderer plugin, or NULL to
try each one in turn.
It's cleaner to abstract the path behind an enum type, so this
commit makes that change.
Now it will be possible to instantiate specific renderers without
hardcoding the paths to plugins in more than one place.
both the default tty and whether or not displays should be added
are available in the global state object (as state->default_tty
and state->is_shown respectively), so they don't need to be parameters.
The latter one was a boolean, so having it as a parameter was confusing
at the call sites.
This commit drops the parameters.
libdrm's open functions are just wrappers around open(), and our
detection of which parameter to pass to drmOpen() is not 100%
reliable.
Simplify the code and just call open() directly.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=71590
The previous commit introduced a bug where the unlock screen won't
get shown if it's requested within the first 5 seconds of startup.
This commit fixes that by forcing a redraw if the state switches from
NORMAL.
Many machines these days can boot in 5 seconds or less.
In those cases, there's little point in showing a boot splash.
This commit introduces a StartupDelay option to the two step
plugin to prevent it from displaying anything for a few seconds.
If there's a file named background-tile.png in the theme
then it will get used as the background behind the other
content in place of the background gradient.
It can be useful to tile a group of pixels across the screen
(for e.g. backgrounds).
This commit adds API to pixel buffer to do that tiling.
A follow up commit will add support into ply-image so images can
be loaded from disk and then tiled on screen.
plymouth-update-initrd is a script that should probably be eventually
dropped. It was originally created to unpack and initrd and graft
plymouth in. Later, it just became a thin wrapper around mkinitrd.
These days, very few (any?) distros use mkinitrd. Change it to call
dracut instead.
Relevant irc log:
<newfo> this is SO WRONG:
http://cgit.freedesktop.org/plymouth/tree/scripts/plymouth-update-initrd
<newfo> it won't work on any distro
<newfo> would you mind updating that please?
<newfo> replace the mkinitrd line in
/usr/libexec/plymouth/plymouth-update-initrd to dracut -f
/boot/initramfs-$(uname -r).img $(uname -r)
<-- newfo has quit (Client Quit)
the X11 renderer is useful for testing themes without rebooting,
but it really only functions if the user puts --tty=/dev/tty or
similar. Furthermore, if a user neglects to do that really bad
stuff happens since plymouth will try to take over VT1.
This commit makes --tty=/dev/tty implied if $DISPLAY is set.
All the major modesetting drivers support the generic interface now, so
there's no reason to have driver specific code.
This commit drops all that extra code and hard codes the generic interface
Fix various warnings turned up with -Wall. After fixing these remaining
issues, plymouth now builds successfully with gcc 4.8 using
"-Werror -Wno-error=unused-result -Wno-error=sign-compare".
The plymouth tracing output lists the function but there are many
cases in which the same message is issued from multiple places in the same
function, which makes debugging more difficult. This patch adds the line
number to the output to uniquely identify each site.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
Some drivers (QXL in particular) require to be notified when a part
of the mapped frame buffer memory is changed.
This commit adds a drmModeDirtyFB call after flushing changes to the
frame buffer to accomplish that.
<haraldh> halfline, can you add plymouth-start.service to
plymouth-populate-initrd ??
<halfline> haraldh: sure, can you give me details on the bug its fixing?
<haraldh> except, if you put yourself out of the plymouth cgroup
<haraldh> and the "@" in argv[0][0]
<haraldh> better put plymouth-start.service in the
initrd-switch-root.target
<haraldh> easier
<halfline> well we already do the "@" in argv[0][0]
<halfline> and we already put KillMode=none SendSIGKILL=no in the
service file
<halfline> but will add the change
<haraldh> hmm, ok
Right now we figure out which animation frame to use
based on a static counter variable. Since it's static
instead of per-object, if there are multiple instances
it ends up counting up too fast.
We could:
1) make it per-object state
2) drop it and use the ifdef'd out alternative implementation
that potentially drops frames if the machine is sluggish
This commit chooses 2, but we may end up going to one if the
frame dropping turns out to be problematic.
Based on deductive work from Kevin Murphy.