Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Console without framebuffer in UEFI mode
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
sebaro
Veteran
Veteran


Joined: 03 Jul 2006
Posts: 1141
Location: Romania

PostPosted: Mon Jul 24, 2017 9:26 am    Post subject: [Solved] Console without framebuffer in UEFI mode Reply with quote

If I disable framebuffer in kernel I have no console.
The only way to have an X session is to autologin and autostart X.

Code:

   VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Kabini [Radeon HD 8400 / R3 Series] (prog-if 00 [VGA controller])
   Subsystem: ASRock Incorporation Kabini [Radeon HD 8400 / R3 Series]
   Flags: bus master, fast devsel, latency 0, IRQ 41
   Memory at c0000000 (64-bit, prefetchable) [size=256M]
   Memory at d0000000 (64-bit, prefetchable) [size=8M]
   I/O ports at f000 [size=256]
   Memory at ffb00000 (32-bit, non-prefetchable) [size=256K]
   Expansion ROM at 000c0000 [disabled] [size=128K]
   Capabilities: <access denied>
   Kernel driver in use: radeon
   Kernel modules: radeon, amdgpu


Code:

#
# Graphics support
#
# CONFIG_AGP is not set
CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=16
# CONFIG_VGA_SWITCHEROO is not set
CONFIG_DRM=y
# CONFIG_DRM_DP_AUX_CHARDEV is not set
# CONFIG_DRM_DEBUG_MM is not set
# CONFIG_DRM_DEBUG_MM_SELFTEST is not set
CONFIG_DRM_KMS_HELPER=m
# CONFIG_DRM_FBDEV_EMULATION is not set
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
CONFIG_DRM_TTM=m

#
# I2C encoder or helper chips
#
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
CONFIG_DRM_RADEON=m
CONFIG_DRM_RADEON_USERPTR=y
CONFIG_DRM_AMDGPU=m
# CONFIG_DRM_AMDGPU_SI is not set
CONFIG_DRM_AMDGPU_CIK=y
CONFIG_DRM_AMDGPU_USERPTR=y
# CONFIG_DRM_AMDGPU_GART_DEBUGFS is not set

#
# ACP (Audio CoProcessor) Configuration
#
# CONFIG_DRM_AMD_ACP is not set
# CONFIG_DRM_NOUVEAU is not set
# CONFIG_DRM_I915 is not set
# CONFIG_DRM_VGEM is not set
# CONFIG_DRM_VMWGFX is not set
# CONFIG_DRM_GMA500 is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_QXL is not set
# CONFIG_DRM_BOCHS is not set
CONFIG_DRM_BRIDGE=y

#
# Display Interface Bridges
#
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
# CONFIG_DRM_HISI_HIBMC is not set
# CONFIG_DRM_TINYDRM is not set
# CONFIG_DRM_LEGACY is not set
# CONFIG_DRM_LIB_RANDOM is not set

#
# Frame buffer Devices
#
# CONFIG_FB is not set
CONFIG_FB_CMDLINE=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=m
CONFIG_LCD_PLATFORM=m
CONFIG_BACKLIGHT_CLASS_DEVICE=m
CONFIG_BACKLIGHT_GENERIC=m
# CONFIG_BACKLIGHT_APPLE is not set
# CONFIG_BACKLIGHT_PM8941_WLED is not set
# CONFIG_BACKLIGHT_SAHARA is not set
# CONFIG_BACKLIGHT_ADP8860 is not set
# CONFIG_BACKLIGHT_ADP8870 is not set
# CONFIG_BACKLIGHT_LM3639 is not set
# CONFIG_BACKLIGHT_LV5207LP is not set
# CONFIG_BACKLIGHT_BD6107 is not set
# CONFIG_BACKLIGHT_ARCXCNN is not set
# CONFIG_VGASTATE is not set
CONFIG_HDMI=y

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_VGACON_SOFT_SCROLLBACK=y
CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
# CONFIG_VGACON_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_DUMMY_CONSOLE_COLUMNS=80
CONFIG_DUMMY_CONSOLE_ROWS=25


----------

EDIT:

The conclusions are:

1. There is no VGA/text console in UEFI mode only in BIOS or legacy boot.

2. To have working consoles in UEFI mode, these are the kernel options for KMS drivers and EFI framebuffer.
Example is for Radeon as loadable module, it should work as built-in module too.

2.1. DRM as built-in module
Code:

Graphics support
 ----- ATI Radeon (DRM_RADEON) [m]
|____ Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) (DRM) [y]
       ----- Enable legacy fbdev support for your modesetting driver (DRM_FBDEV_EMULATION) [y]
|____ Frame buffer Devices
       ----- EFI-based Framebuffer Support (FB_EFI) [y]


2.2 DRM as loadable module
Code:

Graphics support
 ----- ATI Radeon (DRM_RADEON) [m]
|____ Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) (DRM) [m]
       ----- Enable legacy fbdev support for your modesetting driver (DRM_FBDEV_EMULATION) [y]
|____ Frame buffer Devices
       ----- EFI-based Framebuffer Support (FB_EFI) [y]
      |____ Support for frame buffer devices (FB) [y]
|____ Console display driver support
       ----- Framebuffer Console support (FRAMEBUFFER_CONSOLE) [y]


Last edited by sebaro on Wed Jul 26, 2017 3:38 pm; edited 4 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54030
Location: 56N 3W

PostPosted: Mon Jul 24, 2017 9:51 am    Post subject: Reply with quote

sebaro,

That looks like it should get you the old 80x25 text console.
Put dmesg onto a pastebin site so we can see what actually happens at startup.
It will not fit into a post.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sebaro
Veteran
Veteran


Joined: 03 Jul 2006
Posts: 1141
Location: Romania

PostPosted: Mon Jul 24, 2017 10:19 am    Post subject: Reply with quote

https://pastebin.com/raw/Fv9uAgru

Code:

[    0.000000] Console: colour dummy device 80x25
[    0.000000] console [tty0] enabled


But I don't see anything on the display.
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 595
Location: Italia

PostPosted: Mon Jul 24, 2017 10:23 am    Post subject: Reply with quote

See

https://forums.gentoo.org/viewtopic-t-1062760-highlight-.html

I think that you need framebuffer console support

Quote:
- Device Drivers
- Graphic Support
- Console display driver support
* Framebuffer Console Support
Back to top
View user's profile Send private message
sebaro
Veteran
Veteran


Joined: 03 Jul 2006
Posts: 1141
Location: Romania

PostPosted: Mon Jul 24, 2017 10:59 am    Post subject: Reply with quote

Maxxx wrote:
See

https://forums.gentoo.org/viewtopic-t-1062760-highlight-.html

I think that you need framebuffer console support


That's for graphical/framebuffer, I want the old text/vga console.

Code:

VGA text console (VGA_CONSOLE)

CONFIG_VGA_CONSOLE:

Saying Y here will allow you to use Linux in text mode through a
display that complies with the generic VGA standard. Virtually
everyone wants that.
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 595
Location: Italia

PostPosted: Mon Jul 24, 2017 11:04 am    Post subject: Reply with quote

But since i enabled framefuffer i have text console, with framebuffer disabled i haven't it.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54030
Location: 56N 3W

PostPosted: Mon Jul 24, 2017 11:07 am    Post subject: Reply with quote

sebaro,

You could try turning off
Code:
CONFIG_DUMMY_CONSOLE=y

What this will do depends on how your graphics card works.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sebaro
Veteran
Veteran


Joined: 03 Jul 2006
Posts: 1141
Location: Romania

PostPosted: Mon Jul 24, 2017 11:42 am    Post subject: Reply with quote

NeddySeagoon wrote:
sebaro,

You could try turning off
Code:
CONFIG_DUMMY_CONSOLE=y

What this will do depends on how your graphics card works.


I can't disable it from "make config", is it safe to disable it in the config file?

Maxxx wrote:
But since i enabled framefuffer i have text console, with framebuffer disabled i haven't it.


Framebuffer is for displaying boot images/splashes.
The boot process is very fast for me so I don't need these, I just need to be able to login.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54030
Location: 56N 3W

PostPosted: Mon Jul 24, 2017 11:58 am    Post subject: Reply with quote

sebaro,

You must never edit the .config by hand.
menuconfig and friends know all the dependencies and hidden symbols.
One menuconfig entry may change many options in the .config file.

Code:
 Symbol: DUMMY_CONSOLE [=y]                                                                                                                        │ 
  │ Type  : boolean                                                                                                                                   │ 
  │   Defined at drivers/video/console/Kconfig:94                                                                                                     │ 
  │   Depends on: HAS_IOMEM [=y] && VT [=y] && (!VGA_CONSOLE [=y] || SGI_NEWPORT_CONSOLE [=n]!=y)


So DUMMY_CONSOLE is a hidden symbol which is set on when the Depends on: evaluates to true.
For AMD/Intel systems, it requires !VGA_CONSOLE ... don't do that.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sebaro
Veteran
Veteran


Joined: 03 Jul 2006
Posts: 1141
Location: Romania

PostPosted: Mon Jul 24, 2017 12:30 pm    Post subject: Reply with quote

I see when booting:
Quote:
error: no suitable video mode found.
Booting in blind mode

Is there some option to set in grub?
The consoles are working, they respond to keybord but are not visible.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54030
Location: 56N 3W

PostPosted: Mon Jul 24, 2017 2:13 pm    Post subject: Reply with quote

sebaro,

Put vga=ask on the kernel command line. The boot process will show you a list of vga modes that it knows.
You then enter the number of the mode you want.

From memory, the numbers are 0x100 in error. A long time ago, I used to use vga=0x317

You can edit grubs kernel command line at boot time. When the menu appears, press 'e'.
This only changes the in memory copy.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Mon Jul 24, 2017 2:47 pm    Post subject: Reply with quote

NeddySeagoon wrote:
From memory, the numbers are 0x100 in error. A long time ago, I used to use vga=0x317

http://kernel.org/doc/Documentation/svga.txt
Back to top
View user's profile Send private message
sebaro
Veteran
Veteran


Joined: 03 Jul 2006
Posts: 1141
Location: Romania

PostPosted: Mon Jul 24, 2017 3:28 pm    Post subject: Reply with quote

I've tried different values for vga, all seems to be ignored.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54030
Location: 56N 3W

PostPosted: Mon Jul 24, 2017 3:34 pm    Post subject: Reply with quote

sebaro,

Did vga=ask give a list?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sebaro
Veteran
Veteran


Joined: 03 Jul 2006
Posts: 1141
Location: Romania

PostPosted: Mon Jul 24, 2017 3:54 pm    Post subject: Reply with quote

NeddySeagoon wrote:
sebaro,

Did vga=ask give a list?


No, it just boots. This is the command line:

Code:

[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.12.3-gentoo-b1 root=/dev/sda2 rootfstype=ext4 init=/usr/lib/systemd/systemd ro vga=ask libata.force=noncq
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.12.3-gentoo-b1 root=/dev/sda2 rootfstype=ext4 init=/usr/lib/systemd/systemd ro vga=ask libata.force=noncq
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54030
Location: 56N 3W

PostPosted: Mon Jul 24, 2017 5:08 pm    Post subject: Reply with quote

sebaro,

That command line is correct.

Lets step back a little. You want to have a plain VGA console with no framebuffer because you perceive it will solve a problem.
Maybe there is another solution, share the problem you want to solve.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sebaro
Veteran
Veteran


Joined: 03 Jul 2006
Posts: 1141
Location: Romania

PostPosted: Mon Jul 24, 2017 5:31 pm    Post subject: Reply with quote

I want to replace systemd with runit/sysvinit/openrc. I want to be able to see the kernel and init messages and to be able to see the login prompt. I changed the init in kernel command line and I thought it didn't work because there was no output, but was the issue with the console not showing. I don't need the framebuffer console because the boot is fast but I guess I'll have to build another kernel with fb enabled just for testing.
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 455

PostPosted: Mon Jul 24, 2017 6:50 pm    Post subject: Reply with quote

try set gfxpayload=text
or set gfxpayload=auto in grub.conf

( if doesnt work u can try disable X86_SYSFB in kernel)
_________________
Sent from Windows
Back to top
View user's profile Send private message
sebaro
Veteran
Veteran


Joined: 03 Jul 2006
Posts: 1141
Location: Romania

PostPosted: Tue Jul 25, 2017 6:29 am    Post subject: Reply with quote

mir3x wrote:
try set gfxpayload=text
or set gfxpayload=auto in grub.conf

( if doesnt work u can try disable X86_SYSFB in kernel)


Tried with both auto and text, here are the grub default and grub menu entry:

Code:

GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=3
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""
GRUB_GFXPAYLOAD_LINUX=text
GRUB_COLOR_NORMAL="white/black"
GRUB_COLOR_HIGHLIGHT="magenta/black"


Code:

menuentry 'Gentoo GNU/Linux' {
   savedefault
   insmod gzio
   insmod part_gpt
   insmod ext2
   set root='hd0,gpt2'
   echo   'Loading Linux 4.12.3-gentoo-b1 ...'
   linux   /boot/vmlinuz-4.12.3-gentoo-b1 root=/dev/sda2 rootfstype=ext4 init=/usr/lib/systemd/systemd ro quiet libata.force=noncq
}


Code:

# CONFIG_X86_SYSFB is not set
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 311

PostPosted: Tue Jul 25, 2017 9:44 am    Post subject: Reply with quote

You use the EFI boot, EFI firmware provided an GOP service and Console TextOutput service, these service can't access after kernel loading, except DIRECT WRITE the framebuffer. In order to use VGA text console, you should boot in legacy mode.
Back to top
View user's profile Send private message
sebaro
Veteran
Veteran


Joined: 03 Jul 2006
Posts: 1141
Location: Romania

PostPosted: Tue Jul 25, 2017 11:05 am    Post subject: Reply with quote

s4e8 wrote:
You use the EFI boot, EFI firmware provided an GOP service and Console TextOutput service, these service can't access after kernel loading, except DIRECT WRITE the framebuffer. In order to use VGA text console, you should boot in legacy mode.


OK, so I have two choices:
1 BIOS/Legacy booting
2 UEFI booting + frame buffer support

For choice 2, which frame buffer driver to install?
- generic: vesa/uvesa
- efi
- radeon
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Tue Jul 25, 2017 2:05 pm    Post subject: Reply with quote

For framebuffer console, enable CONFIG_FRAMEBUFFER_CONSOLE (if it is a module, make sure that it gets loaded during boot).

For the drivers enabling the framebuffer you have the following options:
  1. radeon driver + Kabini firmware
    Code:
    CONFIG_DRM_RADEON=y

  2. amdgpu driver + Kabini firmware
    Code:
    CONFIG_DRM_AMDGPU=y
    CONFIG_DRM_AMDGPU_CIK=y

  3. efifb
    Code:
    CONFIG_FB_EFI=y

  4. simplefb
    Code:
    CONFIG_FB_SIMPLE=y
    CONFIG_X86_SYSFB=y

If you choose one method, best disable the others.
Back to top
View user's profile Send private message
sebaro
Veteran
Veteran


Joined: 03 Jul 2006
Posts: 1141
Location: Romania

PostPosted: Tue Jul 25, 2017 3:56 pm    Post subject: Reply with quote

chithanh wrote:
For framebuffer console, enable CONFIG_FRAMEBUFFER_CONSOLE (if it is a module, make sure that it gets loaded during boot).


Code:

Frame buffer Devices
-> Support for frame buffer devices (FB)
----> ATI Radeon display support (FB_RADEON)

Console display driver support
-> Framebuffer Console support (FRAMEBUFFER_CONSOLE)


I assume FB and FRAMEBUFFER_CONSOLE must be built-in, if I build them as modules I'll have to use initramfs.
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Tue Jul 25, 2017 7:31 pm    Post subject: Reply with quote

Do not enable radeonfb (CONFIG_FB_RADEON), it is the legacy radeon framebuffer which will do nothing at best, and prevent X from working properly at worst.
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Wed Jul 26, 2017 3:01 am    Post subject: Reply with quote

You can disable the framebuffer in your bootloader configuration by passing "vga=0" to the kernel.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum