Commit graph

2047 commits

Author SHA1 Message Date
Ray Strode
bdfcf889f8 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
2017-11-07 13:57:39 -05:00
Daniel Baumann
f9425978e1 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
2017-08-24 11:42:24 -04:00
Sakaki
e12b5ee34c terminal: add include for sysmacros.h
That file is, in some cases, not included implicitly by sys/types.h.

This commit explicitly includes it.
2017-08-18 10:10:49 -04:00
Ray Strode
3a9334edbb configure: bump to 0.9.4 2017-08-09 09:16:52 -04:00
Ray Strode
ca06f77036 terminal-session: don't delete boot.log
We want to append to it now.
2017-05-11 16:46:33 -04:00
Ray Strode
1fa54b06c7 Revert "Make boot.log world readable by default"
This reverts commit fc5cd88767.

It's better to let the admin of the system decide the permissions,
than forcefully change them.
2017-05-11 10:52:55 -04:00
Ray Strode
6fd5c6b260 Revert "main: don't allow ESC key repeat to flood console"
This reverts commit 1f1d83bf71.
2017-04-24 16:16:47 -04:00
João Paulo Rechi Vita
11b0ce04de 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>
2017-04-07 11:43:58 -04:00
João Paulo Rechi Vita
6535986079 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>
2017-04-07 11:43:45 -04:00
Ray Strode
61ae21f1e8 Revert "Recreate boot log at each boot instead of appending"
This reverts commit 9abbd88835.

I'm getting requests to keep old boot logs around.  If anyone
wants to carve up boot.log, they can just use logrotate.d
2017-03-24 15:15:03 -04:00
Ray Strode
1f1d83bf71 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.
2017-03-24 15:12:12 -04:00
Ray Strode
63148b20a1 x11: implement get_display_name
For completeness, implement get_display_name in the x11 renderer too.
2017-01-18 13:09:53 -05:00
Ray Strode
8d1764981b drm: implement get_display_name
This just allows the drm plugin to work if udev is disabled.
2017-01-18 13:09:02 -05:00
Lukas Rusak
d1912192f2 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.
2017-01-18 12:56:26 -05:00
Ray Strode
e4f86e3cbe 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.
2017-01-18 12:53:58 -05:00
Ray Strode
fdda9af2c3 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.
2017-01-18 10:08:36 -05:00
Ray Strode
18dd75589b 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
2016-12-15 14:24:40 -05:00
Ray Strode
0503571895 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
2016-12-15 14:24:34 -05:00
Michael Kuhn
e4b7e4955c 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
2016-08-23 10:01:33 -04:00
Michael Kuhn
91b983277c 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
2016-08-23 10:01:29 -04:00
Michael Kuhn
a4226bd054 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
2016-08-23 09:58:59 -04:00
Ray Strode
0e65b86c68 configure: switch to tar.xz instead tar.bz2
It's 2016 after all.
2016-06-20 15:53:49 -04:00
Ray Strode
8efc272a7a systemd-units: Fix uninstall script
This commit fixes some typos in the uninstall: target
2016-06-20 15:53:48 -04:00
Ray Strode
ad9f1b7da6 build-goo: don't install systemd units during distcheck 2016-06-20 15:53:48 -04:00
Ray Strode
3ceaf08b97 logger: stop using carriage returns
I believe we fixed up tty settings sometime ago such that we don't
need carriage returns anymore.
2016-06-20 13:46:34 -04:00
Ray Strode
041ea9a59c 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.
2016-06-20 13:45:37 -04:00
Ray Strode
3cb0ac59ed 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().
2016-06-20 11:06:49 -04:00
Daniel Drake
adaa298965 device-manager: probe existing DRM devices at startup
A regression introduced in 7e37d58be3
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
2016-06-17 10:30:25 -04:00
Ray Strode
c207314659 terminal: always open terminal in non-blocking mode
In theory this is safer since open calls can block
indefinitely without O_NONBLOCK.
2016-06-16 15:23:15 -04:00
Ray Strode
fd66c69030 text: don't draw if not animating
That can cause an unrecoverable crash.
2016-06-16 15:08:04 -04:00
Ray Strode
99755d3eac configure: tweak defaults to be more systemd friendly
systemd is everywhere now, yet we configure by default with non-systemd
friendly options.

This commit fixes that.
2016-06-16 14:40:27 -04:00
Ray Strode
c9a805885a main: call show_messages after the splash is assigned
The show_messages function shows any queued messages sent to the
daemon on the active boot splash.  It's currently only ever called
in a place in the code where the splash hasn't yet been assigned,
so it's effectively always a noop.

This commit moves the call a little later so it won't bail immediately.
2016-06-14 14:31:40 -04:00
Ray Strode
2c7147ad09 text: add view for new text displays
commit 74346ec268 tried to fix a case where views are
added after the text splash is shown.  That commit inadvertently
removed the code that adds a view for a new text display.

This commit adds back the accidentaly excised line.
2016-06-14 14:23:18 -04:00
Ray Strode
375a65fff6 device-manager: fix use after free
If a renderer fails to open, then we need to make sure we nullify,
the renderer variable after freeing it, since subsequent code checks
if the renderer is null to know whether or not to proceed with
fallback.
2016-06-07 08:28:03 -04:00
Ray Strode
cb50560821 main: make sure to reshow prompts when new display is added
When a display is added, we need to tell the splash plugin
to redisplay any pending questions, so those questions show
up on the new display.
2016-05-23 11:08:41 -04:00
Ray Strode
b99e1a3f07 details: update new views with current boot buffer
if a view is added after the splash is shown, make sure
to update the view with the current contents of the boot
buffer.
2016-05-23 11:06:27 -04:00
Ray Strode
74346ec268 plugins: load view of hot plugged displays immediately
If we're already chugging along, and a new display
gets added make sure to load the view associated with
that display right away.

Using an unloaded view can lead to crashes.
2016-05-23 11:03:18 -04:00
Ray Strode
8d07bfd434 plugins: free views that can't load
Trying to use an unloaded view can lead to crashes.
If a view can't be loaded, free it right away.
2016-05-23 10:56:01 -04:00
Ray Strode
d33b4ef04e plugins: unset draw handler when freeing view
If the view is freed, we definitely shouldn't draw
the view's display anymore.
2016-05-23 10:54:58 -04:00
Ray Strode
29e2763769 device-manager: activate new renderers after adding to renderers list
When a new renderer gets created, we should activate it, if the device
manager is already active.

At the moment we call create_pixel_displays_for_renderer which would
implicitly activate it (from a callback), except we call it one line
too early, so the renderer isn't in the list of known renderers yet.

This commit swaps the two lines and also adds an explicit renderer
activation for clarity.  For symmetry it makes the same change to
keyboards that it makes to renderers.
2016-05-23 10:53:55 -04:00
Ray Strode
2c482f2350 script: only support one message at a time
That's the other themes do, and callers
expect it.
2016-05-20 16:40:08 -04:00
Ray Strode
04ec674d53 two-step: don't tank in updates mode when there's no progress animations
Right now we try to use the progress animation in updates mode, even
if there's not one.  This commit makes the progress animation truely
optional.
2016-05-20 16:39:24 -04:00
Will Woods
22e0596c3f plymouth-populate-initrd: fix THEME_OVERRIDE with empty conf
If you set PLYMOUTH_THEME_NAME to override the theme in an initrd
(as e.g. lorax does when building upgrade.img), plymouth-populate-initrd
tries to edit plymouthd.conf to enable that theme.

Unfortunately, the existing `sed` line doesn't work if your
plymouthd.conf is empty or all commented out - which is how we currently
ship it.

So before modifying the config, make sure it has a [Daemon] section
header, and a Theme=[placeholder] line for us to modify.

Resolves: RHBZ#1223344
2016-05-20 16:31:01 -04:00
Ray Strode
b064b14c08 main: show cursor on crash
In the event there's a crash we don't want the getty
started later to lack a cursor.
2016-05-20 16:16:27 -04:00
Ray Strode
e89adaac8a device-manager: Don't add local console to terminals hash table unless passed on cmdline
it's unexpected for plymouth to show boot messages on the local console
if there is not console=tty0 on the kernel command line.

This commit fixes that.
2016-05-20 16:11:03 -04:00
Ray Strode
9a58de52dd Revert "populate-initrd: support theme subfolders"
This reverts commit 3a60023f26.
2016-05-16 12:13:19 -04:00
Daniel Drake
7e37d58be3 device-manager: use device timeout instead of udev coldplug monitor
https://lists.freedesktop.org/archives/systemd-devel/2015-March/029184.html
As explained there, plymouth watching for coldplug events is not the
behaviour we're looking for.

Replace this with a configurable timeout. We claim DRM devices as soon as
we're aware of them (displaying the splash still subject to ShowDelay),
but legacy framebuffer and text console devices are only claimed after
this new DeviceTimeout.

This avoids an issue where the initramfs finishes (generating a coldplug
event) before udev has informed plymouth of the DRM devices. This was
causing plymouth to activate text mode and ignore the DRM devices appearing
a moment later.

https://bugs.freedesktop.org/show_bug.cgi?id=95356
2016-05-13 14:20:52 -04:00
Ray Strode
3a60023f26 populate-initrd: support theme subfolders
Some themes like to keep their content in subfolders,
but plymouth-populate-initrd currently fails to copy
those subfolders over to the initrd.

This commit fixes that.

https://bugzilla.gnome.org/show_bug.cgi?id=94883
2016-04-11 07:48:40 -04:00
Cosimo Cecchi
5188f19416 libply: unify get_device_scale() method in library
Unify the two copies of this method inside libply. Also add back a check
for 4K displays that went missing.

https://bugs.freedesktop.org/show_bug.cgi?id=84482
2016-03-03 14:32:25 -05:00
Giovanni Campagna
72ae2bd889 label: add support for HiDPI
Set the device scale on the cairo surface based on the pixel
buffer device scale. cairo will do the rest of the magic for
us.

https://bugs.freedesktop.org/show_bug.cgi?id=84482
2016-03-03 14:32:25 -05:00