2

I'm running Linux (Debian 10) on a Chromebook (Eve) using a stock Chrome OS kernel (4.4.x) with minor modifications. Everything runs (mostly) fine except that TTY console cannot be accessed via Ctrl+Alt+Fn, which does switch framebuffers as intended (i.e. Ctrl+F1 switches to DM and Crtl+F2 switches to desktop), but there doesn't seem to be any framebuffer for TTY emulation to display on (the screen just freezes upon Ctrl+F3 but desktop can be recovered just by Crtl+F2). Given that no log is displayed at boot, I'm guessing it's a kernel configuration issue. Relevant driver options related to TTY, console, and framebuffer are already enabled in the kernel configuration, and tty devices are listed in /dev. I tried compiling the Chrome OS kernel using stock Debian 10 configurations (for what overlap and default configuration for those that don't) and the TTY console did become available (but obviously a bunch of other things didn't work), so it isn't something that was written out of the Chrome OS kernel.

I compared the stock configurations between Eve and Debian and noted where different options are chosen on the same configuration items (there are 532 of these) and noted the following differences:

CONFIG_ITEM                         Debian      Eve
CONFIG_AGP_AMD64                    y           is not set
CONFIG_AGP_SIS                      y           is not set
CONFIG_AGP_VIA                      y           is not set
CONFIG_VGA_SWITCHEROO               y           is not set
CONFIG_DRM_FBDEV_EMULATION          y           is not set
CONFIG_DRM_LOAD_EDID_FIRMWARE       y           is not set
CONFIG_DRM_DP_CEC                   y           is not set
CONFIG_DRM_VGEM                     is not set  y
CONFIG_DRM_UDL                      is not set  y
CONFIG_DRM_CIRRUS_QEMU              is not set  m
CONFIG_FIRMWARE_EDID                y           is not set
CONFIG_FB_BOOT_VESA_SUPPORT         y           is not set
CONFIG_FB_CFB_FILLRECT              y           is not set
CONFIG_FB_CFB_COPYAREA              y           is not set
CONFIG_FB_CFB_IMAGEBLIT             y           is not set
CONFIG_FB_SYS_FILLRECT              y           is not set
CONFIG_FB_SYS_COPYAREA              y           is not set
CONFIG_FB_SYS_IMAGEBLIT             y           is not set
CONFIG_FB_SYS_FOPS                  y           is not set
CONFIG_FB_TILEBLITTING              y           is not set
CONFIG_FB_VESA                      y           is not set
CONFIG_FB_EFI                       y           is not set
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION y           is not set

But nothing changes after I compiled the kernel with these setting copied from Debian to the stock Eve configuration. Something else is amiss, and help is appreciated.

2
  • I don't have a chromebook to check -- maybe the virtual consoles are not configured at all, similarly to android phones and other embedded linux systems. But maybe it's just the init system which isn't spawning a shell on them. Would openvt -fc 12 (as root) followed by Ctrl-Alt-F12 do anything, like showing you a prompt?
    – user313992
    Jan 27, 2021 at 11:22
  • @user414777 same thing, the screen freezes, but recoverable via <Ctrl><Alt>F2.
    – seamux
    Feb 1, 2021 at 9:05

2 Answers 2

2

According to Chromebook developer documentation, the Eve is Intel x86_64 Kabylake-Y hardware. So it probably uses the i915 display driver, which uses kernel modesetting.

I'm not quite sure which firmware is used in Chromebooks; if it uses Coreboot, the display hardware might remain completely uninitialized until the i915 driver takes control of it. If it uses UEFI, you will probably need CONFIG_FB_EFI for early boot messages.

From the help text of the CONFIG_DRM_FBDEV_EMULATION kernel configuration option (emphasis mine):

CONFIG_DRM_FBDEV_EMULATION:

Choose this option if you have a need for the legacy fbdev support. Note that this support also provides the linux console support on top of your modesetting driver.

If in doubt, say "Y".

Also check the CONFIG_FRAMEBUFFER_CONSOLE option; it's definitely necessary too.

If the drivers are in order, you would also need to have the [email protected] starting automatically for Ctrl+Alt+F3. Normally systemd will do this automatically if /dev/tty0 exists (i.e. the kernel virtual console subsystem has successfully activated - it is actually optional, which may surprise people used to x86 PC hardware) and no other system is taking over the /dev/tty[1-6] devices.

I suspect your problem might be that you don't have CONFIG_DRM_FBDEV_EMULATION, so there will be no /dev/tty0 and so the getty processes for the text console(s) won't get launched by systemd.

Since Chromebook apparently has no PC-style BIOS, there will be no VGA text console either, and so CONFIG_VGA_CONSOLE will do absolutely nothing.

4
  • Do chromebooks use systemd?
    – user313992
    Jan 27, 2021 at 11:18
  • The original poster said he's using Debian 10 on a Chromebook, and Debian 10 uses systemd by default.
    – telcoM
    Jan 27, 2021 at 11:26
  • Thanks, missed it ;-)
    – user313992
    Jan 27, 2021 at 11:26
  • @telcoM Thanks! Still haven't gotten this figured out yet, and I'm pretty sure I checked everything pertaining to console, TTY, and framebuffer... however, this may not be a kernel configuration problem at all, as when I tried the same kernel on Ubuntu, the opposite thing happened: DM failed to launch, but I was able to access TTY.
    – seamux
    Feb 1, 2021 at 9:08
0

After noticing that /dev/fb0 didn't exist despite having loaded fbcon and a framebuffer device module, I figured it out:

  1. Build i915 as a loadable module instead of built-in and make sure that legacy fbdev support is enabled. (Building it as a loadable module is perhaps not necessary, I only did it to ensure I could blacklist/unload i915, but the key is to select legacy fbdev support.)
  2. Enable framebuffer console (fbcon) and build it as a module.
  3. Ensure that tty is also enabled.
  4. Edit /src/kernel/drivers/gpu/drm/i915/i915_drv.c and remove or comment out all if loops that refer to conflicting framebuffer modules (just search for "conflict", on 4.4.250-R89 kernel source there are 3 of these loops), otherwise you might encounter an error during make. Apparently the i915 driver for ChromeOS doesn't want you to have a framebuffer console.
  5. Build kernel and modules. Install to Linux.
  6. Add fbcon to /etc/initramfs-tools/modules to load them at boot (they do not load by default). Alternatively, you can load it manually when you need to use TTY emulation.
  7. Update initramfs and grub. Reboot. You should be able to see kernel boot messages and use Ctrl+Fn to access TTYn.
2
  • Could you upload and share your entire kernel .config that worked in the end? I have a similar problem with a chromium kernel for ARM. Thanks! Mar 9, 2022 at 15:22
  • @DanieleTesta Here you go! Just note that this is specific to eve hardware.
    – seamux
    Mar 10, 2022 at 2:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .