After some more digging, the problem is probably when the font is assigned in the following file: drivers/video/fbdev/core/fbcon.c Somewhere around line 1011, maybe. Line 1009 hardcodes the charcount to 256. Later kernels set this to the actual font size sometime around 2020. Two commits found in this area in the 6.1.120 kernel applied cleanly, but did not compile. Specifically, the following commits were applied in order, first a1ac250a82a5e97, then commit 17d649967006f. . However, for the purposes of the 5.10, it looks like the value is hardcoded to 256. So, rather than fix this properly, just hardcoding the value as is is probably sufficient. . I will try a build later with a hardcoded fix. . a1ac250a82a5e97: fbcon: Avoid using FNTCHARCNT() and hard-coded built-in font charcount 17d649967006f: Revert "fbcon: don't lose the console font across generic->chip driver switch" .
On Fri, Dec 26, 2025 at 10:07 PM William Burrow <[email protected]> wrote: > > Hi, did some more work. > The problem with changing the variable, ch, to any fixed value is that > when charcnt is 0, then whatever is being evaluated is clobbered. The > reason for charcount being zero must be fixed. The following log was > produced from the diff shown at the end of this message (only > bit_putcs_aligned() seems to be called): > . > -------------------------- log ------------------------- > 2025-12-26T20:30:02.666098-04:00 abc kernel: [ 52.640518] ** ** > bit_putcs_aligned: ---------->> > 2025-12-26T20:30:02.666099-04:00 abc kernel: [ 52.640518] ** ** > bit_putcs_aligned: cnt: 12 > 2025-12-26T20:30:02.666100-04:00 abc kernel: [ 52.640519] ** ** > bit_putcs_aligned: vc->vc_font.data: 0xffff932c008a8010 > 2025-12-26T20:30:02.666101-04:00 abc kernel: [ 52.640519] ** ** > bit_putcs_aligned: srcorig: 0xffff932c008a8210 > 2025-12-26T20:30:02.666102-04:00 abc kernel: [ 52.640520] ** ** > bit_putcs_aligned: before: ch: 0x20 > 2025-12-26T20:30:02.666103-04:00 abc kernel: [ 52.640520] ** ** > bit_putcs_aligned: after: ch: 0x20 > 2025-12-26T20:30:02.666104-04:00 abc kernel: [ 52.640521] ** ** > bit_putcs_aligned: charcnt: 0x0 > 2025-12-26T20:30:02.666104-04:00 abc kernel: [ 52.640522] ** ** > bit_putcs_aligned: cellsize: 0x10 > 2025-12-26T20:30:02.666105-04:00 abc kernel: [ 52.640522] ** ** > bit_putcs_aligned: ch * cellsize: 0x200 > 2025-12-26T20:30:02.666106-04:00 abc kernel: [ 52.640523] ** ** > bit_putcs_aligned: srcnew: 0xffff932c008a8210 > 2025-12-26T20:30:02.666107-04:00 abc kernel: [ 52.640523] ** ** > bit_putcs_aligned: srcorig - srcnew: 0x0 > 2025-12-26T20:30:02.666108-04:00 abc kernel: [ 52.640525] ** ** > bit_putcs_aligned: srcnew > 2025-12-26T20:30:02.666109-04:00 abc kernel: [ 52.640525] ** ** > bit_putcs_aligned: <<---------- > 2025-12-26T20:30:02.666110-04:00 abc kernel: [ 52.640526] ** ** > bit_putcs_aligned: ---------->> > 2025-12-26T20:30:02.666121-04:00 abc kernel: [ 52.640526] ** ** > bit_putcs_aligned: cnt: 11 > 2025-12-26T20:30:02.666123-04:00 abc kernel: [ 52.640527] ** ** > bit_putcs_aligned: vc->vc_font.data: 0xffff932c008a8010 > 2025-12-26T20:30:02.666124-04:00 abc kernel: [ 52.640527] ** ** > bit_putcs_aligned: srcorig: 0xffff932c008a8320 > 2025-12-26T20:30:02.666125-04:00 abc kernel: [ 52.640528] ** ** > bit_putcs_aligned: before: ch: 0x31 > 2025-12-26T20:30:02.666125-04:00 abc kernel: [ 52.640528] ** ** > bit_putcs_aligned: after: ch: 0x20 <<<--- CLOBBERED > 2025-12-26T20:30:02.666126-04:00 abc kernel: [ 52.640529] ** ** > bit_putcs_aligned: charcnt: 0x0 > 2025-12-26T20:30:02.666127-04:00 abc kernel: [ 52.640529] ** ** > bit_putcs_aligned: cellsize: 0x10 > 2025-12-26T20:30:02.666128-04:00 abc kernel: [ 52.640530] ** ** > bit_putcs_aligned: ch * cellsize: 0x200 > 2025-12-26T20:30:02.666129-04:00 abc kernel: [ 52.640530] ** ** > bit_putcs_aligned: srcnew: > 0xffffjjjjjjjjjjjjjjjjj932c008a8210 > 2025-12-26T20:30:02.666130-04:00 abc kernel: [ 52.640531] ** ** > bit_putcs_aligned: srcorig - srcnew: 0x110 > 2025-12-26T20:30:02.666130-04:00 abc kernel: [ 52.640531] ** ** > bit_putcs_aligned: srcnew > 2025-12-26T20:30:02.666132-04:00 abc kernel: [ 52.640531] ** ** > bit_putcs_aligned: <<---------- > -------------------------- log ------------------------- > . > Here is the patch that produced this log. DO NOT work in the vtty > with this patch, it will fill your logs and maybe make your machine > unbootable. Word to the wise. > . > -------------------------- patch to generate log -------------------------- > --- a/drivers/video/fbdev/core/bitblit.c 2025-12-26 > 14:46:52.270645363 -0400 > +++ b/drivers/video/fbdev/core/bitblit.c 2025-12-26 > 20:21:38.096907035 -0400 > @@ -82,13 +82,35 @@ > unsigned int charcnt = vc->vc_font.charcount; > u32 idx = vc->vc_font.width >> 3; > u8 *src; > + u16 ch = 0; > + u16 prech = 0; > + u8 * srcnew, * srcorig; > > while (cnt--) { > - u16 ch = scr_readw(s++) & charmask; > - > - if (ch >= charcnt) > - ch = 0; > - src = vc->vc_font.data + (unsigned int)ch * cellsize; > + prech = scr_readw(s++); > + srcorig = vc->vc_font.data + (prech& > + charmask)*cellsize; > + printk("** ** bit_putcs_aligned: ---------->>\n"); > + printk("** ** bit_putcs_aligned: cnt: %d\n", cnt); > + printk("** ** bit_putcs_aligned: vc->vc_font.data: > 0x%lx\n", vc->vc_font.data ); > + printk("** ** bit_putcs_aligned: srcorig: > 0x%lx\n", srcorig ); > + > + ch = prech & charmask; > + printk("** ** bit_putcs_aligned: before: ch: 0x%x\n", ch); > + > + if (ch >= charcnt) > + ch = 32; > + srcnew = vc->vc_font.data + ch * cellsize; > + printk("** ** bit_putcs_aligned: after: ch: 0x%x\n", ch); > + printk("** ** bit_putcs_aligned: charcnt: 0x%x\n", charcnt); > + printk("** ** bit_putcs_aligned: cellsize: 0x%x\n", cellsize); > + printk("** ** bit_putcs_aligned: ch * cellsize: > 0x%x\n", (ch * cellsize)); > + printk("** ** bit_putcs_aligned: srcnew: > 0x%lx\n", srcnew); > + printk("** ** bit_putcs_aligned: srcorig - srcnew: > 0x%lx\n", (srcorig - srcnew)); > + > + // src = srcorig; printk("** ** bit_putcs_aligned: > srcorig\n"); > + src = srcnew; printk("** ** bit_putcs_aligned: srcnew\n"); > + printk("** ** bit_putcs_aligned: <<----------\n"); > > if (attr) { > update_attr(buf, src, attr, vc); > -------------------------- patch to generate log -------------------------- > . > > On Fri, Dec 26, 2025 at 3:18 PM William Burrow <[email protected]> wrote: > > > > Hi, all. > > To summarize the message thread, commit 0998a6cb232 was found to be > > the issue. It is unclear why this commit causes an issue. It was > > added shortly after kernel v5.10.246 was released, so it was not > > necessary to bisect between 5.10.244 and 5.10.247, saving time. > > . > > In testing, it was found that the variable charcnt is set to zero, > > causing the if-statement to trigger. This should not happen. There > > may be a bug somewhere else that triggers this. > > . > > Patching the line after the added if-statement in that commit from ch > > = 0 to ch = 32 (space character) does not seem to fix the issue, it > > just changes it from a screen of symbols to a (mostly) blank screen. > > This is unexpected, since the address for the variable src should be > > the same calculated with the change of ch = 32 with this patch or the > > code before this patch. > > . > > Thanks for your time to review this bug. > > . > > ------------------------- suspected commit ---------------------- > > diff --git a/drivers/video/fbdev/core/bitblit.c > > b/drivers/video/fbdev/core/bitblit.c > > index bb821b68f88c..4e774010d09f 100644 > > --- a/drivers/video/fbdev/core/bitblit.c > > +++ b/drivers/video/fbdev/core/bitblit.c > > @@ -79,12 +79,16 @@ static inline void bit_putcs_aligned(struct > > vc_data *vc, struct fb_info *info, > > struct fb_image *image, u8 *buf, u8 > > *dst) > > { > > u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; > > + unsigned int charcnt = vc->vc_font.charcount; > > u32 idx = vc->vc_font.width >> 3; > > u8 *src; > > > > while (cnt--) { > > - src = vc->vc_font.data + (scr_readw(s++)& > > - charmask)*cellsize; > > + u16 ch = scr_readw(s++) & charmask; > > + > > + if (ch >= charcnt) > > + ch = 0; > > + src = vc->vc_font.data + (unsigned int)ch * cellsize; > > > > if (attr) { > > update_attr(buf, src, attr, vc); > > @@ -112,14 +116,18 @@ static inline void bit_putcs_unaligned(struct vc_data > > *vc, > > u8 *dst) > > { > > u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; > > + unsigned int charcnt = vc->vc_font.charcount; > > u32 shift_low = 0, mod = vc->vc_font.width % 8; > > u32 shift_high = 8; > > u32 idx = vc->vc_font.width >> 3; > > u8 *src; > > > > while (cnt--) { > > - src = vc->vc_font.data + (scr_readw(s++)& > > - charmask)*cellsize; > > + u16 ch = scr_readw(s++) & charmask; > > + > > + if (ch >= charcnt) > > + ch = 0; > > + src = vc->vc_font.data + (unsigned int)ch * cellsize; > > > > if (attr) { > > update_attr(buf, src, attr, vc); > > ------------------------- suspected commit ---------------------- > > > > On Fri, Dec 26, 2025 at 12:48 PM Salvatore Bonaccorso <[email protected]> > > wrote: > > > > > > Control: tags -1 - moreinfo > > > Control: forwarded -1 > > > https://lists.debian.org/debian-kernel/2025/12/msg00293.html > > > https://lists.debian.org/debian-kernel/2025/12/msg00211.html > > > > > > Hi, > > > > > > On Sun, Dec 21, 2025 at 04:19:14PM +0000, Thorsten Glaser wrote: > > > > Hi Salvatore, > > > > > > > > >If you can do the bisect mentioned that would help identifying the > > > > >problem. > > > > > > > > I’m not in a position to do that currently, I don’t have a > > > > fast machine anyway and packed light, too. But at least X11 > > > > works, so I’m fine currently. > > > > > > > > This is a Thinkpad X61 with Intel integrated graphics, FWIW. > > > > > > FTR, there is some progress in > > > https://lists.debian.org/debian-kernel/2025/12/msg00293.html (which > > > retrospectively we should have made a Debian BTS bug from the start > > > for easier tracking). > > > > > > Helge, can you please include the Debian bug #1123750 in next replies? > > > > > > Regards, > > > Salvatore

