Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Talos II : Heads console output only on BMC console, not VGA #168

Closed
tlaurion opened this issue Jul 14, 2022 · 6 comments
Closed

Talos II : Heads console output only on BMC console, not VGA #168

tlaurion opened this issue Jul 14, 2022 · 6 comments
Assignees

Comments

@tlaurion
Copy link

tlaurion commented Jul 14, 2022

Version: unreleased (after 0.5. To be edited with precision upon next release)

Latest tests with unreleased version supported my single CPU! Hurray! (More testing later end of month... Other reports?)

Current issue now is to have Heads payload output to vga console, which seems to miss either AST+DRM in kernel config and/or proper skiboot passed arguments.

Off-channel notes:

Originally posted by @tlaurion in #80 (comment)

@SergiiDmytruk
Copy link
Member

This is more complicated than it seems.

Used petitboot’s config for reference as it appears on VGA console. After enabling more drivers VGA somewhat works, but it doesn't always show up. usb-init enables VGA console when it's off. This dependency is at least partially explained by:

[   27.662570] input: OpenBMC virtual_input as /devices/pci0003:00/0003:00:00.0/0003:01:00.0/usb1/1-3/1-3.1/1-3.1:1.0/0003:1D6B:0104.0001/input/input0
[   27.733295] hid-generic 0003:1D6B:0104.0001: input: USB HID v1.01 Keyboard [OpenBMC virtual_input] on usb-0003:01:00.0-3.1/input0
[   27.751772] input: OpenBMC virtual_input as /devices/pci0003:00/0003:00:00.0/0003:01:00.0/usb1/1-3/1-3.1/1-3.1:1.1/0003:1D6B:0104.0002/input/input1
[   27.769055] hid-generic 0003:1D6B:0104.0002: input: USB HID v1.01 Mouse [OpenBMC virtual_input] on usb-0003:01:00.0-3.1/input1

The second console is separate from the text one (hvc0 is text and VGA is tty0 and tty1). When petitboot is in use, text and VGA consoles run two independent instances of petitboot. Likely need to do the same for Heads in init scripts.

usb-init followed by setsid gui-init > /dev/tty0 2>&1 < /dev/tty0 & seems to work, but ignores keyboard sometimes. Bash run like this complains that it can't access tty, which might explain input issues.

Here's WIP image zImage.bundled.gz, but there is still things to do:

  • why console doesn't always work
  • why input isn't always processed after USB is on
  • modify init scripts to always load USB modules (in the right order, currently kernel prints warnings about it, but it's an old Heads revision) and start on multiple consoles

@tlaurion
Copy link
Author

tlaurion commented Jul 21, 2022

Some quick notes on Heads.

If USB keyboard is needed, it needs to be defined under board config otherwise HID kernel module should not be loaded.
HID is desired as module and not to be build in kernel

linuxboot/heads#1145

@krystian-hebel
Copy link

Is it possible that similar issue is present on other platforms but no one notices, as they have real USB keyboard connected and HID driver is always loaded?

@tlaurion
Copy link
Author

@krystian-hebel all ps2 offering platforms removed USB HID in past Heads PR.

Not so relevant here since Talos II doesn't offer ps2 ports for keyboard and mouse, only USB.

But for platforms offering ps2 connectivity, HID should be optional and declared as such in separate usb-keyboard board option (important for Qubes sys-usb creation with exclusive access on that seperate controller).

Sorry, brain slow today.

@SergiiDmytruk
Copy link
Member

SergiiDmytruk commented Jul 22, 2022

Seems to work now, at least screen and input is initialized every time in latest tests. Changes are in three new commits in linuxboot/heads#1002. Mind that the PR has an old base and building USB_HID as a module won't work there.

New image: zImage.bundled.gz

Used agetty from linux-utils to setup a proper terminal session, but there also seems to be getty in busybox, haven't tried it.

@macpijan
Copy link
Contributor

macpijan commented Jul 27, 2022

I can confirm the VGA output works in the OpenBMC KVM with the updated heads. See attached screenshot:

kvm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants