Ray Strode [Wed, 13 Mar 2013 14:24:14 +0000 (10:24 -0400)]
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
Ray Strode [Tue, 12 Mar 2013 15:57:15 +0000 (11:57 -0400)]
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.
Ray Strode [Tue, 11 Dec 2012 19:37:16 +0000 (14:37 -0500)]
utils: don't create pipes non-blocking
The daemonizing code depends on its pipe io being
blocking. The other user of ply_open_unidirectional_pipe
will work with blocking or non blocking io.
This commit changes ply_open_unidirectional_pipe to create
blocking pipes. This started causing failures with
commit 9ec69929 since it replaced broken code (passing
O_NONBLOCK to fcntl(fd, F_SETFD.. instead of F_SETFL)
with working code.
Will Woods [Thu, 29 Nov 2012 15:25:03 +0000 (10:25 -0500)]
populate-initrd: If PLYMOUTH_THEME_NAME is set, write it into plymouthd.conf
You can set PLYMOUTH_THEME_NAME when building initramfs to get a
different theme into initramfs, but this doesn't change the default
theme, so the resulting initramfs won't actually use the theme we
installed.
This patch makes plymouth-populate-initrd rewrite the 'Theme=XXX' line
in plymouthd.conf, so plymouth will use the theme we install.
Ray Strode [Wed, 24 Oct 2012 20:26:27 +0000 (16:26 -0400)]
x11: make window fullscreen by default
The x11 plugin currently does multi-head by default, which is
sometimes useful, but often just gets in the way.
This commit makes it use one, fullscreen head by default, and
falls back to the old behavior if the PLY_CREATE_FAKE_MULTI_HEAD_SETUP
environment variable is set.
Ray Strode [Wed, 24 Oct 2012 19:40:48 +0000 (15:40 -0400)]
space-flares: reshow label after changing message
We should call ply_label_show any time we have a message
to show, so that if the root filesystem gets mounted, we
can try to load the label plugin again.
This should prevent weird situations where the text shows up
invisible unless the user hits escape twice.
Ray Strode [Wed, 24 Oct 2012 19:40:48 +0000 (15:40 -0400)]
fade-throbber: reshow label after changing message
We should call ply_label_show any time we have a message
to show, so that if the root filesystem gets mounted, we
can try to load the label plugin again.
This should prevent weird situations where the text shows up
invisible unless the user hits escape twice.
Ray Strode [Wed, 24 Oct 2012 19:40:48 +0000 (15:40 -0400)]
throbgress: reshow label after changing message
We should call ply_label_show any time we have a message
to show, so that if the root filesystem gets mounted, we
can try to load the label plugin again.
This should prevent weird situations where the text shows up
invisible unless the user hits escape twice.
Ray Strode [Wed, 24 Oct 2012 19:40:48 +0000 (15:40 -0400)]
two-step: reshow label after changing message
We should call ply_label_show any time we have a message
to show, so that if the root filesystem gets mounted, we
can try to load the label plugin again.
This should prevent weird situations where the text shows up
invisible unless the user hits escape twice.
Ray Strode [Wed, 24 Oct 2012 17:08:41 +0000 (13:08 -0400)]
throbber: stop throbber when freed
It's possible that a throbber could get freed while animating.
In that case, stop the animation right away, so we don't keep
running the animation timeout on freed memory.
Ray Strode [Wed, 24 Oct 2012 17:08:41 +0000 (13:08 -0400)]
animaton: stop animation when freed
It's possible that an animation could get freed before it finishes.
In that case, finish the animation right away, so we don't keep running the
animation timeout on freed memory.
It's possible to get in a state where plymouthd is
started in the initrd but not displayed. In the
event this happens, we'll neglect to ever show it,
since it already has a pid file.
plymouthd is now hardened against getting called
multiple times, so we no longer need to protect it
at the systemd level.
This commit drops the
ConditionPathExists=!@plymouthruntimedir@/pid
line from the systemd service file, so we always
call plymouthd from the main fs and always call
plymouth show-splash.
main: silently succeed if plymouthd is started a second time
Make plymouthd idempotent to multiple calls. This will make
it easier to integrate with boot scripts that start plymouthd
in the initrd and from the main fs.
The first thing plymouthd should do is try to take control
over its server socket. If it can't do that, then no plymouth
client will be able to communicate with it. The socket is
also how we can detect if plymouthd is already running.
Ray Strode [Thu, 26 Jul 2012 17:05:22 +0000 (13:05 -0400)]
systemd: don't run read-write service from initrd
the initrd hits the local-fs.target as part of its normal
boot process. We used to use local-fs.target as a way of
knowing the system / is read-write. This no longer is a
valid mechanism.
This commit:
1) Stops installing plymouth-read-write service in the initrd
2) Makes it so if it does end up in the initrd it won't be
used
David Herrmann [Sun, 24 Jun 2012 10:06:07 +0000 (12:06 +0200)]
frame-buffer: fix flush_area fast-path
plymouth uses a shadow framebuffer to cache screen contents for
quick compositing. This shadow framebuffer may or may not have
the same memory layout as the hardware framebuffer. In cases
where the size and layout of pixels are the same between the shadow
framebuffer and the hardware framebuffer we can memcpy()
the pixels line-by-line to the hardware. If the width of area being
flushed is the same number of bytes as the width of the hardware buffer,
then we can memcpy() the entire flush area in one call to memcpy.
The check for this latter fast-path has a miscalculation that tests
the number of pixels in the flush area width to number of bytes in the
buffer width. This commit adds the * 4 multiplier to correctly compare
bytes with bytes instead of pixels with bytes.
This commit also adds a sanity check to make sure the byte size of the
hardware framebuffer width is equal to the advertised row stride.
Ray Strode [Wed, 20 Jun 2012 15:19:05 +0000 (11:19 -0400)]
systemd: drop weird udev trigger --attr-match=class=0x030000
plymouth-start.service does this sort of hacky
"udevadm trigger" stuff before doing plymouth show-splash,
to ensure plymouth show-splash is called after the
graphcis subsystem is up.
It actually does two calls:
- one call that triggers any pci devices with the class
0x030000 (which is "vga compatible display device")
- another call that triggers the gpu subsystem
and I can't find any historical context on why its needed. As I
understand things, the latter should be a superset of the former.
Furthermore, the first trigger is missing a --subsystem-match=pci call
so it's matching the "class" attribute in every subsystem, which is slow.
I'm going to drop the first trigger until I start hitting problems
and need to add it back.
Ray Strode [Wed, 20 Jun 2012 14:41:59 +0000 (10:41 -0400)]
systemd: add --subsystem=pci to udevadm trigger call
plymouth-start.service does this sort of hacky
"udevadm trigger" call before doing plymouth show-splash,
to ensure plymouth show-splash is called after the
graphcis subsystem is up. Because this udev trigger call
only passes --subsystem-match calls with no corresponding
--subsystem call, it will trawl through all subsystems in
/sys rather than just the pci subsystem (where all the matches
are guaranteed to be).
This commit adds --subsystem=pci to stop doing that extra work.
All of this will eventually be replaced with plymouthd either
listening for the udev events itself (or potentially logind,
if logind gains a way to tag a "graphics" capability on a seat).
Ray Strode [Wed, 6 Jun 2012 17:35:18 +0000 (13:35 -0400)]
two-step: set is_idle=TRUE at shutdown time
Right now, we do the end animation immediately if in
shutdown mode. This is because shutdown is fast,
and we don't try to estimate how long it will take.
The code depends on is_idle being true after the end
animation is run, but we neglect to do that in the
shutdown case.
This commit makes shutdown mode just call
"become_idle" right away, and deletes the duplicated
shutdown code path.
Ray Strode [Wed, 6 Jun 2012 15:55:35 +0000 (11:55 -0400)]
drm: flush pending draw to kernel buffer on vt switch
When plymouth's VT is not the foreground VT, we tell the
kernel not to scan out from the kernel buffer we manage.
Also, we don't bother dispatching rendering to the kernel
buffer (since it's not getting scanned out anyway).
When plymouth's VT becomes the foreground VT, we tell the
kernel to start scanning out from our buffer again.
Unfortunately, we neglect to flush all the pending drawing
that happens while VT switched away.
This means we briefly show stale contents.
This commit flushes all pending rendering to the kernel,
before resetting the scan out buffer, so we get a current
view of the splash shown immediately.
Kevin Murphy [Tue, 8 May 2012 09:02:08 +0000 (05:02 -0400)]
drm: for minimum buffer size to be greater than 0
The drm driver tells us the minimum dimensions it supports
for buffer objects. We use this minimum for creating a
small temporary 32-bit buffer to test if 32-bit buffers
are supported.
Unfortunately, some drivers neglect to fill in
min_width/min_height and then we try to allocate a buffer
with 0 sized dimensions.
This commit checks for min_width/min_height being 0, and then
bumps them to 1.
This commit starts to document plymouth to help
new contributors get into the code.
The aim of the document is to provide useful information,
such as the overall architecture, the most
important data structures, and howto recipes for
typical user cases, like debugging.
The document is explicitly not meant to be detailed API documentation.
In the future, that type of documentation may be provided with gtk-doc
style annotations.
The documentation is written in asciidoc
(http://www.methods.co.nz/asciidoc/) and is therefore easily readable as
its ascii text and can also be translated into more rich formats
(like HTML).
For example, to get an HTML version of the document:
yum install asciidoc (or equivalent for your distribution)
cd docs
make development.html
two-step: quit properly when boot finishes while waiting for password
When the computer is progressing through its boot up process, plymouth
calls into the splash plugin's on_boot_progress function at regular
intervals with increasing values for "percent_done". At some point, it
gets to 90% done, and that's when two-step begins its finishing
animation sequence. As soon as this sequence finishes, two-step pulls
its stop trigger, which
1) sets its "is_idle" flag to true and
2) pulls the core plymouthd code's idle trigger, to notify that
code that it's at a good animation frame to quit (if the core
plymouthd code has an idle trigger set up)
During the boot process, the user may need to enter a password
(the "plymouth ask-for-password" command). When that happens,
the splash waits for the user to enter a password, but boot progresses
in the background.
If the user then enters a password, the boot animation restarts again
(from the display_normal function). This restarting of the boot
animation will cause the "is_idle" flag of the splash to get set back
to false.
Later when plymouthd wants to quit, it calls the become_idle function
of the splash plugin. That function notices "is_idle" is false, and
the stop_trigger is not NULL. The function isn't suited to work
with this combination, and so at this point the splash never
tells the code daemon code it's idle.
This commit changes on_boot_progress to return before looking at
percent_done, if the user is getting asked a question. This way
the stop_trigger won't get created prematurely, and is_idle won't
get out of sync.
Dave Airlie [Thu, 26 Apr 2012 19:00:00 +0000 (20:00 +0100)]
drm: add generic driver to drm renderer plugin
Since around 2.6.39, the kernel has offered a generic ioctl interface
for modesetting (the KMS 'dumb' interface). This interface is now
provided by most all of the modesetting drivers.
Adding support for this interface means that plymouth will automatically
gain support for new modesetting drivers going forward.
This commit adds that support. Some changes made by Ray Strode.