The officially official Devuan Forum!

You are not logged in.

#1 2020-08-09 08:49:21

Bill Evans
Member
Registered: 2020-08-06
Posts: 13  

[SOLVED] disable frame buffer

I am running devuan without X. I wish the console and virtual consoles to use the old 25 x 80 format, nice and crisp, without using a frame buffer; using the frame buffer seems to make the characters smaller so I get 48 lines of text on the screen.  How do I set things up so that upon boot the frame buffer is disabled/not used? I've looked on the web, and all discussion about this seems to be ages old and referring to configuration files that no longer exist.

Last edited by Bill Evans (2020-08-10 18:35:04)

Offline

#2 2020-08-09 11:41:46

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 976  
Website

Re: [SOLVED] disable frame buffer

See https://support.digium.com/s/article/Ho … g-problems & https://www.kernel.org/doc/html/latest/fb/fbcon.html but I think a better solution would be to set a bigger console font:

# apt install console-setup
# dpkg-reconfigure console-setup

Black Lives Matter

Offline

#3 2020-08-09 19:15:14

Bill Evans
Member
Registered: 2020-08-06
Posts: 13  

Re: [SOLVED] disable frame buffer

The digium link is perfect, thank you. I'll skip the console-setup alternative for now, because I've never seen a loaded video font that was as crisp or as readable as a native one. But I'm guessing that's a religious issue. I've salted away your console-setup idea in case I ever need it, but the digium link is huge. And yes, performance is an issue, since I do use digium telephony cards (but not Asterisk software). I never thought to go to digium for help.

The kernel.org link is interesting, and worth looking at more closely at some future point.

Offline

#4 2020-08-10 09:15:45

Bill Evans
Member
Registered: 2020-08-06
Posts: 13  

Re: [SOLVED] disable frame buffer

Ok, I looked at the digium page and saw that it advised five kernel command line arguments. It said that on a given system, one of them should disable the frame buffer, and that it wouldn't hurt to throw all five of them in there. I found that either of two of them worked for me. I settled on "nomodeset".

"Settling on nomodeset" means that I could boot, press "e" to edit the commands, find the "linux" line, and add nomodeset as one of the parameters. That worked. But my application runs while I'm away, and on power failure followed by power restore, I want the application to start up without human invervention.  So pressing "e" is not an option there.  The page does say how to make the nomodeset parameter permanent and automatic.

The page first advises editing /boot/grub/menu.lst, but that file doesn't exist. No problem: the page goes on to advise that on "modern Debian systems" one should instead edit /etc/grub.d/10_linux. Look for the "linux" command, and add the parameter (in this case, "nomodeset") to that line.  It turns out there are two such lines; I modified both of them.  It had no effect whatsoever; that is, when I rebooted, (a) pressing "e" presented me with a "linux" line that did not include "nomodeset", and (b) after the system finished booting, /dev/fb0 was present. Further, I found that crippling /etc/grub.d/10_linux (with s/linux/linus/, s/LINUX/LINUS/, s/Linux/Linus, just for fun), or removing that file entirely, didn't change how devuan booted. That file seems to have zero effect on boot. Hmm.

It turns out that the answer (at least for devuan 3.0) is:

Edit /etc/default/grub. Find this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet"

Add to that line one or all of these five arguments:

vga=normal
nofb
nomodeset
video=vesafb:off
i915.modeset=0

I changed that line to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset"

Then close the edit and run update-grub.

When you reboot, you'll notice two things. First, if you press "e" while in grub, you'll see that the nomodeset is there on the linux line. Second, when rebooting has finished, you'll notice that /dev/fb0 is absent.

Last edited by Bill Evans (2020-08-10 09:20:39)

Offline

#5 2020-08-10 09:41:04

Geoff 42
Member
Registered: 2016-12-15
Posts: 366  

Re: [SOLVED] disable frame buffer

Yes, don't forget to run

update-grub

after you have made any changes to the grub configuration files, otherwise the changes will have no effect.

Geoff

Offline

#6 2020-08-16 09:56:48

Bill Evans
Member
Registered: 2020-08-06
Posts: 13  

Re: [SOLVED] disable frame buffer

One more wrinkle, though.  Even though the framebuffer has been disabled, there's still a point where the native font is replaced by one that looks almost the same, but isn't quite.  The native font is more readable from across the room (and, in my opinion, is more esthetically pleasing).  To fix this bug, preventing the use of an artificial font, make the following configuration change:

rm /bin/setupcon

The results are delightful, I still get my virtual consoles, and I've never looked back.

Offline

#7 2020-08-16 12:21:46

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 976  
Website

Re: [SOLVED] disable frame buffer

Bill Evans wrote:

To fix this bug, preventing the use of an artificial font, make the following configuration change:

rm /bin/setupcon

Less hacky solution:

# apt purge console-setup

Black Lives Matter

Offline

#8 2020-08-16 23:12:57

Bill Evans
Member
Registered: 2020-08-06
Posts: 13  

Re: [SOLVED] disable frame buffer

Well, now, this is really embarrassing.

In the light of day, when it comes to using the hardware native screen font, there are actually two advantages for using Head's solution.  One, as he says: it's less hacky.  The other: um, their solution works and mine doesn't.  I don't know why my testing was so abysmal.

But wait!  There's another solution!  It's hacky, but it works:

mv /etc/console-setup /etc/xxconsole-setup

The advantage is that if you ever want to reverse this, you don't have to have access to a DVD, or a USB stick, or the Internet, to do so, because you won't have to reinstall console-setup.  Just reverse the rename.

Aaaand, for esthetic consistency goodness, you can go full hacky:

mv /boot/grub/fonts /boot/grub/xxfonts

Offline

#9 2020-08-18 12:56:51

bgstack15
Member
Registered: 2018-02-04
Posts: 168  

Re: [SOLVED] disable frame buffer

How do you feel about /boot/grub/fonts.off instead? To me, .off is a lot clearer than xx, which could be useful if it's an X11 component. And I use xxd a lot...


This space intentionally left blank.

Offline

#10 2020-08-18 15:17:40

Bill Evans
Member
Registered: 2020-08-06
Posts: 13  

Re: [SOLVED] disable frame buffer

Either way works for me!

Offline

#11 2020-08-18 19:10:00

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 976  
Website

Re: [SOLVED] disable frame buffer

There is a third option: reconfigure the console-setup package and select the VGA font, which is the native font supplied by the video card.

For GRUB use the GRUB_FONT option in /etc/default/grub. Or just write your own grub.cfg instead and don't set the font (remove the GRUB packages to prevent the configuration file being overwritten after kernel upgrades).


Black Lives Matter

Offline

Board footer