[Bug 2086110] [NEW] setupcon fails to set console font in 24.04 LTS
Launchpad Bug Tracker
2086110 at bugs.launchpad.net
Thu Nov 7 12:37:30 UTC 2024
You have been subscribed to a public bug by Ravi Kant Sharma (ravi-sharma):
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.
** Affects: console-setup (Ubuntu)
Importance: Undecided
Status: New
** Tags: patch
--
setupcon fails to set console font in 24.04 LTS
https://bugs.launchpad.net/bugs/2086110
You received this bug notification because you are a member of Ubuntu Sponsors, which is subscribed to the bug report.
More information about the Ubuntu-sponsors
mailing list