[Bug 2086110] Re: setupcon fails to set console font in 24.04 LTS
Andreas Hasenack
2086110 at bugs.launchpad.net
Fri Jan 10 18:40:32 UTC 2025
Sponsored:
Uploading console-setup_1.226ubuntu3.dsc
Uploading console-setup_1.226ubuntu3.tar.xz
Uploading console-setup_1.226ubuntu3_source.buildinfo
Uploading console-setup_1.226ubuntu3_source.changes
If you want this in a stable release (like 24.04, for which you filed this bug), then the SRU process[1] should be followed. I can assist with that. Basically update the bug's description with the information from the SRU template[2], and we can go from there. Specifically for the test plan, I would suggest to set the FONT in /etc/default/console-setup and watch out for the ERROR ioctl output.
1. https://canonical-sru-docs.readthedocs-hosted.com/en/latest/howto/standard/
2. https://canonical-sru-docs.readthedocs-hosted.com/en/latest/reference/bug-template/
** Also affects: console-setup (Ubuntu Oracular)
Importance: Undecided
Status: New
** Also affects: console-setup (Ubuntu Plucky)
Importance: Undecided
Status: New
** Also affects: console-setup (Ubuntu Noble)
Importance: Undecided
Status: New
** Changed in: console-setup (Ubuntu Plucky)
Status: New => Fix Committed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to console-setup in Ubuntu.
https://bugs.launchpad.net/bugs/2086110
Title:
setupcon fails to set console font in 24.04 LTS
Status in console-setup package in Ubuntu:
Fix Committed
Status in console-setup source package in Noble:
New
Status in console-setup source package in Oracular:
New
Status in console-setup source package in Plucky:
Fix Committed
Bug description:
Package version 1.226ubuntu1 in 24.04 LTS contains the following patch
hunk to `setupcon` relative to the base version 1.226:
```
@@ -665,12 +662,19 @@
CONSOLE_MAP=${CONSOLE_MAP:-$ACM}
[ -z "$CONSOLE_MAP" ] || CONSOLE_MAP=`findfile $mapdir "$CONSOLE_MAP"`
[ -n "$CONSOLE_MAP" -o "$CHARMAP" = UTF-8 ] || CONSOLE_MAP=`findfile $mapdir $stdmap`
+[ -n "$CONSOLE_MAP" -o "$CHARMAP" = UTF-8 ] || CONSOLE_MAP=`findfile $mapdir ${stdmap%.gz}`
# FONTFILES
FONTFILES=''
if [ "$FONT" ]; then
for f in $FONT; do
FONTFILES="$FONTFILES `findfile $fontdir $f`"
+ RES=`findfile $fontdir $f`
+ if [ -z "$RES" ]; then
+ fdec="${f%.gz}"
+ RES=`findfile $fontdir $fdec`
+ fi
+ FONTFILES="$FONTFILES $RES"
done
fi
FONTFILES=`echo $FONTFILES` # remove extra spaces
```
As a result of this patch, the font file name gets twice into `FONTFILES`.
That, in turn, results in the following output from `setupcon -v`:
```
executing setfont -C /dev/tty1 /usr/share/consolefonts/Uni2-Terminus28x14.psf.gz /usr/share/consolefonts/Uni2-Terminus28x14.psf.gz.
setfont: INFO setfont.c:336 kfont_load_fonts: Read 512-char 14x28 font from file /usr/share/consolefonts/Uni2-Terminus28x14.psf.gz
setfont: INFO setfont.c:336 kfont_load_fonts: Read 512-char 14x28 font from file /usr/share/consolefonts/Uni2-Terminus28x14.psf.gz
setfont: INFO setfont.c:164 try_loadfont: Loading 1024-char 14x28 font
setfont: ERROR kdfontop.c:211 put_font_kdfontop: ioctl(KDFONTOP): Invalid argument
```
and the font is NOT set.
Removing this line (671) fixes the problem:
```
FONTFILES="$FONTFILES `findfile $fontdir $f`"
```
The patch with the fix is attached.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/2086110/+subscriptions
More information about the foundations-bugs
mailing list