]> git.ipfire.org Git - thirdparty/plymouth.git/log
thirdparty/plymouth.git
6 years agoMerge branch 'two-step-multi-head-pw-crash-fix' into 'master'
Hans de Goede [Tue, 27 Nov 2018 07:48:14 +0000 (07:48 +0000)] 
Merge branch 'two-step-multi-head-pw-crash-fix' into 'master'

two-step: Fix crash asking for password with multiple heads

See merge request plymouth/plymouth!15

6 years agotwo-step: Fix crash asking for password with multiple heads
Hans de Goede [Tue, 27 Nov 2018 07:24:20 +0000 (08:24 +0100)] 
two-step: Fix crash asking for password with multiple heads

Commit 9639ed895331 ("two-step: Fix animation not starting on later
added heads") unconditionally calls view_start_progress_animation() when
adding secondary heads, to fix the animation not running on secondary
heads when not asking for a password.

But we should not start the animation when adding a head after we've
already entered PLY_BOOT_SPLASH_DISPLAY_PASSWORD_ENTRY state, otherwise
we end up starting it a second time when the user is done entering his
password, causing plymouth to crash and the boot to hang.

We already have the is_animating bool to indicate whether animations have
been started or not, use this to decide if we should start the animation
when adding a new head, fixing the crash.

Fixes: 9639ed895331 ("two-step: Fix animation not starting on ... added heads")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
6 years agoMerge branch 'jimmac1/plymouth-master'
Hans de Goede [Fri, 23 Nov 2018 16:19:18 +0000 (17:19 +0100)] 
Merge branch 'jimmac1/plymouth-master'

6 years agospinner theme: update
Jakub Steiner [Wed, 21 Nov 2018 14:44:39 +0000 (15:44 +0100)] 
spinner theme: update

- update spinner & lock to current visuals

Hans de Goede: Add extra throbber-00##.png files to Makefile.am, small tweak
to the new lock image.

6 years agoMerge branch 'misc-fixes' into 'master'
Ray Strode [Thu, 22 Nov 2018 19:49:55 +0000 (19:49 +0000)] 
Merge branch 'misc-fixes' into 'master'

Misc fixes

Closes #29

See merge request plymouth/plymouth!9

6 years agotwo-step: Fix animation not starting on later added heads
Hans de Goede [Mon, 12 Nov 2018 11:50:33 +0000 (12:50 +0100)] 
two-step: Fix animation not starting on later added heads

Fix the animation not starting on heads added after show_splash_screen
has been called. Since the core calls show_splash_screen after adding
the first head / pixel_display in practice this fixes the animation not
starting on all monitors other then the first.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
6 years agoply-device-manager: Fix race causing undesired creation of non-gfx devs
Hans de Goede [Sat, 10 Nov 2018 15:04:31 +0000 (16:04 +0100)] 
ply-device-manager: Fix race causing undesired creation of non-gfx devs

On systems with working drm/kms devices we still sometimes see:
"Creating non-graphical devices, since there's no suitable graphics hardware"
in the logs (and actually create non-gfx devices).

This is caused by a race where the create_devices_from_udev timeout handler
runs just after the pivot-root, just at the time when the "udev trigger"
from the real root is done.

This causes create_devices_for_subsystem() to hit the "it's not initialized"
code-path for all drm and fb devices, even though before (from the initrd)
drm-devices where already setup successfully.

One way of solving this would be to stop the timer as soon as we successfully
enumerate the first drm device. But we need the timer to enumerate fb devices
so on machines where some outputs only have a fbdev driver (corner case) this
would break support for those outputs.

Instead this commit moves the found_drm_device and found_fb_device to the
global manager state and sets them from create_devices_for_udev_device().
This way they will be set when we check them from the create_devices_from_udev
timeout handler even if create_devices_for_subsystem skips over the devices
because of the udev trigger race.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
6 years agologger: Add a separator between different boot logs
Hans de Goede [Tue, 17 Jul 2018 07:46:12 +0000 (09:46 +0200)] 
logger: Add a separator between different boot logs

Since we concatenate boot logs one after the other in /var/log/boot.log
it is hard to tell where the logs from one boot end the next boot starts.

This commit makes plymouth write out a separator including a time + date
of the date, when the log file gets opened to add new boot messages to it.

Note ply_logger_open_file() is only called from ply_terminal_session_open_log()
which in turn is only used for /var/log/boot.log, so this only effects
/var/log/boot.log.

Closes #29

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
6 years agoMerge branch 'master' into 'master'
Ray Strode [Sun, 11 Nov 2018 02:15:33 +0000 (02:15 +0000)] 
Merge branch 'master' into 'master'

systemd-units: Also add "ConditionVirtualization=!container" in…

See merge request plymouth/plymouth!8

6 years agosystemd-units: Also add "ConditionVirtualization=!container" in systemd-ask-password...
Laurent Bigonville [Thu, 8 Nov 2018 11:05:05 +0000 (11:05 +0000)] 
systemd-units: Also add "ConditionVirtualization=!container" in systemd-ask-password-plymouth.path.in

This completes the fix for #27

6 years agoconfigure: bump to 0.9.5
Ray Strode [Mon, 5 Nov 2018 20:45:53 +0000 (15:45 -0500)] 
configure: bump to 0.9.5

6 years agoMerge branch 'drm-preferred-mode' into 'master' 0.9.4
Hans de Goede [Wed, 31 Oct 2018 15:04:55 +0000 (15:04 +0000)] 
Merge branch 'drm-preferred-mode' into 'master'

drm: use preferred mode for outputs

Closes #68 and #59

See merge request plymouth/plymouth!4

6 years agodrm: Use preferred mode for outputs instead of current mode
Hans de Goede [Tue, 2 Oct 2018 09:44:28 +0000 (11:44 +0200)] 
drm: Use preferred mode for outputs instead of current mode

When enumerating outputs pick the preferred mode instead of the current
active mode, which may be e.g. a very low res mode.

Sofar we've been relying on fbcon setting up the modes for us, but as
mentioned in https://bugs.freedesktop.org/show_bug.cgi?id=101520#c22
we really should not rely on this.

With the recent flickerfree boot changes we can no longer rely on fbcon
to do the setup for us, hence this commit. For now this commit only
changes the mode-picking logic on UEFI setups as we only have
flickerfree boot there. Once the setup code is more mature we should
probably always use it.

Closes #68

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
6 years agodrm: Refactor ply_renderer_connector_get_rotation
Hans de Goede [Tue, 2 Oct 2018 12:13:19 +0000 (14:13 +0200)] 
drm: Refactor ply_renderer_connector_get_rotation

ply_renderer_connector_get_rotation walks over all properties to add
support for selecting the preferred mode we also want to know if a connector
is part of a tiled output or not, which also requires walking over the props.

This commit refactors ply_renderer_connector_get_rotation into
ply_renderer_connector_get_rotation_and_tiled to prepare for this.

While at also properly use ply_pixel_buffer_rotation_t for the orientation
instead of an int.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
6 years agodrm: Reset LUT/gamma table before the first drmModeSetCrtc call
Hans de Goede [Tue, 2 Oct 2018 08:26:28 +0000 (10:26 +0200)] 
drm: Reset LUT/gamma table before the first drmModeSetCrtc call

When we takeover the kms master from whatever process came before us the
LUT table may be a mess making the graphics funky. So lets reset it once
before our first drmModeSetCrtc call.

Closes #59

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
6 years agolibply: Move kernel commandline parsing functions to libply/ply-utils
Hans de Goede [Thu, 4 Oct 2018 10:47:52 +0000 (12:47 +0200)] 
libply: Move kernel commandline parsing functions to libply/ply-utils

Move kernel commandline parsing functions to libply/ply-utils to avoid
code duplication between the daemon, the client and the plugins.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
6 years agoMerge branch 'fix-infinite-throbber' into 'master'
Michal Srb [Fri, 26 Oct 2018 14:30:45 +0000 (14:30 +0000)] 
Merge branch 'fix-infinite-throbber' into 'master'

throbber: Don't skip last frame when waiting for end.

See merge request plymouth/plymouth!7

6 years agothrobber: Don't skip last frame when waiting for end.
Michal Srb [Tue, 23 Oct 2018 07:10:25 +0000 (09:10 +0200)] 
throbber: Don't skip last frame when waiting for end.

If the stop_trigger is set and we are waiting for the last frame to stop the
animation, make sure we don't accidentally skip the last frame. It could
happen if the machine is busy and can't keep up with the frames or when the
animation has more than 60 frames (30FPS * 2 seconds).

6 years agoMerge branch 'coverity-fixes' into 'master'
Ray Strode [Tue, 16 Oct 2018 03:10:53 +0000 (03:10 +0000)] 
Merge branch 'coverity-fixes' into 'master'

Coverity fixes

See merge request plymouth/plymouth!6

6 years agoboot-server: free the argument and triggers
Ray Strode [Tue, 16 Oct 2018 01:56:03 +0000 (21:56 -0400)] 
boot-server: free the argument and triggers

coverity found some pervasive leaking of the argument
and triggers.

This commit mops them up.

6 years agoscript: fix various memory leaks
Ray Strode [Tue, 16 Oct 2018 01:44:10 +0000 (21:44 -0400)] 
script: fix various memory leaks

coverity found a few leaks.

this commit mops them up.

6 years agokey-file: ply_key_file_get_value returns duplicated memory, don't leak
Ray Strode [Tue, 16 Oct 2018 01:13:58 +0000 (21:13 -0400)] 
key-file: ply_key_file_get_value returns duplicated memory, don't leak

For some reason I made the same api misdesign with ply_key_file_t
that I made when writing GKeyFile...it returns duplicated memory for
no good reason.

This commit sprinkles frees around.

6 years agoevent-loop: fix leak in error path
Ray Strode [Tue, 16 Oct 2018 01:07:01 +0000 (21:07 -0400)] 
event-loop: fix leak in error path

ply_event_loop_new fails to clean itself up if it's unable to
create a pipe for dispatching signals.

This commit fixes that.

6 years agoboot-splash: fix memory leak in error path
Ray Strode [Tue, 16 Oct 2018 01:04:47 +0000 (21:04 -0400)] 
boot-splash: fix memory leak in error path

If the splash key file fails to load, we don't free
the associated key file object.

This commit fixes that.

6 years agopopulate-initrd: drop unused local variable
Ray Strode [Tue, 16 Oct 2018 01:02:50 +0000 (21:02 -0400)] 
populate-initrd: drop unused local variable

the inst_library function declares a variable `_lib`
that's completely unused.

This commit removes the declaration.

6 years agoMerge branch 'fix-deactivate-udev-race' into 'master'
Iain Lane [Wed, 10 Oct 2018 20:42:27 +0000 (20:42 +0000)] 
Merge branch 'fix-deactivate-udev-race' into 'master'

device-manager: don't watch for udev events when deactivated

See merge request plymouth/plymouth!5

6 years agodevice-manager: don't watch for udev events when deactivated
Ray Strode [Wed, 10 Oct 2018 19:07:37 +0000 (20:07 +0100)] 
device-manager: don't watch for udev events when deactivated

If a device gets added when we're already deactivated, plymouth shouldn't
process the device, since processing it effectively activates plymouth.

This commit pulls the udev monitor fd out of the event loop while
plymouth is deactivated so new events are deferred until reactivation.

Modified by Iain Lane <iain.lane@canonical.com>: Also deactivate the
timer that finds all devices known to udev after an interval, when
paused.

6 years agoMerge branch 'wip/dont-muck-with-login-screen-tty' into 'master'
Ray Strode [Mon, 27 Aug 2018 19:19:41 +0000 (19:19 +0000)] 
Merge branch 'wip/dont-muck-with-login-screen-tty' into 'master'

main: ensure tty is closed on deactivate

See merge request plymouth/plymouth!2

6 years agomain: ensure tty is closed on deactivate
Ray Strode [Sat, 25 Aug 2018 16:21:45 +0000 (12:21 -0400)] 
main: ensure tty is closed on deactivate

If plymouth doesn't get explicitly "activated" then when
GDM tries to deactivate it, the deactivation request is
a noop.

One aspect of being active, though is having ownership and
control of the terminal.  This happens immediately, even
before a splash is shown.

The `deactivate` request needs to relinguish such control,
unconditionally, since some display server is about to use
the tty.

This commit fixes that.

7 years agoMerge branch 'wip/container-condition-check' into 'master'
Ray Strode [Tue, 7 Aug 2018 15:41:15 +0000 (15:41 +0000)] 
Merge branch 'wip/container-condition-check' into 'master'

systemd-units: Add "ConditionVirtualization=!container"

Closes #27

See merge request plymouth/plymouth!1

7 years agosystemd-units: Add "ConditionVirtualization=!container"
Hans de Goede [Tue, 7 Aug 2018 08:15:56 +0000 (10:15 +0200)] 
systemd-units: Add "ConditionVirtualization=!container"

When running in a container with plymouth installed, plymouth is started
unnecessarily and systemd prints warnings:

[  OK  ] Reached target Shutdown.
Sending SIGTERM to remaining processes...
Sending SIGKILL to remaining processes...
Process 253 (plymouthd) has been been marked to be excluded from killing. It is running from the root file system, and thus likely to block re-mounting of the root file system to read-only. Please consider moving it into an initrd file system instead.

It makes little sense to start plymouth in contains, so add
'ConditionVirtualization=!container' everywhere where
ConditionKernelCommandLine=!plymouth.enable=0 appears to disable plymouth
in containers.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1337611
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Closes: https://gitlab.freedesktop.org/plymouth/plymouth/issues/27
7 years agoREADME: add link to Code of Conduct
Ray Strode [Mon, 6 Aug 2018 18:58:18 +0000 (14:58 -0400)] 
README: add link to Code of Conduct

7 years agotwo-step: add unhandled splash mode case to switch
Ray Strode [Tue, 10 Jul 2018 20:00:18 +0000 (16:00 -0400)] 
two-step: add unhandled splash mode case to switch

This fixes a compiler warning.

7 years agomain: fix build
Ray Strode [Tue, 10 Jul 2018 19:58:04 +0000 (15:58 -0400)] 
main: fix build

I slightly modified Hans patch in commit 129b4a50 before pushing it
and broke the build.

This fixes the build by adding a forward declaration.

7 years agoFix miscellaneous compiler warnings
Hans de Goede [Mon, 2 Jul 2018 08:29:53 +0000 (10:29 +0200)] 
Fix miscellaneous compiler warnings

Fix all compiler warnings (and one type) except for the deprectation warnings
for the gdk_screen_get_monitor_* functions used in the x11 renderer.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agoconfigure: Pass -Wno-cast-function-type if available
Hans de Goede [Mon, 2 Jul 2018 08:01:05 +0000 (10:01 +0200)] 
configure: Pass -Wno-cast-function-type if available

plymouth uses function type casts for callbacks in quite a few places, fixing
these needlessly complicates the code, so lets pass -Wno-cast-function-type.

This fixes 218 warnings like this one:

ply-command-parser.c: In function â€˜ply_command_parser_stop_parsing_arguments’:
ply-command-parser.c:680:48: warning: cast between incompatible function types from â€˜void (*)(ply_command_parser_t *)’ {aka â€˜void (*)(struct _ply_command_parser *)’} to â€˜void (*)(void *, int,  ply_event_loop_t *)’ {aka â€˜void (*)(void *, int,  struct _ply_event_loop *)’} [-Wcast-function-type]
                                                (ply_event_loop_exit_handler_t)

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agomain: Fix getting detailed logs from systemd
Hans de Goede [Tue, 26 Jun 2018 07:15:25 +0000 (09:15 +0200)] 
main: Fix getting detailed logs from systemd

This are 3 issues with the detailed logs handling:

1) plymouth attaches to the session directly on a show-splash command
(in on_show_splash()), but it does not tell systemd to start printing
details until the splash is actually shown after the splash_delay.

2) If the splash is actually shown during the initrd (e.g. a diskcript
password is necessary) then we tell the initrd systemd instance to
print details, but we don't tell the regular initrd instance which takes
over as pid 1 after the switch-root to print details.

This leads to rather inconsistent logging/printing behavior, e.g.:

* If a diskcrypt password is asked for, we only log details from
the initrd phase.

* If the boot is shorter then splash_delay no details are logged

* If the user presses ESC during boot during the initrd, only initrd
  messages are printed

* If the user presses ESC during boot after the initrd, only normal
  messages are printed

This commit fixes both these issues by:

1) Telling systemd to print details as soon as we have attached to the session;
   and to stop printing details when we detach from the session (*)
2) Telling systemd to print details after the rootfs has been remounted rw

*) This is necessary to have a smooth transition to e.g. gdm if the splash
has not shown because the boot is shorter then splash_delay

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agomain: Show details when ESC is pressed during splash_delay
Hans de Goede [Tue, 3 Jul 2018 06:44:33 +0000 (08:44 +0200)] 
main: Show details when ESC is pressed during splash_delay

Start listening for keypresses on the first show_splash() call, so that
pressing ESC while we're delaying show the non-details splash will show
the details splash.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agodrm: Remove unnecessary reset_scan_out_buffer_if_needed() call from ply_renderer_head...
Hans de Goede [Mon, 2 Jul 2018 21:46:59 +0000 (23:46 +0200)] 
drm: Remove unnecessary reset_scan_out_buffer_if_needed() call from ply_renderer_head_map()

ply_renderer_head_map() gets only called from map_to_device() which
calls activate() directly afterwards which calls
ply_renderer_head_set_scan_out_buffer(), so there is no need for the
reset_scan_out_buffer_if_needed() call.

Not only is it not needed, but it is actually harmful, there are 2 problems
woth it:

1) Normally the drm plugin gets instantiated by ply-renderer.c with
   rendered->is_active=true, backend->is_active=false. The
   rendered->is_active=true causes the first ply_renderer_activate call
   to be a no-op without calling backend->activate(). So when the first
   map_to_device() calls happen activate() has not been called yet and we've
   not yet claimed master rights, so ply_renderer_head_set_scan_out_buffer()
   calls will always fail, resulting in this in a ply-trace:

   Mapping buffer for 1920x1080 renderer head
   Redrawing 1920x1080 renderer head
   Setting scan out buffer of 1920x1080 head to our buffer
   Couldn't set scan out buffer for head with controller id 41

   This is harmless, but also shows that the reset_scan_out_buffer_if_needed()
   is really not needed.

2. If deactivate_renderer() gets called before the first show-splash then
   rendered->is_active will become false, so renderer_activate() done before
   map_to_device() will now actually call backend->activate() claiming
   drm master rights and setting backend->is_active=true.

   The map_to_device() -> ply_renderer_head_map() call done after this, calls
   ply_renderer_head_redraw() -> flush_head() which under 1. was a no-op
   as it exits directly when backend->is_active=false. But now it actually
   flushes the buffers by calling reset_scan_out_buffer_if_needed(). This
   itself is fine.

   But since reset_scan_out_buffer_if_needed() has already happened in
   ply_renderer_head_redraw() the reset_scan_out_buffer_if_needed() call this
   commit removes would always return false (no reset necessary) causing
   ply_renderer_head_map() to destroy the buffer and return an error.

   This results in the splash briefly showing, followed by the core soon after
   trying another map_to_device(), which again briefly shows the splash, etc.
   With the end result being a badly flickering display.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agomain: Only activate renderers if the splash uses pixel-displays
Hans de Goede [Mon, 2 Jul 2018 07:39:12 +0000 (09:39 +0200)] 
main: Only activate renderers if the splash uses pixel-displays

Since commit eb147e52b123 ("renderer: support reactivating renderer without
closing it first"), the show_theme() call done by
toggle_between_splash_and_details() will reactivate the renderers after
switching to details mode, causing the drm renderer to switch the screen
from text to graphics mode hiding the details being logged on the console.

This commit fixes this by only calling ply_device_manager_activate_renderers()
and ply_device_manager_deactivate_renderers if the splash uses pixel-displays.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
https://bugs.freedesktop.org/show_bug.cgi?id=107047

7 years agomain: move ply_device_manager_deactivate_renderers() into hide_splash()
Hans de Goede [Mon, 25 Jun 2018 14:55:39 +0000 (16:55 +0200)] 
main: move ply_device_manager_deactivate_renderers() into hide_splash()

hide_splash() should be the counter-part of show_splash(). show_splash()
calls ply_device_manager_activate_renderers() (through show_theme()).

2 of the 3 callers of hide_splash() are already calling
ply_device_manager_deactivate_renderers() directly before calling
hide_splash(). This commit moves the deactivate call into hide_splash()
so that it also gets called from the 3th code-path, which is when
the user hits the escape to key to toggle from the splash to details.

It's important that plymouth deactivates its renderers before going
to details, because those renderers can block the kernel from
initializing fbcon, which the kernel will start doing lazily in the
future:

https://lkml.org/lkml/2018/6/26/489.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
https://bugs.freedesktop.org/show_bug.cgi?id=107047

7 years agorenderer: support reactivating renderer without closing it first
Hans de Goede [Mon, 25 Jun 2018 20:02:07 +0000 (22:02 +0200)] 
renderer: support reactivating renderer without closing it first

At the moment, ply_renderer_activate() doesn't work immediately following
ply_renderer_deactivate().  This is because the renderer isn't marked
inactive until it's closed.

This commit marks the renderer inactive when it's deactivated.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
https://bugs.freedesktop.org/show_bug.cgi?id=107047

7 years agodevice-manager: skip graphical renderer setup when details forced
Adam Williamson [Thu, 7 Jun 2018 00:06:14 +0000 (17:06 -0700)] 
device-manager: skip graphical renderer setup when details forced

If neither "rhgb" nor "splash" is on the kernel cmdline, then
plymouth forces the "details" splash. This splash is merely
a passthrough plugin, where it makes boot looks like plymouth
isn't even running.

In this case, the code sets PLY_DEVICE_MANAGER_FLAGS_IGNORE_UDEV.
The idea is to not bother waiting for udev events notifying
plymouth when graphics devices show up, since it doesn't need
to use the grpahics devices directly anyway.

Unfortunately, it does still erroneously try to setup graphical
renderers in this case, including the /dev/fb renderer.

Before commit e4f86e3c, these graphical renderers failed because
they were given the wrong device name, but since that fix, they're
suceeding.  We definitely don't want the /dev/fb renderer to
load if we're ignoring udev on efi systems, since during very
early boot /dev/fb is backed by efifb, something we never want to
use.  efifb is supposed to get replaced during the boot process
by other fb implementations like say radeondrmfb, virtiodrmfb or
bochsdrmfb, and some of those implementations can't handle the
transition if /dev/fb is open at switchover time.

This commit adds a new flag to tell the device manager to
not bother trying to setup graphical renderers when details are
forced.

http://bugzilla.redhat.com/1518464

7 years agodocs: fix some typos
qiangzhao [Thu, 31 May 2018 07:58:11 +0000 (15:58 +0800)] 
docs: fix some typos

There are few word spelling errors in the documentation.

This commit addresses those problems.

7 years agoRevert "wip! plymouth: stub out drm escrow program"
Ray Strode [Thu, 31 May 2018 14:51:55 +0000 (10:51 -0400)] 
Revert "wip! plymouth: stub out drm escrow program"

This reverts commit 12b03bf60e9ba7e3a4e400aca0b7c2fdefbb762f.

7 years agoRevert "wip! systemd-units: add unit to switch back to initrd at shutdown"
Ray Strode [Thu, 31 May 2018 14:51:51 +0000 (10:51 -0400)] 
Revert "wip! systemd-units: add unit to switch back to initrd at shutdown"

This reverts commit 82b2b096392b9305941b3860dd92b18bce1789f8.

7 years agoRevert "main: don't load cache or treat root as mounted on shutdown"
Ray Strode [Thu, 31 May 2018 14:51:46 +0000 (10:51 -0400)] 
Revert "main: don't load cache or treat root as mounted on shutdown"

This reverts commit 55186d76ab699b8c2f536b87874a2fc628612fbd.

7 years agoRevert "utils: add function for running program"
Ray Strode [Thu, 31 May 2018 14:51:42 +0000 (10:51 -0400)] 
Revert "utils: add function for running program"

This reverts commit 0faf4c82bf69709c9de8a6fa2bc7aa2eedf9510b.

7 years agoRevert "main: reap zombies"
Ray Strode [Thu, 31 May 2018 14:51:38 +0000 (10:51 -0400)] 
Revert "main: reap zombies"

This reverts commit c59b031980d10a31f54d2d39023ff2c9b907668e.

7 years agoRevert "wip! main: run plymouth-drm-escrow when switching to initrd"
Ray Strode [Thu, 31 May 2018 14:51:34 +0000 (10:51 -0400)] 
Revert "wip! main: run plymouth-drm-escrow when switching to initrd"

This reverts commit f083f0a150a3f72448d6c3ad27fcd30bf5def1a4.

7 years agoRevert "fixup! utils: add function for running program"
Ray Strode [Thu, 31 May 2018 14:51:22 +0000 (10:51 -0400)] 
Revert "fixup! utils: add function for running program"

This reverts commit 78cf571066c4220f59df0861c8716f51e9f77fa6.

7 years agoRevert "wip! renderer: add disown method"
Ray Strode [Thu, 31 May 2018 14:51:17 +0000 (10:51 -0400)] 
Revert "wip! renderer: add disown method"

This reverts commit 0c006993a4d1f345b80130fe40f378981744b432.

7 years agoclient: fix typo in help text
Ulrich Ölmann [Fri, 27 Apr 2018 13:23:42 +0000 (15:23 +0200)] 
client: fix typo in help text

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
7 years agoconfigure: fix help text
Ulrich Ölmann [Fri, 27 Apr 2018 13:23:04 +0000 (15:23 +0200)] 
configure: fix help text

The used name for the feature "drm" results in the configure option
"--enable-drm" and not "--enable-drm-renderer".

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
7 years agowip! renderer: add disown method
Ray Strode [Tue, 8 May 2018 20:44:46 +0000 (16:44 -0400)] 
wip! renderer: add disown method

7 years agofixup! utils: add function for running program
Ray Strode [Tue, 1 May 2018 20:33:48 +0000 (16:33 -0400)] 
fixup! utils: add function for running program

7 years agowip! main: run plymouth-drm-escrow when switching to initrd
Ray Strode [Thu, 26 Apr 2018 17:22:27 +0000 (13:22 -0400)] 
wip! main: run plymouth-drm-escrow when switching to initrd

7 years agomain: reap zombies
Ray Strode [Thu, 26 Apr 2018 16:42:20 +0000 (12:42 -0400)] 
main: reap zombies

Now that we have the ability to run a child we should make sure
that zombie children get reaped.

7 years agoutils: add function for running program
Ray Strode [Thu, 26 Apr 2018 16:36:31 +0000 (12:36 -0400)] 
utils: add function for running program

In order to hand off the drm fd to another program we need
to be able to run that other program.

This commit adds an API for running a program with no arguments,
in the background.

7 years agomain: don't load cache or treat root as mounted on shutdown
Ray Strode [Thu, 26 Apr 2018 14:45:39 +0000 (10:45 -0400)] 
main: don't load cache or treat root as mounted on shutdown

Right now, anytime we update the root fs in the daemon we treat
it like we switched from initramfs to the main root filesystem.

We shoudn't do that when shutting down since we're going to go
the other direction.

This commit changes on_newroot to look at the current mode to
decide what to do.

For the moment it doesn't do anything in the shutdown case, but
that will change shortly.

7 years agowip! systemd-units: add unit to switch back to initrd at shutdown
Ray Strode [Thu, 26 Apr 2018 14:39:50 +0000 (10:39 -0400)] 
wip! systemd-units: add unit to switch back to initrd at shutdown

plymouthd currently sticks around on the main filesystem during
shutdown, while shutdown proceeds on the initramfs.

This commit adds a unit to make it jump into the initramfs too.

This is important, so we can run the drm escrow binary from
the initramfs.

7 years agowip! plymouth: stub out drm escrow program
Ray Strode [Thu, 26 Apr 2018 14:15:14 +0000 (10:15 -0400)] 
wip! plymouth: stub out drm escrow program

Right now plymouthd forces itself to stay alive for the duration of
shutdown, so the splash screen can stay up until the power is killed.

This causes unclean mounts in some situations following system updates.

Rather than keep plymouthd around, all we really need to do is keep
the drm fd around.  That can be down with a separate program executed
just in time from the initramfs.

As a first step toward acheiving that goal, this commit creates a
simple new program "plymouth-drm-escrow" that doesn't do anything
at all but try to stay alive.

A future commit will change plymouthd to run plymouth-drm-escrow,
and pass it the drm fd.

7 years agopixel-buffer: switch device rotation to an enum
Ray Strode [Tue, 10 Apr 2018 20:40:06 +0000 (16:40 -0400)] 
pixel-buffer: switch device rotation to an enum

Right now device rotation is stored in a bare integer.

For clarity, switch that to an enum.

7 years agobranch-merge: support device rotation
Hans de Goede [Tue, 10 Apr 2018 15:33:31 +0000 (11:33 -0400)] 
branch-merge: support device rotation

On some devices the LCD panel is mounted in the casing in such a way
that the up/top side of the panel does not match with the top side of
the device.

Examples of this are:
-Tablets where the LCD panel is mounted upside-down (various models)
-Clamshell design devices use portrait tablet screens in a landscape fashion /
 a landscape case, e.g. the GPD pocket, GPD win, Asus T100HA and the VIOS LTH17
 (so the didplay is mounted rotated 90 degrees clock-wise or counter-clock-wise).

Starting with kernel 4.16 there is code in the kernel to:
-Detect affected devices
-Automatically rotate the fbconsole to compensate
-Let userspace know about this with a new "panel orientation" property on the drm connector of the panel

The patch series I'm attaching to this bug adds support for this to
plymouth, so that the boot-splash and diskcrypt-ask-password are shown
with the correct orientation / the right way up on these devices.

7 years agodrm: Reset primary plane rotation to DRM_MODE_ROTATE_0
Hans de Goede [Sat, 20 Jan 2018 11:20:29 +0000 (12:20 +0100)] 
drm: Reset primary plane rotation to DRM_MODE_ROTATE_0

On devices where the (LCD) panel is mounted upside-down in the case
the kernel's drm_fb_helper code may have set up rotation on the primary
plane to make the text-console (and other fbdev using apps) show the right
way up.

We inherit this rotation from the text-mode and since we do our own rotation
where necessary we end up rotating twice and showing the boot-splash
upside-down again.

Dealing with hardware rotation may require using a specific framebuffer
tiling which we do not support, so we should just disable the hardware
rotation and keep using our own software rotation.

This commit adds code to find the primary plane and its rotation property
and if it is not DRM_MODE_ROTATE_0 then sets it to DRM_MODE_ROTATE_0. fixing
the double rotation issue.

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

7 years agodrm: Check for "panel orientation" connector property
Hans de Goede [Tue, 12 Dec 2017 18:47:26 +0000 (19:47 +0100)] 
drm: Check for "panel orientation" connector property

On some devices the LCD panel is mounted in the casing in such a way
that the up/top side of the panel does not match with the top side of
the device (e.g. it is mounted upside-down).

Kernel 4.16 introduces a new "panel-orientation" property on the drm
connector which allows modesetting applications / code to check for
such LCD panels.

This commit adds support for this new property and passes this to the
pixel_buffer code using the new ply_pixel_buffer_new_with_device_rotation
method, so that the pixel_buffer code will automatically rotate the
image to correct for the panel orientation.

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

7 years agopixel-buffer: Add the concept of device rotation
Hans de Goede [Wed, 6 Dec 2017 16:37:12 +0000 (17:37 +0100)] 
pixel-buffer: Add the concept of device rotation

On some devices the LCD panel is mounted in the casing in such a way
that the up/top side of the panel does not match with the top side of
the device (e.g. it is mounted upside-down).

This commit adds support to the ply-pixel-buffer code to create
buffers which take device rotation into account and which will rotate
the picture to compensate.

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

7 years agomain: Do not update the display on backspace when there is no input to remove
Hans de Goede [Sun, 21 Jan 2018 13:07:39 +0000 (14:07 +0100)] 
main: Do not update the display on backspace when there is no input to remove

On machines with a slow CPU (Atom) and a highres screen drawing the
diskcrypt dialog may take longer then the keyrepeat speed, this leads to
a long delay before showing keypresses when doing the following:

1) Type long password
2) Realize it is wrong, press + hold backspace
   the key-repeat will now generate backspace key presses faster then we
   process them as main.c does an update_display for each press
3) Users releases backspace when we've processed input-length backspace
   key-presses, but since we were drawing slower then key-presses were
   coming in many more backspace keypresses are in the keyboard buffer
4) User types first character of the right password, this shows up up to
   a couple of seconds later because first we are still processing all
   the queued up backspace presses and doing a redraw for each.

This commit fixes this by skipping the redraws in on_backspace when there
is no more input left in the input buffer.

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

7 years agodevice-manager: drop superfluous create_pixel_displays_for_renderer call
Ray Strode [Wed, 20 Dec 2017 15:49:19 +0000 (10:49 -0500)] 
device-manager: drop superfluous create_pixel_displays_for_renderer call

commit 29e27637694eefc962d53333c729e6cac1c66518 tried to move
create_pixel_displays_for_renderer down a couple of lines, but it
inadvertently copied it instead of moved it.

This commit fixes that.

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

7 years agox11: don't call gdk_display_get_name before gtk_init
Ray Strode [Mon, 11 Dec 2017 15:39:13 +0000 (10:39 -0500)] 
x11: don't call gdk_display_get_name before gtk_init

The x11 plugin calls gdk_display_get_name at load time
to set the device name state.  This no longer works, since
gtk_init_check() happens later at open_device time, and
GTK+ no longer allows gdk_display_get_name before gtk_init.

This commit moves the gtk_init call earlier, to
create_backend, so gdk_display_get_name works again.

https://bugzilla.gnome.org/show_bug.cgi?id=104204

7 years agoINSTALL: Fix a spelling error in the command example
zhaoqiang [Thu, 30 Nov 2017 09:21:39 +0000 (17:21 +0800)] 
INSTALL: Fix a spelling error in the command example

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

7 years agopopulate-initrd: handle themes with subdirs
mike@mgoodwin.net [Mon, 23 Oct 2017 14:22:52 +0000 (10:22 -0400)] 
populate-initrd: handle themes with subdirs

Not all distros use the upstream plymouth-populate-initrd
script to populate their initramfs.  As a consequence,
some themes have been developed that use subdirectories,
(which is not supported by plymouth-populate-initrd).

This commit adds support for that feature, so that
preexisting themes get properly installed.

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

7 years agodevice-manager: fall back to text mode if graphical devices fail
Ray Strode [Tue, 7 Nov 2017 18:49:30 +0000 (13:49 -0500)] 
device-manager: fall back to text mode if graphical devices fail

Right now we assume if we find a /dev/dri/card0 that it will work.
That may not be true. The proprietary nvidia driver, for instance,
provides /dev/dri/card0 but disables modesetting by default.

This commit makes sure we fall back to text mode if /dev/dri/card0
is insufficient for our needs.

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

8 years agoscripts: Use >&2 instead of /dev/stderr
Daniel Baumann [Thu, 24 Aug 2017 15:12:37 +0000 (17:12 +0200)] 
scripts: Use >&2 instead of /dev/stderr

/dev/stderr isn't always available in chroots, so use
>&2 instead.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581649
https://bugs.freedesktop.org/show_bug.cgi?id=102388

8 years agoterminal: add include for sysmacros.h
Sakaki [Fri, 18 Aug 2017 14:08:23 +0000 (10:08 -0400)] 
terminal: add include for sysmacros.h

That file is, in some cases, not included implicitly by sys/types.h.

This commit explicitly includes it.

8 years agoconfigure: bump to 0.9.4
Ray Strode [Wed, 9 Aug 2017 13:16:52 +0000 (09:16 -0400)] 
configure: bump to 0.9.4

8 years agoterminal-session: don't delete boot.log 0.9.3
Ray Strode [Thu, 11 May 2017 20:46:33 +0000 (16:46 -0400)] 
terminal-session: don't delete boot.log

We want to append to it now.

8 years agoRevert "Make boot.log world readable by default"
Ray Strode [Thu, 11 May 2017 14:52:30 +0000 (10:52 -0400)] 
Revert "Make boot.log world readable by default"

This reverts commit fc5cd88767db61805519fef53182386ba56c6405.

It's better to let the admin of the system decide the permissions,
than forcefully change them.

8 years agoRevert "main: don't allow ESC key repeat to flood console"
Ray Strode [Mon, 24 Apr 2017 20:16:47 +0000 (16:16 -0400)] 
Revert "main: don't allow ESC key repeat to flood console"

This reverts commit 1f1d83bf71fc4d1748bed3366fd6a597d34fbabd.

8 years agomain: Look for config in runtime dir first
João Paulo Rechi Vita [Fri, 7 Apr 2017 14:01:17 +0000 (10:01 -0400)] 
main: Look for config in runtime dir first

This makes possible to support shipping a self-contained initrd which
completely overrides the plymouth theme. The configuration and theme are
copied to /run by a custom service before plymouth starts, so plymouth
can load the correct config from /run both during bootup and shutdown.

This commit changes the routine which resolves plymouth.defaults' path,
to have it look first in plymouth's runtime directory.

Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
8 years agomain: Look for theme in runtime dir first
João Paulo Rechi Vita [Fri, 7 Apr 2017 14:01:16 +0000 (10:01 -0400)] 
main: Look for theme in runtime dir first

When a theme is shipped exclusively in the initrd, plymouth will not be
able to load is if it starts the boot splash after the bootup process
already switched from the initrd. One way to make it work is to copy the
theme to plymouth's runtime directory in /run, which is preserved during
switch root.

This commit changes the routine which resolves a theme's path to have it
look first in themes/ under plymouth's runtime directory.

Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
8 years agoRevert "Recreate boot log at each boot instead of appending"
Ray Strode [Fri, 24 Mar 2017 19:15:03 +0000 (15:15 -0400)] 
Revert "Recreate boot log at each boot instead of appending"

This reverts commit 9abbd88835a181cda1427d61d92ef5685ad8a81b.

I'm getting requests to keep old boot logs around.  If anyone
wants to carve up boot.log, they can just use logrotate.d

8 years agomain: don't allow ESC key repeat to flood console
Ray Strode [Fri, 17 Mar 2017 20:35:46 +0000 (16:35 -0400)] 
main: don't allow ESC key repeat to flood console

If the user holds down ESC the system can easily get
overrun toggling details and the theme back and forth.

This commit changes the code to ignore any ESC key events
that come in while ESC is getting processed.

8 years agox11: implement get_display_name
Ray Strode [Wed, 18 Jan 2017 18:09:53 +0000 (13:09 -0500)] 
x11: implement get_display_name

For completeness, implement get_display_name in the x11 renderer too.

8 years agodrm: implement get_display_name
Ray Strode [Wed, 18 Jan 2017 18:09:02 +0000 (13:09 -0500)] 
drm: implement get_display_name

This just allows the drm plugin to work if udev is disabled.

8 years agoconfigure: don't look for libudev when --without-udev is passed
Lukas Rusak [Tue, 17 Jan 2017 23:09:18 +0000 (15:09 -0800)] 
configure: don't look for libudev when --without-udev is passed

At the moment, libudev is unconditionally linked into plymouth
even if it's configured to be not used.

This commit moves the pkg-config check, so that it doesn't get
made at all if --without-udev is passed.

8 years agorenderer: export device name from plugin
Ray Strode [Wed, 18 Jan 2017 17:53:58 +0000 (12:53 -0500)] 
renderer: export device name from plugin

Right now the renderer keeps its own copy of the device name, which
may be NULL or out of date after the renderer is opened.

This commit makes sure the device name gets updated to be current.

8 years agodevice-manager: handle NULL renderer better
Ray Strode [Wed, 18 Jan 2017 15:07:00 +0000 (10:07 -0500)] 
device-manager: handle NULL renderer better

Right now we'll pass a NULL device name and crash if the renderer
fails to open.

This commit fixes that.

8 years agodevice-manager: dont pass terminal as renderer device
Ray Strode [Thu, 8 Dec 2016 20:23:54 +0000 (15:23 -0500)] 
device-manager: dont pass terminal as renderer device

Various bits of fall back code pass the terminal device
as the renderer device.  This is wrong, ply_renderer is
a graphical renderer abstraction.

This commit passes NULL in those cases, so each renderer
does what it's configured to do by default.

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

8 years agobuild-goo: make udev support build time optional
Ray Strode [Thu, 8 Dec 2016 20:37:50 +0000 (15:37 -0500)] 
build-goo: make udev support build time optional

Some set ups just use /dev/fb0 and don't need udev.

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

9 years agomain: support plymouth.force-scale on the kernel command line
Michael Kuhn [Mon, 22 Aug 2016 16:39:35 +0000 (18:39 +0200)] 
main: support plymouth.force-scale on the kernel command line

This can be used to override the DeviceScale setting.

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

9 years agolibply, main: Add device scale setting
Michael Kuhn [Mon, 22 Aug 2016 19:54:18 +0000 (21:54 +0200)] 
libply, main: Add device scale setting

This adds a DeviceScale setting to plymouthd.conf. It can be used to
override the device scale detection when setting the
PLYMOUTH_FORCE_SCALE environment variable is too complicated.

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

9 years agolibply: fix HiDPI detection
Michael Kuhn [Mon, 22 Aug 2016 19:54:52 +0000 (21:54 +0200)] 
libply: fix HiDPI detection

The check would erroneously turn off HiDPI mode for devices with a
resolution less than 4K.

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

9 years agoconfigure: switch to tar.xz instead tar.bz2
Ray Strode [Mon, 20 Jun 2016 19:15:40 +0000 (15:15 -0400)] 
configure: switch to tar.xz instead tar.bz2

It's 2016 after all.

9 years agosystemd-units: Fix uninstall script
Ray Strode [Mon, 20 Jun 2016 19:15:11 +0000 (15:15 -0400)] 
systemd-units: Fix uninstall script

This commit fixes some typos in the uninstall: target

9 years agobuild-goo: don't install systemd units during distcheck
Ray Strode [Mon, 20 Jun 2016 19:53:26 +0000 (15:53 -0400)] 
build-goo: don't install systemd units during distcheck

9 years agologger: stop using carriage returns
Ray Strode [Mon, 20 Jun 2016 17:46:34 +0000 (13:46 -0400)] 
logger: stop using carriage returns

I believe we fixed up tty settings sometime ago such that we don't
need carriage returns anymore.

9 years agoterminal: refresh geometry after drm device arrives
Ray Strode [Mon, 20 Jun 2016 17:45:37 +0000 (13:45 -0400)] 
terminal: refresh geometry after drm device arrives

It's quite likely that afer the drm device arrives, the number
of rows and columns in the terminal will change.

This commit makes sure to refresh the terminal state.

9 years agodrm: don't pick up drm master implicitly
Ray Strode [Mon, 20 Jun 2016 15:06:49 +0000 (11:06 -0400)] 
drm: don't pick up drm master implicitly

If a client opens the drm device, they're given drm master
implicitly. We already explicitly take DRM master when we need it,
so that featuer is unneeded.

Furthermore, it's actively harmful, since fbdev won't let you change
the color palette of the terminal if drm master is held.

This commit makes sure to drop master as soon as we get it from
open().

9 years agodevice-manager: probe existing DRM devices at startup
Daniel Drake [Thu, 16 Jun 2016 22:25:05 +0000 (15:25 -0700)] 
device-manager: probe existing DRM devices at startup

A regression introduced in 7e37d58be3e9acff36c53c420b399c18d08bd8f8
means that we only look for DRM devices that appear while we're waiting,
we don't consider any that are already present before we started.

shutdown splash was not appearing because of this.

Solve this by explicitly searching for already-initialized DRM devices as
we start up.

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