LWN: Comments on "Resurrecting fbdev" https://lwn.net/Articles/881827/ This is a special feed containing comments posted to the individual LWN article titled "Resurrecting fbdev". en-us Sat, 06 Sep 2025 02:57:38 +0000 Sat, 06 Sep 2025 02:57:38 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Resurrecting fbdev https://lwn.net/Articles/882977/ https://lwn.net/Articles/882977/ HelloWorld <div class="FormattedComment"> <font class="QuotedText">&gt; If this is the case, there is nothing Deller can do to make it worse.</font><br> <p> Of course there is. He can make people think that using fbdev is a reasonable idea because, after all, it is being maintained now! Or he can delay the removal of that code.<br> <p> This whole situation is very unfortunate. Just let it die already.<br> </div> Fri, 28 Jan 2022 03:23:45 +0000 Resurrecting fbdev https://lwn.net/Articles/882262/ https://lwn.net/Articles/882262/ ballombe <div class="FormattedComment"> Everyone knew it was a regression when it was done. shift-page up is a documented user interface. The IOCTL is documented. consolation already existed. It is never too late to do the right thing.<br> </div> Sun, 23 Jan 2022 20:39:45 +0000 Resurrecting fbdev https://lwn.net/Articles/882214/ https://lwn.net/Articles/882214/ zdzichu <div class="FormattedComment"> It&#x27;s been years, isn&#x27;t that too long to claim regression?<br> </div> Sat, 22 Jan 2022 16:55:03 +0000 Resurrecting fbdev https://lwn.net/Articles/882203/ https://lwn.net/Articles/882203/ tdz <div class="FormattedComment"> Thanks a lot.<br> </div> Sat, 22 Jan 2022 16:24:22 +0000 Resurrecting fbdev https://lwn.net/Articles/882188/ https://lwn.net/Articles/882188/ ballombe <div class="FormattedComment"> Is it what you want ?<br> <a href="https://bugs.debian.org/988039">https://bugs.debian.org/988039</a><br> <p> <p> </div> Sat, 22 Jan 2022 09:25:44 +0000 Resurrecting fbdev https://lwn.net/Articles/882187/ https://lwn.net/Articles/882187/ tdz <div class="FormattedComment"> Hi, could you please link a bug report for this problem?<br> </div> Sat, 22 Jan 2022 08:28:58 +0000 Resurrecting fbdev https://lwn.net/Articles/882133/ https://lwn.net/Articles/882133/ bnorris <div class="FormattedComment"> You mean something like this?<br> <p> <a href="https://www.kernel.org/doc/html/latest/admin-guide/ramoops.html">https://www.kernel.org/doc/html/latest/admin-guide/ramoop...</a><br> <p> That&#x27;s been upstream for quite a while, and it works just fine. Chrome OS uses it heavily for field crash logging. Despite its naming, it can be configured to dump logs to RAM even on non-crashes.<br> </div> Fri, 21 Jan 2022 18:29:49 +0000 Resurrecting fbdev https://lwn.net/Articles/882058/ https://lwn.net/Articles/882058/ geert <div class="FormattedComment"> I wasn&#x27;t aware of that. So this should be reported as as userspace regression.<br> </div> Fri, 21 Jan 2022 12:11:26 +0000 Resurrecting fbdev https://lwn.net/Articles/882054/ https://lwn.net/Articles/882054/ ballombe I hope it will be restored. This breaks <a href="https://salsa.debian.org/consolation-team/consolation/">consolation</a> Fri, 21 Jan 2022 11:51:28 +0000 Resurrecting fbdev https://lwn.net/Articles/882048/ https://lwn.net/Articles/882048/ geert <div class="FormattedComment"> <font class="QuotedText">&gt; fbcon scrollback rarely works</font><br> <p> Fbcon scrollback was removed in v5.9 (<a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=50145474f6ef">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/...</a>).<br> </div> Fri, 21 Jan 2022 08:49:55 +0000 Resurrecting fbdev https://lwn.net/Articles/882033/ https://lwn.net/Articles/882033/ blackwood <div class="FormattedComment"> It stalled for a few years, but a few folks from rh and suse have picked up the pieces again. We have simpledrm now merged, which means firmware fbdev drivers (efifb, vesafb, ...) aren&#x27;t needed anymore, and you can have a pure kms world.<br> <p> Next step is to get some kernel console on top of drm landed, for (emergency) logging. This should probably wait for the remaining console_lock rework so that we don&#x27;t have to maintain our own kthread for offloading.<br> <p> At that point all the pieces are in places for distros to ditch CONFIG_VT and fbcon and use kmscon for non-graphical shell logins on the local machine. Apparently logind/seatd already can do all the vt switching without CONFIG_VT (since that&#x27;s needed for all the additional seats anyway), so that part is covered.<br> <p> It might all actually happen this decade!<br> </div> Thu, 20 Jan 2022 23:09:49 +0000 Resurrecting fbdev https://lwn.net/Articles/882014/ https://lwn.net/Articles/882014/ MrWim <div class="FormattedComment"> <font class="QuotedText">&gt; work in the face of unknown kernel corruption.</font><br> <p> I quite like the scheme described here: <a href="https://apenwarr.ca/log/20190216">https://apenwarr.ca/log/20190216</a> . The kmsg buffer is at a fixed location in memory, so you can write there which should be reliable even in the face of significant kernel memory corruption. On the next boot the kernel checks if there are valid messages there and preserves them so you can see what went wrong. It&#x27;s beautiful in its simplicity.<br> <p> The patches were posted upstream, but it never went anywhere.<br> <p> <a href="https://lore.kernel.org/lkml/1331617001-20906-1-git-send-email-apenwarr@gmail.com/">https://lore.kernel.org/lkml/1331617001-20906-1-git-send-...</a><br> </div> Thu, 20 Jan 2022 21:42:26 +0000 Resurrecting fbdev https://lwn.net/Articles/882012/ https://lwn.net/Articles/882012/ josh <div class="FormattedComment"> I agree; putting the simplest possible thing in kernel space and all the complexity into userspace seems like the right answer here. Keep a terminal up-to-date, and render it to a framebuffer based on a frame rate (e.g. vsync).<br> </div> Thu, 20 Jan 2022 20:57:15 +0000 Resurrecting fbdev https://lwn.net/Articles/881993/ https://lwn.net/Articles/881993/ flussence <div class="FormattedComment"> Right now we have neither:<br> <p> When things are working normally, the console&#x27;s only function is as blinkenlights so people know their boot hasn&#x27;t frozen. It&#x27;s also a significant bottleneck as shown (restoring hwaccel would only hide this symptom) and as an interactive terminal it&#x27;s pretty bad too. There&#x27;s no reason to have &quot;every frame a painting&quot; here.<br> <p> When things aren&#x27;t working, the console is useless because it scrolls far too fast for an operator at the terminal to read it all (restoring hwaccel would only make this worse), and fbcon scrollback rarely works at the best of times so any important output that scrolls offscreen is lost. There are already half a dozen ways to get organic-readable boot output, this part doesn&#x27;t need further fixing.<br> <p> It&#x27;s basically the atime thing all over again.<br> </div> Thu, 20 Jan 2022 19:08:19 +0000 Resurrecting fbdev https://lwn.net/Articles/882000/ https://lwn.net/Articles/882000/ JoeBuck <div class="FormattedComment"> Or on a panic, do a switch to dumb mode and print raw, but this needs to work in the face of unknown kernel corruption.<br> <p> </div> Thu, 20 Jan 2022 18:32:49 +0000 Resurrecting fbdev https://lwn.net/Articles/881985/ https://lwn.net/Articles/881985/ gnoutchd Whatever became of <a href="https://www.freedesktop.org/wiki/Software/kmscon/">kmscon</a>? Putting the "smart" console in userspace sounds like a solution, no? Should people be thinking about converting hw-accelerated fbdev drivers into kmscon backends, or somesuch? Thu, 20 Jan 2022 18:22:10 +0000 Resurrecting fbdev https://lwn.net/Articles/881984/ https://lwn.net/Articles/881984/ ibukanov <div class="FormattedComment"> If one needs absolutely reliable way to print kernel errors, then just output it to a serial port or log it over network if the former is not available. The modern graphics hardware is way too complex to allow for the dumbest frame buffer to be reliable. Probability of if not hardware bugs but at least quirks is just too high.<br> </div> Thu, 20 Jan 2022 16:22:46 +0000 Resurrecting fbdev https://lwn.net/Articles/881959/ https://lwn.net/Articles/881959/ daenzer <div class="FormattedComment"> &quot;The DRM subsystem does not have support for 2D acceleration&quot; is not correct. The linked article is specifically about a generic 2D acceleration UAPI, which fbdev doesn&#x27;t have either (because it&#x27;s basically impossible to define a sensible one).<br> <p> A DRM driver can however implement the same fbdev acceleration hooks as a native fbdev driver can, and some DRM drivers actually did. Many DRM drivers haven&#x27;t done this because the HW is more complex than a traditional 2D accelerator and cannot safely be used under all circumstances where fbdev acceleration hooks can get called.<br> </div> Thu, 20 Jan 2022 15:05:01 +0000 Resurrecting fbdev https://lwn.net/Articles/881901/ https://lwn.net/Articles/881901/ Karellen <blockquote>You can't really have it both ways, at least not without some solid effort by a pile of people.</blockquote> <p>I guess the answer would be two separate modules, fbcon_basic and fbcon_fast, and you pick which one you want at either kernel build time, or build both and pick at initrd creation time?</p> <p>But I suppose that falls under "some solid effort by a pile of people".</p> Thu, 20 Jan 2022 11:29:10 +0000 Resurrecting fbdev https://lwn.net/Articles/881897/ https://lwn.net/Articles/881897/ error27 <div class="FormattedComment"> Huh... I know that patching fbdev is a waste of time, but sometimes code annoys me so much that I just fix it anyway. I just looked at my outbox and I discovered that *none* of my fbdev patches from 2021 were applied.<br> <p> I sent four patches to fbdev in 2021. In one case, the original author fixed his bug before me so that&#x27;s fine. In another case, my patch was Acked but not applied. And for the remaining two patches I was just ignored. There is no other subsystem right now that&#x27;s as bad as that.<br> <p> It&#x27;s such a discouraging thing because newbies are like:<br> <p> Step 1: Find an easy bug<br> Step 2: Fbdev hasn&#x27;t applied bugfixes for years so it has the most obvious bugs<br> Step 3: Send a patch<br> Step 4: Wait for feedback before going further<br> Step 5: Die of old age<br> </div> Thu, 20 Jan 2022 10:56:05 +0000 Resurrecting fbdev https://lwn.net/Articles/881895/ https://lwn.net/Articles/881895/ ballombe <div class="FormattedComment"> <font class="QuotedText">&gt; The thing _is_ a root exploit pretty much end-to-end :-/</font><br> <p> If this is the case, there is nothing Deller can do to make it worse.<br> Since KMS made all but impossible to use the VGA console, all systems are running fbdev now.<br> I for one, am happy there is a new maintainer that see fbdev as something else as a liability.<br> </div> Thu, 20 Jan 2022 10:56:01 +0000 Resurrecting fbdev https://lwn.net/Articles/881893/ https://lwn.net/Articles/881893/ shiftee <div class="FormattedComment"> Easier to ask for forgiveness than permission<br> </div> Thu, 20 Jan 2022 09:37:06 +0000 Resurrecting fbdev https://lwn.net/Articles/881889/ https://lwn.net/Articles/881889/ blackwood <div class="FormattedComment"> The problem with fbcon is that people want two things from it, which aren&#x27;t very compatible:<br> <p> Either a fast console because they don&#x27;t want to run bloated X or something like that, or because boot times or whatever. Those people want the shadow buffered fbcon and redraw limiting. Because all the people capable of writing high performance graphics are busy hacking on wayland (not even X anymore), there&#x27;s just not many folks who care enough to push the kernel console forward.<br> <p> The others want the dumbest possible console which can be slow, but should try the hardest to get an oops to the screen when the kernel is on fire. In that case you do not want shadow buffering, and the dumber and more immediate the code is, the better. This also means the least amount of hw touching, so definitely no acceleration or anything.<br> <p> You can&#x27;t really have it both ways, at least not without some solid effort by a pile of people.<br> </div> Thu, 20 Jan 2022 09:12:29 +0000 Resurrecting fbdev https://lwn.net/Articles/881888/ https://lwn.net/Articles/881888/ blackwood <div class="FormattedComment"> From drm side we do care a bit about fbdev, but it&#x27;s extremely limited to just the core code, fbcon, and the handful of firmware drivers that run before drm drivers take over.<br> <p> So yeah any driver patches for something like cirrusfb tend to get ingored. Run the drm/cirrus driver instead, if that blows up there will be people who take a look.<br> <p> The thing _is_ a root exploit pretty much end-to-end :-/<br> </div> Thu, 20 Jan 2022 09:05:49 +0000 Resurrecting fbdev https://lwn.net/Articles/881881/ https://lwn.net/Articles/881881/ error27 <div class="FormattedComment"> The fbdev subsystem has needed a maintainer for a years. It&#x27;s a super frustrating subsystem because when you report bugs the attitude is &quot;Yeah. Fbdev is a known root exploit so who cares if it crashes a bit?&quot;<br> <p> For example, here are some bugs I reported back in 2014.<br> <a href="https://marc.info/?l=kernel-janitors&amp;m=139060309806888&amp;w=2">https://marc.info/?l=kernel-janitors&amp;m=13906030980688...</a><br> <p> Here is the fix for that from last December but it still has not been applied. I asked George Kennedy to wait for a bit and resend it through Andrew Morton.<br> <a href="https://lkml.org/lkml/2021/12/7/1040">https://lkml.org/lkml/2021/12/7/1040</a><br> <p> On the other hand, I really don&#x27;t want the accelerated scrolling patch to be revived. The main problem with fbdev is all the crashing and the memory corruption bugs. Memory corruption bugs confuse syzbot so instead of showing up as one bug, it shows up as dozens of crazy bugs in random parts of the kernel. It&#x27;s horrible and we spent a long time fixing it. Let&#x27;s not go backwards.<br> </div> Thu, 20 Jan 2022 06:17:55 +0000 Resurrecting fbdev https://lwn.net/Articles/881870/ https://lwn.net/Articles/881870/ flussence <p>Making fbcon render asynchronously from a shadow buffer should be the top priority here. To demonstrate a point:</p> <pre>~ $ time find /usr/share [~140k lines snipped] # on a vt, backed by radeondrmfb and a very fast CPU real 1m4.837s user 0m0.128s sys 0m31.975s # xfce4-terminal, which according to actual science is one of the slowest X11 terms: # https://lwn.net/Articles/751763/ real 0m0.873s user 0m0.192s sys 0m0.199s</pre> <p>A bare-bones fbcon is almost 75x slower than a (imho) somewhat bloated terminal emulator that happens to have a simple redraw-throttling optimisation - that's the kind of thing that leads to cargo-cult boot optimisation guides telling people to disable all kernel and init output to shave off a few centiseconds.</p> Thu, 20 Jan 2022 03:49:35 +0000