Public bug reported:

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

** Patch added: "Proposed fix"
   
https://bugs.launchpad.net/bugs/2086110/+attachment/5833098/+files/console-setup.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2086110

Title:
  setupcon fails to set console font in 24.04 LTS

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/2086110/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to