Commit graph

1849 commits

Author SHA1 Message Date
Ray Strode
7bdd4fc0e1 main: don't unredirect /dev/console from on_show_splash
The code that's there, doesn't make much sense, so this
commit removes it.
2013-12-05 13:11:16 -05:00
Ray Strode
68fd7da44c main: require /sys/class/tty/console/active to have plymouth on serial consoles
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.
2013-12-05 13:11:13 -05:00
Ray Strode
3a356a450f tests: drop for now
They're fairly bitrotten, don't tie into make check,
and aren't that useful.

Drop them for now, until we can come up with a better
story.
2013-12-03 13:50:34 -05:00
Ray Strode
9b211cb173 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.
2013-12-03 13:50:34 -05:00
Ray Strode
ca0b7cc87d boot-splash: drop debugging keybindings
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.
2013-12-03 13:50:34 -05:00
Ray Strode
a20a99790c main: maintain better accounting of terminals
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.
2013-12-03 13:50:30 -05:00
Ray Strode
27f0711414 hashtable: add get_size method
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.
2013-12-03 10:51:32 -05:00
Ray Strode
c72bf93546 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.
2013-12-03 10:51:32 -05:00
Ray Strode
67addd18e3 renderer: use enum for selecting renderer type, not plugin path
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.
2013-12-03 10:51:32 -05:00
Ray Strode
43583e44dc main: drop check_for_consoles call at startup
It was only used to make kernel_console_tty get set,
which we no longer have.
2013-12-03 10:51:32 -05:00
Ray Strode
6b2b068e04 main: drop kernel_console_tty
We aren't actually really using it anymore.  It gets checked
in on place in the debugging code, but only before it's set.

This commit drops it.
2013-12-03 10:51:32 -05:00
Ray Strode
63e9b4faee main: drop parameters for check_for_consoles function
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.
2013-12-03 10:51:32 -05:00
Daniel Drake
10e0810976 drm: simplify device open
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
2013-12-03 10:28:07 -05:00
Ray Strode
37d2e400d2 systemd-units: don't timeout the plymouth waiting
A timeout causes things to fail, so we shouldn't timeout.
2013-11-15 12:41:59 -05:00
Ray Strode
540ae58fe0 two-step: fix unlock screen
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.
2013-11-08 08:39:37 -05:00
Ray Strode
17976ac538 two-step: introduce delayed startup
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.
2013-10-25 16:24:47 -04:00
Ray Strode
a834730ce7 two-step: add support for watermark
The watermark is overlaid on top of the background but below all the
other content.
2013-10-24 09:33:17 -04:00
Ray Strode
b817332e2a two-step: delete extraneous log spew 2013-10-23 20:19:35 -04:00
Ray Strode
73695b0979 two-step: add support for tiled background image
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.
2013-10-23 17:00:25 -04:00
Ray Strode
051c935ab8 ply-image: add tiling support
This follow up commit adds tiling support to images, so
that splash screens can have been background patterns instead
of just background colors.
2013-10-23 15:55:52 -04:00
Ray Strode
4bdf650605 pixel-buffer: add tiling function
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.
2013-10-23 15:55:52 -04:00
Ray Strode
c5a9005b1c configure: add back --enable-tracing
It was accidentally removed, when dropping device specific drm support.
2013-10-23 15:55:06 -04:00
Matthias Clasen
efc285dab8 docs: add docbook based man pages
This commit adds man pages for the plymouthd and plymouth client
commands.
2013-10-21 17:56:45 -04:00
Ray Strode
319448f651 scripts: make plymouth-update-initrd somewhat more useful
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)
2013-10-15 09:52:46 -04:00
Ray Strode
5277809e5a main: force tty to /dev/tty if $DISPLAY is set
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.
2013-09-23 15:21:30 -04:00
William Jon McCann
7f83a660c9 Make contact the default text plugin
And rename the old text plugin "tribar"

https://bugs.freedesktop.org/show_bug.cgi?id=55286
2013-09-23 15:09:07 -04:00
William Jon McCann
4a824ff649 Add contact plugin
https://bugs.freedesktop.org/show_bug.cgi?id=55286
2013-09-23 15:09:07 -04:00
Ray Strode
c0bd3030ae configure: don't bother with rhgb-compat-link anymore
it's been N years since rhgb, let's toggle the default to no.
2013-09-03 17:42:46 -04:00
Ikey Doherty
0e89685806 drm: drop driver specific renderers
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
2013-09-03 17:32:37 -04:00
Frederic Crozat
53f6b44e11 systemd units: halt/reboot/kexec/power systemd unit have changed names
Ensure we use the new 'systemd-' prefixed names now.
2013-07-29 17:41:30 +02:00
Colin Walters
de4f23a868 systemd units: Replace prefdm.service with display-manager.service
The former is dead, the latter is the new name.  See:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=b2c9cbafb8b1a2742978e1faf37fbb3cf4fb5d44
https://fedoraproject.org/wiki/Features/DisplayManagerRework
2013-07-19 10:25:20 -04:00
Ray Strode
7fd7fd1a82 key-file: ignore leading spaces and blank lines
leading spaces and blank lines currently cause parse errors.
This commit fixes the parser to be more lenient.

https://bugs.freedesktop.org/show_bug.cgi?id=67006
2013-07-17 15:07:43 -04:00
Steve Langasek
cb2595ac56 Miscellaneous fixes for compiler warnings
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".
2013-06-30 14:44:47 -04:00
Steve Langasek
88c30d233f script: include head with prototype of ply_get_timestamp()
ply_get_timestamp() returns a double, but the compiler assumes it will
return an int if ply-utils.h isn't #included.  This disparity between
what gets returned and what the compiler is expecting will be returned
causes astonishing knock-on effects (the label plugin fails to display
any text). See:

https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/1187318

and

http://lists.freedesktop.org/archives/plymouth/2013-June/000733.html
2013-06-28 14:29:40 -04:00
Frederic Crozat
0d610f91e2 main: redirect standard io to /dev/null
do not redirect standard io to console tty anymore, it can cause issue
with Xorg grabbing tty
(https://bugzilla.novell.com/show_bug.cgi?id=811185).

Initial patch by Ray Strode
2013-06-11 16:37:16 +02:00
Frederic Crozat
cf99635f16 systemd: make sure to ignore all exit codes in ExecStartPost 2013-06-10 13:19:48 -04:00
Ray Strode
bb92122a92 terminal-session: don't close ptmx unless it's opened
This prevents a scary close(-1) in straces.
2013-06-10 11:11:56 -04:00
Ray Strode
41560df672 terminal-session: plug /dev/console fd leak
When we stop redirecting console messages, we temporarly open
/dev/console.  We don't ever close it.

This commit fixes that.
2013-06-10 10:44:56 -04:00
Ray Strode
5784c8ff0c logger: don't close already logger if already closed
This prevents close(-1) from showing up in strace
2013-06-06 10:08:55 -04:00
Jeff Mahoney
f2b74ce9c0 plymouth: Add line numbers to tracing output
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>
2013-04-16 08:48:40 -04:00
Cristian Rodríguez
e83a754b91 Lookup the location of udevadm
It is not always in /bin , but /usr/...
2013-04-16 08:48:05 -04:00
Cristian Rodríguez
de67b2d021 configure: Use pkgconfig to determine the systemd unit dir location
Don't assume it's in /lib/systemd/system
2013-04-14 12:08:55 -04:00
Cristian Rodríguez
8f373680dd systemd: Look up systemd-tty-ask-password-agent location
Don't assume it's in /bin.
2013-04-14 12:06:38 -04:00
Dave Airlie
32ae2addfb drm: inform kernel about recently flushed areas
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.
2013-03-26 12:18:10 -04:00
Ray Strode
5f3ebd4f6d systemd: add Wants: systemd-vconsole-setup.service
Harald says we need it.
2013-03-26 11:41:55 -04:00
Ray Strode
8be792a5a7 systemd: add plymouth-start.service to initrd-switch-root.target
<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
2013-03-13 10:24:14 -04:00
Ray Strode
e2b0c7c772 animation,throbber: go back to frame dropping
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.
2013-03-12 12:01:21 -04:00
Ray Strode
054d29019d main: use correct cache file
Now that we allow switching into the initrd we shouldn't try
to load the boot cache file when shutting down.
2013-02-25 14:42:48 -05:00
Ray Strode
59d78b4427 main: all update-root-fs for shutdown
Some distros now switch root back to the initrd at shutdown.

This commit allows plymouth to go along for the ride.
2013-02-25 14:39:25 -05:00
Ville Skyttä
5ee5644f6c generate-initrd: Use pigz if available. 2013-02-12 17:33:19 -05:00