Bug 1212970 - [JeOS] systemd-vconsole-setup[165]: /usr/bin/setfont failed with exit status 71.
Summary: [JeOS] systemd-vconsole-setup[165]: /usr/bin/setfont failed with exit status 71.
Status: NEW
: 1218080 (view as bug list)
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: aarch64 Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Stanislav Brabec
QA Contact: E-mail List
URL: https://openqa.opensuse.org/tests/340...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-04 07:25 UTC by Guillaume GARDET
Modified: 2024-03-25 10:48 UTC (History)
7 users (show)

See Also:
Found By: openQA
Services Priority:
Business Priority:
Blocker: Yes
Marketing QA Status: ---
IT Deployment: ---


Attachments
main packages changes (32.05 KB, text/plain)
2023-07-04 07:25 UTC, Guillaume GARDET
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume GARDET 2023-07-04 07:25:03 UTC
Created attachment 867964 [details]
main packages changes

## Observation

openQA test in scenario opensuse-Tumbleweed-JeOS-for-AArch64-aarch64-jeos-extra@aarch64-HD20G fails in
[journal_check](https://openqa.opensuse.org/tests/3403981/modules/journal_check/steps/9)

openQA found erros in journal on aarch64 JeOS images (only):
localhost systemd-vconsole-setup[165]: /usr/bin/setfont failed with exit status 71.
localhost systemd-vconsole-setup[169]: setfont: ERROR kdfontop.c:183 put_font_kdfontop: Unable to load such font with such kernel version
localhost systemd-vconsole-setup[165]: Setting fonts failed with a "system error", ignoring.

The list of main changes would point to kbd update:
https://build.opensuse.org/request/show/1096363


## Test suite description
Same as jeos, plus some more tests.


## Reproducible

Fails since (at least) Build [20230503](https://openqa.opensuse.org/tests/3264760)


## Expected result

Last good: [20230502](https://openqa.opensuse.org/tests/3260397) (or more recent)


## Further details

Always latest result in this scenario: [latest](https://openqa.opensuse.org/tests/latest?arch=aarch64&distri=opensuse&flavor=JeOS-for-AArch64&machine=aarch64-HD20G&test=jeos-extra&version=Tumbleweed)
Comment 1 Fabian Vogt 2023-07-04 08:21:25 UTC
FWICT this happens before the kernel initialized the graphical console, so setting a font is just not possible.

In the previous version of kbd, this was simply ignored until https://github.com/legionus/kbd/commit/1e15af4d8b272ca50e9ee1d0c584c5859102c848.

Arguably setfont does the right thing here, maybe systemd-vconsole-setup can check whether it is actually graphical?
Comment 2 Franck Bui 2023-07-07 10:07:32 UTC
(In reply to Fabian Vogt from comment #1)
> Arguably setfont does the right thing here, maybe systemd-vconsole-setup can
> check whether it is actually graphical?

How can this be done exactly ?
Comment 3 Fabian Vogt 2023-07-07 13:15:01 UTC
(In reply to Franck Bui from comment #2)
> (In reply to Fabian Vogt from comment #1)
> > Arguably setfont does the right thing here, maybe systemd-vconsole-setup can
> > check whether it is actually graphical?
> 
> How can this be done exactly ?

Not sure. It's basically only about detecting when systemd-vconsole-setup is run while ttyX is still a "dummy console". It'll automatically run when the real console takes over (see bsc#1205290...), so this is just about the error message itself.

It would also be fine to ignore this particular error.

Something to ask both systemd and kbd upstreams about?
Comment 4 Franck Bui 2023-07-07 15:32:33 UTC
(In reply to Fabian Vogt from comment #3)
> Not sure. It's basically only about detecting when systemd-vconsole-setup is
> run while ttyX is still a "dummy console". It'll automatically run when the
> real console takes over (see bsc#1205290...), so this is just about the
> error message itself.

It seems that systemd upstream already tried to address this problem, see commit93c9a9d235e2304500c490b4868534385f925c76.

But at that time they haven't found a good way:

    If we have a better test for /dev/tty? being connected to something that has a
    font, we could avoid running setfont at all… ATM, I'm not aware of a simple
    test like that.

But the message emitted by systemd 'Setting fonts failed with a "system error", ignoring' is actually not an error nor a warning, it's emitted at LOG_NOTICE.

> It would also be fine to ignore this particular error.

It's already ignored by systemd-vconsole-setup and the service doesn't fail.

The problem is the error thrown by setfont: "setfont: ERROR kdfontop.c:183 put_font_kdfontop: Unable to load such font with such kernel version". They might also want to downgrade this error message.
Comment 5 Franck Bui 2023-12-01 15:58:12 UTC
(In reply to Franck Bui from comment #4)
> > It would also be fine to ignore this particular error.
> 
> It's already ignored by systemd-vconsole-setup and the service doesn't fail.

After looking at this again I wasn't 100% correct here.

I copied the logs found in the journal (from commit #0) and added the emitter as well as the log priority for each message:

> s-v-c:   [LOG_ERR]    systemd-vconsole-setup[165]: /usr/bin/setfont failed with exit status 71.
> setfont: [LOG_ERR]    systemd-vconsole-setup[169]: setfont: ERROR kdfontop.c:183 put_font_kdfontop: Unable to load such font with such kernel version
> s-v-c:   [LOG_NOTICE] systemd-vconsole-setup[165]: Setting fonts failed with a "system error", ignoring.
 
There is/was an inconsistency in the priority used by s-v-c: while setfont failing with exit status 71 is supposed to be ignored by s-v-c, the first message was still emitted as an error. I fixed it (commit 2f26c211718d29c322b2732d99617fce4d837ae1) so both messages are now emitted at LOG_NOTICE.

Now only the second message sent by setfont remains at LOG_ERR.

I'm not sure whether the real intention of https://github.com/legionus/kbd/commit/1e15af4d8b272ca50e9ee1d0c584c5859102c848 was to change the previous behavior... IOW should it really consider a driver without font support as an error ?

Antonio, I'm reassigning this bug to you so you can figure out if the previous behavior of kbd needs to be restored.

Thanks.
Comment 6 OBSbugzilla Bot 2023-12-12 10:05:01 UTC
This is an autogenerated message for OBS integration:
This bug (1212970) was mentioned in
https://build.opensuse.org/request/show/1132619 Factory / systemd
Comment 10 Antonio Teixeira 2023-12-20 14:39:11 UTC
(In reply to Franck Bui from comment #5)
> Antonio, I'm reassigning this bug to you so you can figure out if the
> previous behavior of kbd needs to be restored.

Looking at: https://github.com/legionus/kbd/issues/99
It seems upstream believes the current behavior is correct.
So I think we should just ignore this error message.
Comment 12 Franck Bui 2024-03-25 10:48:44 UTC
*** Bug 1218080 has been marked as a duplicate of this bug. ***