Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vconsole-setup: downgrade log message when setting font fails on dumm… #16503

Merged
merged 1 commit into from Jul 20, 2020

Conversation

fbuihuu
Copy link
Contributor

@fbuihuu fbuihuu commented Jul 17, 2020

…y console

Since commit 883eb9b, vconsole-setup might be
called again to operate on dummy console where font operations are not
supported but where it's still important to have the correct keymap set [0].

vconsole-setup is mainly called by udev but can also be run via a dependency of
an early service. Both cases might end up calling vconsole-setup on the dummy
console.

The first case can happen during early boot even on systems that use (instead
of the dummy console) a "simple" video console driver supporting font
operations (such as vgacon) until a more specific driver (such as i915) takes
the console over. While this is happening vgacon is deactivated and temporarly
replaced by the dummy console [1].

There are also other cases where systemd-vconsole-setup might be called on
dummy console especially during (very) early boot. Indeed
systemd-vconsole-setup.service might be pulled in by early interactive services
such as 'dracut-cmdline-ask.service` which is run before udev.

If that happens on platforms with no grapical HWs (such as embedded ARM) or
with dummy console initially installed until a driver takes over (like Xen and
xen-fbfront) then setting font will fail.

Therefore this patch downgrades the log message emitted when setting font fails
to LOG_DEBUG and when font operations is not implemented like it's the case for
the dummy console.

Fixes: #16406.

[0] #10826
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/vga/vgaarb.c?h=v5.7#n204

…y console

Since commit 883eb9b, vconsole-setup might be
called again to operate on dummy console where font operations are not
supported but where it's still important to have the correct keymap set [0][1].

vconsole-setup is mainly called by udev but can also be run via a dependency of
an early service. Both cases might end up calling vconsole-setup on the dummy
console.

The first case can happen during early boot even on systems that use (instead
of the dummy console) a "simple" video console driver supporting font
operations (such as vgacon) until a more specific driver (such as i915) takes
the console over. While this is happening vgacon is deactivated and temporarly
replaced by the dummy console [2].

There are also other cases where systemd-vconsole-setup might be called on
dummy console especially during (very) early boot. Indeed
systemd-vconsole-setup.service might be pulled in by early interactive services
such as 'dracut-cmdline-ask.service` which is run before udev.

If that happens on platforms with no grapical HWs (such as embedded ARM) or
with dummy console initially installed until a driver takes over (like Xen and
xen-fbfront) then setting font will fail.

Therefore this patch downgrades the log message emitted when setting font fails
to LOG_DEBUG and when font operations is not implemented like it's the case for
the dummy console.

Fixes: systemd#16406.

[0] systemd#10826
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1652473
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/vga/vgaarb.c?h=v5.7#n204
@fbuihuu
Copy link
Contributor Author

fbuihuu commented Jul 17, 2020

@keszybz I still don't understand the rational behind 0b57803 BTW because systemd-vconsole-setup (the binary) is supposed to be run asynchronously by udev therefore suggesting to order early interactive services after systemd-vconsole-setup.service has basically no effect...

@keszybz keszybz merged commit 0ef1adf into systemd:master Jul 20, 2020
keszybz added a commit to keszybz/systemd that referenced this pull request Jul 20, 2020
… input/output"

This reverts commit 0b57803.

From systemd#16503 (comment):
systemd-vconsole-setup (the binary) is supposed to run asynchronously by udev
therefore ordering early interactive services after systemd-vconsole-setup.service
has basically no effect.

Let's remove this paragraph. It's better to say nothing than to give pointless
advice.
@keszybz
Copy link
Member

keszybz commented Jul 20, 2020

See #16520.

keszybz added a commit that referenced this pull request Jul 22, 2020
… input/output"

This reverts commit 0b57803.

From #16503 (comment):
systemd-vconsole-setup (the binary) is supposed to run asynchronously by udev
therefore ordering early interactive services after systemd-vconsole-setup.service
has basically no effect.

Let's remove this paragraph. It's better to say nothing than to give pointless
advice.
keszybz added a commit to systemd/systemd-stable that referenced this pull request Jul 27, 2020
… input/output"

This reverts commit 0b57803.

From systemd/systemd#16503 (comment):
systemd-vconsole-setup (the binary) is supposed to run asynchronously by udev
therefore ordering early interactive services after systemd-vconsole-setup.service
has basically no effect.

Let's remove this paragraph. It's better to say nothing than to give pointless
advice.

(cherry picked from commit 8fa2cd8)
sayanchowdhury pushed a commit to kinvolk-archives/systemd-legacy that referenced this pull request Aug 3, 2020
… input/output"

This reverts commit 0b57803.

From systemd/systemd#16503 (comment):
systemd-vconsole-setup (the binary) is supposed to run asynchronously by udev
therefore ordering early interactive services after systemd-vconsole-setup.service
has basically no effect.

Let's remove this paragraph. It's better to say nothing than to give pointless
advice.

(cherry picked from commit 8fa2cd8)
@fbuihuu fbuihuu deleted the vconsole-setup-fix-log branch August 3, 2020 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

systemd-vconsole-setup: KD_FONT_OP_GET failed while trying to get the font metadata: Function not implemented
2 participants