Commit graph

2035 commits

Author SHA1 Message Date
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
Giovanni Campagna
dd005c3fd5 x11: allow testing the hidpi support code
Apply the same heuristics as the DRM code, and set a device
scale on the pixel buffer. An environment variable is introduced
to force a scale different than the native one.

https://bugs.freedesktop.org/show_bug.cgi?id=84482
2016-03-03 14:32:25 -05:00
Giovanni Campagna
9bb6c81107 two-step: fix drawing of background image
The background image is tiled to cover the entire screen, so
we must pass a fill area that covers the screen or sampling
will be wrong. But we must also pass a clip area or we will
have expensive overdraw.

https://bugs.freedesktop.org/show_bug.cgi?id=84482
2016-03-03 14:32:25 -05:00
Giovanni Campagna
78e8bbea18 drm: set a device scale of 2 on HiDPI
Using the same heuristics as gnome-settings-daemon (which ensures
that the bootsplash will be scaled if and only if the running system
is)

https://bugs.freedesktop.org/show_bug.cgi?id=84482
2016-03-03 14:32:25 -05:00
Giovanni Campagna
d70c1dc9ee pixel-buffer: add the concept of a device scale
The device scale is a scale transformation that is applied to
the pixel buffer contents, but is transparent to the user of
the buffer (all pixel values are in logical pixels, not device
pixels).
The concept is modeled after the cairo API, and it is useful
to implement HiDPI monitor support.

https://bugs.freedesktop.org/show_bug.cgi?id=84482
2016-03-03 14:32:24 -05:00
Ray Strode
85fac71e08 splash-core: drop last vestigates of ply_seat_t
There's some left over goo.
2016-03-03 14:30:58 -05:00
Miroslav Urbanek
1ed8ec28df pixel-buffer: use double instead of float for scale factor
There are strange red and black dots in a 1280x800 splash screen with
Debian Jessie theme. The problem comes from image rescaling and is
caused by:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799953

on i386. The conversion from double to int in functions
ply_pixel_buffer_resize and ply_pixel_buffer_interpolate happens
through an intermediate float. This sometimes results in a truncated
value being larger than the original value.

This commit changes the code to use an intermediate double to
work around the bug.
2015-11-18 10:48:46 -05:00
Ray Strode
f80684387a boot-splash: don't crash in free if module not loaded
ply_boot_splash_free currently calls some code that depends
on a module being loaded.  We call ply_boot_splash_free to
clean up the boot splash object if a module can't be loaded,
leading to crash.

This commit addresses that issue by only calling the module
specific destruction code in ply_boot_splash_free in the case
where a module is loaded.

https://bugs.freedesktop.org/show_bug.cgi?id=91590
2015-08-10 10:15:19 -04:00
Ray Strode
77d303d07b device-manager: force details if serial consoles are used
it's better to skip trying to load the default splash rather than
relying on it failing and falling back.
2015-07-30 16:03:12 -04:00
Ray Strode
ef7adc3677 device-manager: decouple local console from output device
The code currently does a faulty heuristic to figure out which
drm device is associated with the tty.  We shouldn't actually
even need an accurate association, so this commit just makes
sure the terminal gets used for the first device.
2015-07-30 16:03:11 -04:00
Ray Strode
c0ee9474a3 device-manager: drop seat abstraction
The seat abstraction isn't really right, since it forces creating a
link between terminal and video output device, which isn't really
necessary (and other reasons).

This commit drops the abstraction, and moves all the code that was
in ply-seat.c directly to ply-device-manager.c.
2015-07-30 16:03:11 -04:00
Ray Strode
0bb3bd69c1 pixel-display: add getters for renderer data
These functions are useful for matching a pixel display
to its renderer.
2015-07-30 16:03:11 -04:00
Ray Strode
ea91f9baee keyboard: track activeness
Right now, ply-seat has to handle tracking
keyboard activeness on its own.  This commit
moves activeness tracking to ply-keyboard
directly.
2015-07-30 16:03:11 -04:00