Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Kernel Console Resolution

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
giordano
Posts: 2
Joined: 2023-03-19 16:20

[Solved] Kernel Console Resolution

#1 Post by giordano »

Hi,
sorry for this question which is at least similar to another one on this forum (viewtopic.php?t=146656), but with no clear solution provided.

I just installed Debian 11 on a machine working as a server on which I do not need any Graphic Environment on it.
Thus I installed it in text mode to save some RAM.
When the machine boots the console is shifted too way on the left, and the monitor controls are unable to correct this.
As you see in the figure, despite shifting the screen 100% to the right, there are still nearly 15 characters falling off the left edge, making the arrangement rather unusable.
20230319_180417.jpg
I tried to fiddle with GRUB2 params such as "gfxmode", "gfxpayload" and the like and I can perfectly control the resolution of the GRUB screen that I can change at will.
However I have no luck with the kernel console. It seems that when the kernel starts there is no way to specify the resolution nor to change it afterwards at run time.
(gfxpayload=1024x768 or gfxpayload=keep do not work as expected).

I tried to pass vga="ask" as I did in the old days and the kernel even recognizes it, but it says that it is no longer supported by now.
After the kernel is booted even issuing "fbset" does not seem to produce any effect besides simply clipping the output on a screen subregion (the resolution is not changed).

Nevertheless if I connect a different monitor with a lower resolution when the kernel boots it properly adjusts its resolution.
So if I then switch to the monitor you see in the image, everything works fine keeping that resolution.

Thus the question is: is there a way to specify a console resolution that works for me to the kernel at boot ?

Many Thanks !!!
Last edited by giordano on 2023-03-20 14:31, edited 1 time in total.

User avatar
NorthEast
Posts: 349
Joined: 2018-11-18 04:35
Has thanked: 12 times
Been thanked: 30 times

Re: [Software] Kernel Console Resolution

#2 Post by NorthEast »

You check if a change in font makes a difference (size and type) ... change it in /etc/default/console-setup and restart the systemd console-setup service. May or may not make a difference.

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Software] Kernel Console Resolution

#3 Post by Aki »

Hello,
Welcome to the forum.
giordano wrote: 2023-03-19 17:24 When the machine boots the console is shifted too way on the left, and the monitor controls are unable to correct this
[..] Nevertheless if I connect a different monitor with a lower resolution when the kernel boots it properly adjusts its resolution. So if I then switch to the monitor you see in the image, everything works fine keeping that resolution.
Thus the question is: is there a way to specify a console resolution that works for me to the kernel at boot ?
When the monitor shows the issue, you can use the following command to determine the kernel module in use and the available resolutions:

Code: Select all

hwinfo --framebuffer | tee framebuffer.log
The output will appear on the screen and it will be saved on the file name framebuffer.log . It would be interesting to compare the outputs when the issue appears and when it does not. What are the affected monitor’s specs ?
giordano wrote: 2023-03-19 17:24 Thus the question is: is there a way to specify a console resolution that works for me to the kernel at boot ?
You could try (different possible solutions):
1) reconfigure the virtual console to choose a resolution that works with your affected monitor; you can use the command (as root user):

Code: Select all

dpkg-reconfigure console-setup
2) booting the kernel disabling the kernel modesetting (passing the "nomodeset" parameter to the linux kernel through grub configuration). This should boot the kernel in vga mode.

3) configuring the frame buffer; you can add a kernel video= option (see https://www.kernel.org/doc/Documentation/fb/modedb.txt and https://unix.stackexchange.com/question ... al-console )

Hope that helps.

EDIT: oops, simultaneously with northeast's answer
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

giordano
Posts: 2
Joined: 2023-03-19 16:20

Re: [Software] Kernel Console Resolution

#4 Post by giordano »

Hi Guys,

I'm happy to tell that on my side the problem is SOLVED :-)

I spent some time browsing through the framebuffer docs and kernel command line parameters at www.kernel.org.
As also kindly suggested by Aki [memberlist.php?mode=viewprofile&u=188534], I found on [https://docs.kernel.org/admin-guide/ker ... eters.html] that there is a [video=] switch available on every machine with a FrameBuffer. The config params are further documented on [https://www.kernel.org/doc/Documentation/fb/modedb.rst].
So I added it to the linux line in GRUB of my current config and .... that simply did the trick !

linux /boot/vmlinuz-5.10.0-21-amd64 root=UUID=38bbe745-76e2-4edf-81c7-7ea992eae1e6 ro quiet video=VGA-1:1024x768@60

I still ignore why the GRUB2 parameter devoted to this purpose (i.e. gfxpayload) does not work and would love to understand the reason, but I have no experience in compiling grub. Anyway as you can see in the image now it works perfectly, and the monitor now sets the position perfectly at 50%.
20230320_095633.jpg
On this page [https://docs.kernel.org/fb/fbcon.html] there is also an [fbcon=] switch, referenced as being largely unknown, for changing the font and more, but I have not tried it yet.

Anyway I just wanted to share this with all the forum participants hoping to help, since in the post that I initially referenced I did not find this hint that is really simple and effective and probably was also what that person was looking for !

Thanks a lot Aki !

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Software] Kernel Console Resolution

#5 Post by Aki »

Hello,

Thank you for the update. Happy to hear from you that you worked it out. :-)

Please, mark the thread as "Solved" adding the prefix "[Solved]" at the beginning of the subject of your first post. This way other viewers will find it easily.

Happy Debian & happy hacking.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply