tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Issues with intelfb(4) and USB keyboards
On Sat, 19 Dec 2020, Brian Buhrow wrote:
When the machine boots, the BIOS sets up the display as it should
and the VGA port works.
...
If it helps, I can log in without the screen on the console and I
get a window of 64 lines X 160 characters.
That seems like a lot of text on a VGA screen.
The default font is 8x16 (WxH). So, on an 1280x1024 pixel display you
will have 64x160 chars.
...
[ 7.144810] intelfb0 at i915drmkms0
[ 7.144810] intelfb0: framebuffer at 0xffff848139e34000, size 1280x1024, depth 32, stride 5120
[ 8.254809] wsdisplay0 at intelfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0
[ 8.265725] wsmux1: connecting to wsdisplay0
[ 8.265725] wskbd1: connecting to wsdisplay0
I wonder how BIOS/intelfb configured a 1280x1024x32 display without an
EDID. Might be a DRM-driver issue as mrg@ hinted. Let's look at your
EDID.
1. Get the edid-decode sources from https://git.linuxtv.org/edid-decode.git/
and compile it. It compiles cleanly on NetBSD.
2. Compile the program below, and run it like this:
./wsedid | edid-decode > /tmp/edid.txt
If the EDID and checksum look OK, then the DRMKMS driver will need
looking into. (And, in the interim, a program to set the correct
timings using libdrm may need to be written.--if you're not happy
with genfb.)
If they don't look OK, then unplug the CRT and try again. My old
ViewSonic LCD monitor has a "soft" off-button, and switching the LCD
off using that does no good when it's misbehaving.
Makefile:
=========
CC ?= gcc
CFLAGS ?= -Wall -pedantic -g
LDFLAGS ?=
EXE = wsedid
SRC = ${EXE}.c
${EXE}: ${SRC}
${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${SRC}
clean:
rm -f ${EXE}
wsedid.c:
=========
/**
* wsedid.c: Print NetBSD/OpenBSD EDID info. using wsdisplay(4).
*/
#include <dev/wscons/wsconsio.h>
#include <sys/ioctl.h>
#include <sys/utsname.h>
#include <err.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(int argc, char* argv[])
{
struct utsname un;
struct wsdisplayio_edid_info ei;
char ebuf[4096];
char* dev, *os;
int fd, rc = EXIT_FAILURE;
if ((uname(&un)) < 0)
err(rc, "uname failed");
os = un.sysname;
if (argc == 2)
dev = argv[1];
else {
if (strcmp(os, "NetBSD") == 0)
dev = "/dev/ttyE0";
else if (strcmp(os, "OpenBSD") == 0)
dev = "/dev/ttyC0";
else
errx(rc, "%s: OS is not supported", os);
}
ei.edid_data = ebuf;
ei.buffer_size = sizeof ebuf;
if ((fd = open(dev, O_RDONLY)) < 0)
err(rc, "%s: open failed", dev);
if (ioctl(fd, WSDISPLAYIO_GET_EDID, &ei) < 0)
err(rc, "ioctl(WSDISPLAYIO_GET_EDID) failed");
fprintf(stderr, "%s EDID data_size = %u\n", dev, ei.data_size);
fwrite(ebuf, 1, ei.data_size, stdout);
rc = EXIT_SUCCESS;
return rc;
}
=====
-RVP
Home |
Main Index |
Thread Index |
Old Index