]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
12 years agotext-progress-bar: Try to be more defensive about text leaks fix-text-spew
Ray Strode [Tue, 18 Sep 2012 19:31:35 +0000 (15:31 -0400)] 
text-progress-bar: Try to be more defensive about text leaks

We try to prevent text from showing through in the text splash,
by disable dmesg to screen and by redirecting console messages to
a log file.

Still, occasionally a kernel message may leak through.  This
commit tries to harden against that by moving the cursor up to
home when we aren't using it.

12 years agotext: drop unused defines
Ray Strode [Tue, 18 Sep 2012 18:34:27 +0000 (14:34 -0400)] 
text: drop unused defines

12 years agoservice: start plymouthd unconditionally
Cosimo Cecchi [Mon, 10 Sep 2012 20:32:45 +0000 (16:32 -0400)] 
service: start plymouthd unconditionally

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.

12 years agomain: silently succeed if plymouthd is started a second time
Cosimo Cecchi [Mon, 10 Sep 2012 20:33:53 +0000 (16:33 -0400)] 
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.

12 years agomain: Try to own socket before anything else
Cosimo Cecchi [Mon, 10 Sep 2012 20:44:46 +0000 (16:44 -0400)] 
main: Try to own socket before anything else

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.

12 years agomain: fix debug message
Cosimo Cecchi [Mon, 10 Sep 2012 20:43:09 +0000 (16:43 -0400)] 
main: fix debug message

If plymouthd is already running, then a second invocation will
fail with the message:

could not log bootup

This message is misleading, so fix it.

12 years agoconfigure: bump to 0.8.7 0.8.7
Ray Strode [Mon, 20 Aug 2012 23:25:52 +0000 (19:25 -0400)] 
configure: bump to 0.8.7

12 years agosystemd: start after udev triggers
Ray Strode [Mon, 20 Aug 2012 18:35:34 +0000 (14:35 -0400)] 
systemd: start after udev triggers

This fixes the race where udevadm settle finishes too early.

13 years agorevert spurious broken changes in master commit 468c53a
Alban Browaeys [Mon, 13 Aug 2012 07:52:17 +0000 (09:52 +0200)] 
revert spurious broken changes in master commit 468c53a

https://bugs.freedesktop.org/show_bug.cgi?id=53440

13 years agoscript: Add alignment argument to Image.Text
Anisse Astier [Tue, 7 Aug 2012 08:22:09 +0000 (10:22 +0200)] 
script: Add alignment argument to Image.Text

Enables scripts to choose the text alignment they want with a seventh
argument to Image.Text API:

    new_image = Image.Text("Hello\n"
                           "Plymouth aligned world",
                            1, 1, 1, 1,
                           "DejaVu Bold,Italic 18",
                           "center");

This argument can be ignored, the default being left aligned.
Possible values are "left", "center", or "right".

http://lists.freedesktop.org/archives/plymouth/2012-August/000676.html

13 years agoply-text-progress-bar: strip quotes if present
Jan Engelhardt [Sun, 29 Jul 2012 18:25:21 +0000 (20:25 +0200)] 
ply-text-progress-bar: strip quotes if present

The syntax for sysconfig-style files allows for quotes.

13 years agobuild: fix typo in configure.ac
Jan Engelhardt [Sun, 29 Jul 2012 17:34:15 +0000 (19:34 +0200)] 
build: fix typo in configure.ac

s/reelase/release/

13 years agoply-terminal: remove pointless casts
Jan Engelhardt [Sun, 29 Jul 2012 17:11:21 +0000 (19:11 +0200)] 
ply-terminal: remove pointless casts

The target variables are already of the desired type.

13 years agosystemd: don't run read-write service from initrd
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

Related to fedora bug 830482

13 years agothrobgress: s/TRUE/true/
Ray Strode [Tue, 24 Jul 2012 02:49:24 +0000 (22:49 -0400)] 
throbgress: s/TRUE/true/

I introduced a compilation error in Ian's patch when changing it
slightly.

13 years agothrogress: pull trigger right away if already idle
Ian Pilcher [Mon, 23 Jul 2012 21:54:19 +0000 (17:54 -0400)] 
throgress: pull trigger right away if already idle

commit eed536ba544dee38aee3c697efd2e3980362954a introduced
a fix for hangs in the two-step plugin. This is a comparable
commit for throbgress.

https://bugzilla.redhat.com/show_bug.cgi?id=704658

13 years agoconfigure: bump to 0.8.6.2
Ray Strode [Mon, 23 Jul 2012 17:33:18 +0000 (13:33 -0400)] 
configure: bump to 0.8.6.2

13 years agopopulate-initrd: copy service files to initrd
Ray Strode [Mon, 23 Jul 2012 17:22:46 +0000 (13:22 -0400)] 
populate-initrd: copy service files to initrd

Since we're in charge of the systemd service files now,
we should probably be in charge of copying them to the initrd.

13 years agosystemd: add plymouth-switch-root.service
Ray Strode [Mon, 23 Jul 2012 17:08:45 +0000 (13:08 -0400)] 
systemd: add plymouth-switch-root.service

This service file is needed by systemdized dracut to ensure we properly
transition from the initrd to the root file system

13 years agosystemd: more updates to start service
Ray Strode [Mon, 23 Jul 2012 21:36:03 +0000 (17:36 -0400)] 
systemd: more updates to start service

The dashes next to the semi-colons seem to confuse systemd so drop them.

13 years agosystemd: create missing links various targets
Frederic Crozat [Fri, 20 Jul 2012 13:28:31 +0000 (15:28 +0200)] 
systemd: create missing links various targets

13 years agosystemd: make sure plymouth-start never gets killed
Ray Strode [Tue, 17 Jul 2012 21:12:03 +0000 (17:12 -0400)] 
systemd: make sure plymouth-start never gets killed

systemd tries to bring down the world when going from
the initramfs to /

commit 9e5a276f322cfce46b5b2ed2125cb9ec67df7e9f tried
to prevent plymouthd from getting killed by settings
argv[0][0] to @

This isn't seemingly sufficient.  Throw some lines into
the plymouth-start service file that should hopefully help.

13 years agopopulate-initrd: put plymouthd in /sbin not /bin
Ray Strode [Tue, 17 Jul 2012 21:09:18 +0000 (17:09 -0400)] 
populate-initrd: put plymouthd in /sbin not /bin

This matches what we do post-boot better

13 years agoconfigure: bump to 0.8.6.1 0.8.6.1
Ray Strode [Tue, 10 Jul 2012 14:18:13 +0000 (10:18 -0400)] 
configure: bump to 0.8.6.1

13 years agosystemd: unfoul up Makefile
Ray Strode [Tue, 10 Jul 2012 14:16:29 +0000 (10:16 -0400)] 
systemd: unfoul up Makefile

The previous systemd commit introduced a file named

systemd-ask-password-plymouth.path.in

The makefile was only looking for .service.in files
when stripping the .in suffix, so it got installed
incorrectly.

This commit fixes up the Makefile.

13 years agoconfigure: bump to 0.8.6
Ray Strode [Tue, 10 Jul 2012 14:16:13 +0000 (10:16 -0400)] 
configure: bump to 0.8.6

13 years agosystemd: add two more files 0.8.6
Ray Strode [Mon, 9 Jul 2012 15:59:59 +0000 (11:59 -0400)] 
systemd: add two more files

When plymouth service files were moved from systemd to plymouth
two files got lost in the shuffle.

This commit adds them.

http://bugzilla.freedesktop.org/51573

13 years agoframe-buffer: fix flush_area fast-path
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.

13 years agosystemd: more udev clean ups
Ray Strode [Wed, 20 Jun 2012 15:57:06 +0000 (11:57 -0400)] 
systemd: more udev clean ups

The udev trigger calls that are there, are actually
spurious.  udev will coldplug those subsystems at
start up anyway, so doing it explicitly is wrong.

This commit drops those trigger calls.

What does matter is the udevadm settle call. It's
what makes things block until the graphics driver
is loaded.

udevadm settle is a big sledgehammer, though. It blocks
until all the triggered events (even stuff unrelated to
graphics) are finished.

This commit adds a --exit-if-exists argument to udevadm settle,
so it will bail early as soon as the graphics devices
are up.

13 years agosystemd: drop weird udev trigger --attr-match=class=0x030000
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

The first call is borrowed from dracut:

http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=commitdiff;h=2c02c8318

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.

13 years agoRevert "systemd: add --subsystem=pci to udevadm trigger call"
Ray Strode [Wed, 20 Jun 2012 15:01:07 +0000 (11:01 -0400)] 
Revert "systemd: add --subsystem=pci to udevadm trigger call"

This reverts commit cf90d3c7faa1499c2ce239cde68873302b411d74.

It was wrong. I misunderstood what Kay told me.

13 years agosystemd: add --subsystem=pci to udevadm trigger call
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).

13 years agotext-progress-bar: Initial os-string to "" when can't be read
Ray Strode [Wed, 13 Jun 2012 10:56:56 +0000 (06:56 -0400)] 
text-progress-bar: Initial os-string to "" when can't be read

get_os_string either returns a string describing the distribution,
or NULL on error.

This NULL later causes problems since we run strlen on it.

This commit makes get_os_string return "" instead of NULL for error
cases.

Spotted by Andreas Henriksson.

13 years agotwo-step: implement the system-update command
Richard Hughes [Fri, 8 Jun 2012 10:32:52 +0000 (11:32 +0100)] 
two-step: implement the system-update command

https://bugs.freedesktop.org/show_bug.cgi?id=50876

13 years agomain: add a system-update command that can pass update progress to the daemon
Richard Hughes [Fri, 8 Jun 2012 08:09:52 +0000 (09:09 +0100)] 
main: add a system-update command that can pass update progress to the daemon

https://bugs.freedesktop.org/show_bug.cgi?id=50876

13 years agomain: add a change-mode command to be able to switch the splash mode at runtime
Richard Hughes [Thu, 7 Jun 2012 16:01:53 +0000 (17:01 +0100)] 
main: add a change-mode command to be able to switch the splash mode at runtime

https://bugs.freedesktop.org/show_bug.cgi?id=50847

13 years agomain: add an 'updates' mode for installing offline updates
Richard Hughes [Thu, 7 Jun 2012 18:55:19 +0000 (19:55 +0100)] 
main: add an 'updates' mode for installing offline updates

https://bugs.freedesktop.org/show_bug.cgi?id=50847

13 years agolibply: remove the unused SPLASH_MODE_SUSPEND and SPLASH_MODE_RESUME
Richard Hughes [Thu, 7 Jun 2012 18:49:59 +0000 (19:49 +0100)] 
libply: remove the unused SPLASH_MODE_SUSPEND and SPLASH_MODE_RESUME

https://bugs.freedesktop.org/show_bug.cgi?id=50847

13 years agomain: show the correct trace message if a message is supressed
Richard Hughes [Thu, 7 Jun 2012 15:20:13 +0000 (16:20 +0100)] 
main: show the correct trace message if a message is supressed

https://bugs.freedesktop.org/show_bug.cgi?id=50845

13 years agothrobgress plugin: show messages in the top left corner
Richard Hughes [Thu, 7 Jun 2012 15:18:19 +0000 (16:18 +0100)] 
throbgress plugin: show messages in the top left corner

https://bugs.freedesktop.org/show_bug.cgi?id=50845

13 years agospace-flares plugin: show messages in the top left corner
Richard Hughes [Thu, 7 Jun 2012 15:17:36 +0000 (16:17 +0100)] 
space-flares plugin: show messages in the top left corner

https://bugs.freedesktop.org/show_bug.cgi?id=50845

13 years agofade-throbber plugin: show messages in the top left corner
Richard Hughes [Thu, 7 Jun 2012 15:16:52 +0000 (16:16 +0100)] 
fade-throbber plugin: show messages in the top left corner

https://bugs.freedesktop.org/show_bug.cgi?id=50845

13 years agoconfigure: make gtk optional
Ray Strode [Fri, 8 Jun 2012 21:21:23 +0000 (17:21 -0400)] 
configure: make gtk optional

https://bugs.freedesktop.org/show_bug.cgi?id=42047

13 years agoscript: seed random number generator
Ray Strode [Fri, 8 Jun 2012 20:52:29 +0000 (16:52 -0400)] 
script: seed random number generator

Most splash plugins that use random numbers
seed the random number generator with the
current time, but script fails, too.

This commit fixes that.

https://bugs.freedesktop.org/show_bug.cgi?id=42632

13 years agosplash: drop SIGINT handlers
Ray Strode [Fri, 8 Jun 2012 19:11:52 +0000 (15:11 -0400)] 
splash: drop SIGINT handlers

They serve no real purpose.

https://bugs.freedesktop.org/show_bug.cgi?id=42285

13 years agoconfigure: bump to 0.8.5.1 0.8.5.1
Ray Strode [Wed, 6 Jun 2012 20:14:07 +0000 (16:14 -0400)] 
configure: bump to 0.8.5.1

13 years agoconfigure: allow building drm renderer without driver dependent backends
Ray Strode [Wed, 6 Jun 2012 20:11:47 +0000 (16:11 -0400)] 
configure: allow building drm renderer without driver dependent backends

Since we support the dumb ioctl now, it's useful to build the drm
renderer without support for the individual drivers.

This commit allows for that.

13 years agoconfigure: don't build intel/radeon/nouveau/libkms drivers by default 0.8.5
Ray Strode [Wed, 6 Jun 2012 19:14:37 +0000 (15:14 -0400)] 
configure: don't build intel/radeon/nouveau/libkms drivers by default

Now that we have the dumb ioctl there's little reason to build
these guys, since it's just as good.

I'll probably drop the code entirely soon.

13 years agopopulate-initrd: don't depend on inst from mkinitrd/dracut
Ray Strode [Wed, 6 Jun 2012 19:10:35 +0000 (15:10 -0400)] 
populate-initrd: don't depend on inst from mkinitrd/dracut

Having the dependency is awkward and causes problems, so
don't bother.

This commit just copy and pastes the relevant bits for
inst().

Ideally, this would be an installroot command implemented in
C in util-linux, but shrug

13 years agotwo-step: set is_idle=TRUE at shutdown time wip/systemd-fixes
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.

13 years agodrm: flush pending draw to kernel buffer on vt switch
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.

13 years agodrm: don't set mode initially if on different vt
Ray Strode [Wed, 6 Jun 2012 15:51:47 +0000 (11:51 -0400)] 
drm: don't set mode initially if on different vt

In the shutdown path we start out on a different
vt than where the splash is drawn.  Make sure we
don't set a mode until the jump.

This prevents unnecessary flicker.

13 years agoRevert "main: force frame-buffer plugin at shutdown"
Ray Strode [Tue, 5 Jun 2012 17:03:06 +0000 (13:03 -0400)] 
Revert "main: force frame-buffer plugin at shutdown"

This reverts commit 3f14f2700e031e6fbb674ebb1ab86a73b4469dc8.

Forcing frame-buffer plugin makes multi-monitor look really bad.
Instead, depend on the init system to make sure we stay alive
until the end.

13 years agosystemd: pull units from systemd tree
Ray Strode [Sat, 2 Jun 2012 15:15:56 +0000 (11:15 -0400)] 
systemd: pull units from systemd tree

Kay and Lenny want the service files shipped with plymouth
instead of systemd, so toss them into the tree.

13 years agomain: rename process to be more systemd friendly
Ray Strode [Sat, 2 Jun 2012 15:13:19 +0000 (11:13 -0400)] 
main: rename process to be more systemd friendly

Systemd will cleanse the system of running processes
in the hand over from the initrd to the main root filesystem,
and at shutdown.

In both cases we want to keep on chugging, so we tag ourselves
in a way that systemd won't kill us.

See http://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons

13 years agodrm: for minimum buffer size to be greater than 0
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.

Minor changes to initial patch by Ray Strode.

13 years agoclient: add new flush api
Steve Langasek [Fri, 11 May 2012 07:38:17 +0000 (00:38 -0700)] 
client: add new flush api

In some cases, clients may need a way to ensure that all queued
messages have been flushed and are sent to the daemon
(before, for instance, exiting).

This commit adds an API to block until the outgoing request queue is
empty.

13 years agodocs: Add keyboard shortcuts
Dr. Tilmann Bubeck [Wed, 9 May 2012 11:35:37 +0000 (13:35 +0200)] 
docs: Add keyboard shortcuts

This commit adds four keyboard shortcuts to the developer
documentation that were found from reading the source:

Esc: Toggle between system console and plymouth boot animation.

Ctrl-V: Toogle verbose mode on and off.

Ctrl-U or Ctrl-W: erase a line

13 years agodocs: do a pass over new development.txt
Ray Strode [Tue, 8 May 2012 03:54:28 +0000 (23:54 -0400)] 
docs: do a pass over new development.txt

I just did a quick read through and made various changes here and
there.

13 years agodocs: specify where to send contributions
Ray Strode [Tue, 8 May 2012 02:33:15 +0000 (22:33 -0400)] 
docs: specify where to send contributions

13 years agodocs: Start document for developers
Dr. Tilmann Bubeck [Tue, 8 May 2012 02:16:14 +0000 (22:16 -0400)] 
docs: Start document for developers

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

13 years agotwo-step: quit properly when boot finishes while waiting for password
Dr. Tilmann Bubeck [Wed, 2 May 2012 16:18:13 +0000 (18:18 +0200)] 
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.

https://bugs.freedesktop.org/show_bug.cgi?id=49355

13 years agodrm: rename ENABLE_GDM_TRANSITION to ENABLE_GDM_DEPRECATED_TRANSITION
Ray Strode [Thu, 3 May 2012 20:52:52 +0000 (16:52 -0400)] 
drm: rename ENABLE_GDM_TRANSITION to ENABLE_GDM_DEPRECATED_TRANSITION

Most distributions no longer use this transition, which relies
on plymouth quitting before X starts.

For clarity, rename the #define to include the word DEPRECATED

13 years agodrm: add generic driver to drm renderer plugin
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.

13 years agolabel: add alignment and width for labels.
Dr. Tilmann Bubeck [Mon, 23 Apr 2012 06:06:03 +0000 (08:06 +0200)] 
label: add alignment and width for labels.

A ply_label can now be alignment with ply_label_set_alignment()
taking one of PLY_LABEL_ALIGN_LEFT, PLY_LABEL_ALIGN_CENTER, or
PLY_LABEL_ALIGN_RIGHT.

This alignment is made within a horizontal box which width can be set with
ply_label_set_width().

Both functions are now used by the plugin "two-step" to make sure, that
the prompt for "ask-for-password" gets centered on the screen. Previously
the prompt started in the middle of the screen and was cropped at the right
border of the screen (fixes bz #681513). This lead to unreadable prompts
for disk encryption.

13 years agodrm: use queried minimum size, not 1x1 for dummy buffer
Ray Strode [Tue, 1 May 2012 16:42:33 +0000 (12:42 -0400)] 
drm: use queried minimum size, not 1x1 for dummy buffer

The previous commit tries to create a 32bpp 1x1 dummy buffer
to know whether or not the modesetting driver can handle
our needs.  It's concievable (though not realized in practice) that
the driver could support our needs fine, but not support buffers
as small as 1x1.

This commit uses the queried minimum buffer dimensions for the dummy
buffer instead of assuming 1x1.

13 years agodrm: ensure modesetting driver supports 32bpp fb
Ray Strode [Tue, 1 May 2012 16:24:11 +0000 (12:24 -0400)] 
drm: ensure modesetting driver supports 32bpp fb

Now that more and more hardware is getting kms support,
we need to be more careful about what hardware we try to
run on.  Cirrus cards can't make 32bpp framebuffers, which
is all we support in the drm renderer.

This commit tries to create a small buffer up front, just
to see if the driver will allow it.  If the driver chokes,
then we bail and fall back to the /dev/fb renderer, which
is more tolerant of aging hardware.

13 years agomain: corrected error in read_consoles_from_file
Kevin Murphy [Fri, 27 Apr 2012 05:11:14 +0000 (01:11 -0400)] 
main: corrected error in read_consoles_from_file

13 years agomain: fix bug in add_consoles_from_file
Kevin Murphy [Thu, 26 Apr 2012 14:39:36 +0000 (10:39 -0400)] 
main: fix bug in add_consoles_from_file

commit 6baab7a8f889f6b48cb559fd5a62750203f62c3b was the
result of Ray Strode splitting part of a larger patch
out. The splitting and subsequent modifications weren't
completely right.

This commit contains some fixes to address the problems
with those changes.

13 years agomain: add plymouth.ignore-serial-consoles
Ray Strode [Wed, 25 Apr 2012 22:22:00 +0000 (18:22 -0400)] 
main: add plymouth.ignore-serial-consoles

This commit adds plymouth.ignore-serial-consoles kernel command
line for OLPC to use.

Eventually, we'll support multiple plugins at once, and we can
run details on the serial console and e.g. two-step on the main
console and then this argument won't be needed.

13 years agoRevert "main: add way to ignore /sys/class/tty/console/active"
Ray Strode [Wed, 25 Apr 2012 22:17:26 +0000 (18:17 -0400)] 
Revert "main: add way to ignore /sys/class/tty/console/active"

This reverts commit 9e3071520db104b6a87a7f6a011e83319db4b586.

This command line option is sort of awkward. It would be better
to provide a kernel command line escape hatch.

13 years agomain: add default console for default scenarios
Ray Strode [Wed, 25 Apr 2012 22:01:45 +0000 (18:01 -0400)] 
main: add default console for default scenarios

commit e810532e5d2387e121bbded67c1b4cccc01dda4c contained
a function called add_consoles_from_file that was a badly
modified version of add_consoles_from_kernel_command_line
changed to read from /sys/class/tty/console/active instead
of /proc/cmdline.

Previously, if we had console=SOMETHING on the kernel command
line, then we would assume the user is using serial consoles
and force details.  This translated to if add_consoles_from_file
finds any devices in /sys/class/tty/console/active force details.

Of course, /sys/class/tty/console/active contains tty0 even when
the user doesn't specify console=tty0 on the kernel command line,
so this broke show-splash calls.

This commit changes the logic bit.  We now only force details if
there is some console in the list that isn't tty0.

This restores show-splash functionality.

13 years agomain: make add_consoles_from_file more robust
Kevin Murphy [Sun, 22 Apr 2012 06:06:42 +0000 (02:06 -0400)] 
main: make add_consoles_from_file more robust

add_consoles_from_file was a little fast and loose in its parsing.

This commit makes it a little more fault tolerant.

Patch split from larger patch, and modified by Ray Strode.

13 years agoevent-loop: hold reference to ready sources while handling timeouts
James Hunt [Mon, 23 Apr 2012 08:14:40 +0000 (09:14 +0100)] 
event-loop: hold reference to ready sources while handling timeouts

If ply_event_loop_handle_timeouts() is called before the events returned
by epoll_wait() are given references, a timeout handler can prematurely
free an event source by calling ply_event_loop_stop_watching_fd leading
to crashes and other undefined behaviour since
ply_event_loop_process_pending_events() dispatches the event sources
returned by epoll_wait() after the timeouts have been handled.

Thanks to cjwatson for a simpler solution to my original fix.

Minor changes by Ray Strode.

https://bugs.freedesktop.org/show_bug.cgi?id=28548

13 years agoevent-loop: drop redundant EINTR/EAGAIN check
Ray Strode [Tue, 24 Apr 2012 21:58:18 +0000 (17:58 -0400)] 
event-loop: drop redundant EINTR/EAGAIN check

We check it a couple lines earlier in the code, so
there's no reason to check it again.

13 years agomain: add way to ignore /sys/class/tty/console/active
Ray Strode [Tue, 10 Apr 2012 14:14:30 +0000 (10:14 -0400)] 
main: add way to ignore /sys/class/tty/console/active

Previously OLPC used --kernel-command-line to make plymouth
ignore specific consoles.  That no longer works, now that we
read from /sys/class/tty/console/active

This commit adds an escape hatch, a way to get back to the old
behavior.

13 years agomain: rename remaining_command_line to remaining_file_contents
Ray Strode [Mon, 9 Apr 2012 18:34:46 +0000 (14:34 -0400)] 
main: rename remaining_command_line to remaining_file_contents

add_consoles_from_file suffers from a sever case of
cut-and-paste-itis.  This commit renames its variable
"remaining_command_line" to "remaining_file_contents" so that
the variable name actually makes sense.

13 years agomain: more console fixes
Ray Strode [Mon, 9 Apr 2012 18:33:08 +0000 (14:33 -0400)] 
main: more console fixes

When parsing /sys/class/tty/console/active,
we need to make sure we jump over spaces in
the command line

13 years agomain: only force details if system has non-tty0 console
Ray Strode [Mon, 9 Apr 2012 18:27:44 +0000 (14:27 -0400)] 
main: only force details if system has non-tty0 console

Right now we're unconditionally forcing details mode,
which is clearly wrong.

13 years agopopulate-initrd: add new location for dracut source functions
Ray Strode [Wed, 4 Apr 2012 19:02:53 +0000 (15:02 -0400)] 
populate-initrd: add new location for dracut source functions

13 years agomain: more console fixes
Ray Strode [Wed, 4 Apr 2012 15:41:40 +0000 (11:41 -0400)] 
main: more console fixes

13 years agomain: break out of loop when hitting trailing new line
Ray Strode [Wed, 4 Apr 2012 15:38:45 +0000 (11:38 -0400)] 
main: break out of loop when hitting trailing new line

It's important to ignore chunks of the active tty buffer
that are just whitespace.

13 years agomain: fix inverted conditional in active console reading code
Ray Strode [Wed, 4 Apr 2012 15:28:26 +0000 (11:28 -0400)] 
main: fix inverted conditional in active console reading code

We were failing when read succeeded, not when it failed, so
we were always reverting to fallback.

13 years agomain: strdup default tty
Ray Strode [Wed, 4 Apr 2012 14:42:12 +0000 (10:42 -0400)] 
main: strdup default tty

Just noticed a memory management problem when looking through
the code.

13 years agomain: Also show splash for 'splash=silent' arguments (which is what we use in Mageia) 0.8.4
Colin Guthrie [Thu, 15 Dec 2011 10:35:07 +0000 (10:35 +0000)] 
main: Also show splash for 'splash=silent' arguments (which is what we use in Mageia)

13 years agomain: Fix parsing of plymouth.debug=stream: argument.
Colin Guthrie [Thu, 15 Dec 2011 10:27:51 +0000 (10:27 +0000)] 
main: Fix parsing of plymouth.debug=stream: argument.

It did not terminate at space so the log file to use was not
properly defined and any additional kernel command line args were
added to the end of the file name.

13 years agoulibc: Change the link order + add -ldl
Per Øyvind Karlsen [Fri, 26 Nov 2010 16:24:18 +0000 (16:24 +0000)] 
ulibc: Change the link order + add -ldl

ulibc linking is a bit more particular than regular glibc

13 years agoulibc: Make the /usr/lib substitution less greedy.
Per Øyvind Karlsen [Wed, 9 Dec 2009 06:43:32 +0000 (06:43 +0000)] 
ulibc: Make the /usr/lib substitution less greedy.

13 years agoulibc: Add header needed when compiling against ulibc
Per Øyvind Karlsen [Sat, 5 Dec 2009 05:46:59 +0000 (05:46 +0000)] 
ulibc: Add header needed when compiling against ulibc

13 years agoframe-buffer: use /dev/fb0 as default device
Daniel Drake [Sat, 17 Mar 2012 06:39:03 +0000 (02:39 -0400)] 
frame-buffer: use /dev/fb0 as default device

The /dev/fb symlink doesn't get created with any recent udev version.
dracut puts it in place "by hand" before starting plymouthd, which is
why things aren't broken in configurations that use dracut's plymouth
module.

Update the default device path so that it works out-of-the-box in
other setups too.

13 years agoply-splash-graphics: ensure link in config file
Daniel Drake [Sat, 17 Mar 2012 06:38:00 +0000 (02:38 -0400)] 
ply-splash-graphics: ensure link in config file

While building a theme externally I found that the link to
libply-splash-graphics was missing, due to an omission in the config
file.

13 years agoplymouth-populate-initrd: Check for new path to dracut-functions
Ray Strode [Thu, 23 Feb 2012 15:04:37 +0000 (10:04 -0500)] 
plymouth-populate-initrd: Check for new path to dracut-functions

13 years agoRevert "Hang around until killed by init at shutdown"
Ray Strode [Thu, 19 Jan 2012 17:32:11 +0000 (12:32 -0500)] 
Revert "Hang around until killed by init at shutdown"

This reverts commit 841068ba125f30fedd52b62490c6a7424b30c768.

That commit made plymouthd hang around until the last round
of slayings by init to keep the splash screen up as long as
possible.

That adds 5 seconds to shut down in some cases, though, so
is wrong.  Instead we need a solution that keeps the splash
around after plymouth exits.

See http://bugzilla.redhat.com/744932

13 years agomain: read consoles from /sys/class/tty/console/active
Ray Strode [Fri, 2 Dec 2011 22:18:41 +0000 (17:18 -0500)] 
main: read consoles from /sys/class/tty/console/active

We currently read the list of available consoles from the
kernel command line.

This isn't the most reliable way to do things.

This commit changes the code to read

/sys/class/tty/console/active

instead.

13 years agomain: close all terminals, not just local console terminal
Ray Strode [Thu, 13 Oct 2011 04:26:54 +0000 (00:26 -0400)] 
main: close all terminals, not just local console terminal

It's important we close all terminals in the shutdown path,
so they all get unlocked and returned to cooked mode.

Previously, we would just close the local console terminal,
which meant other terminals would end up left in a broken state.

13 years agomain: rename state->terminal to state->local_console_terminal
Ray Strode [Thu, 13 Oct 2011 04:01:42 +0000 (00:01 -0400)] 
main: rename state->terminal to state->local_console_terminal

state->terminal is used for VT handling code.  To make it clear
what its role is, rename it to state->local_console_terminal.

13 years agomain: don't overwrite state->terminal if there are multiple consoles
Ray Strode [Thu, 13 Oct 2011 02:38:53 +0000 (22:38 -0400)] 
main: don't overwrite state->terminal if there are multiple consoles

We call the add_display_and_keyboard_for_terminal function for
every console passed into the kernel command line and once for
/dev/tty1 if no console line is passed in. This function
repeatedly, reinitializes state->terminal with whatever
terminal is passed in each time its called.

This commit changes add_display_and_keyboard_for_terminal to not
touch state->terminal and instead makes the callers do it
(if appropriate)

13 years agoboot-splash: deduce terminal from text display
Ray Strode [Thu, 13 Oct 2011 03:32:36 +0000 (23:32 -0400)] 
boot-splash: deduce terminal from text display

Right now we pass a terminal to the constructor of the boot splash
object.  This terminal is used for going to KD_TEXT mode when
ctrl-T is tapped or when hiding the splash.

We only need to do this, though, when:

1) we're running on a local vt
2) we're showing graphics

the boot-splash code has all the knowledge it needs to figure these
two things out on its own, and furtermore it already can figure out
which terminal is the relevant one without being told at construct
time.

This commit adds those smarts to the boot splash code.

13 years agomain: fix kernel command line parsing
Ray Strode [Wed, 12 Oct 2011 19:50:56 +0000 (15:50 -0400)] 
main: fix kernel command line parsing

check_for_consoles has another bug (surprised?) where it would
jump too many characters forward if the command line has
console=tty0 in it, since tty0 is transparently changed to /dev/tty1.

13 years agomain: plug fd leak
James Hunt [Wed, 12 Oct 2011 02:11:10 +0000 (22:11 -0400)] 
main: plug fd leak

This plugs an fd leak in an error path