Re: Issues with intelfb(4) and USB keyboards

2020-12-23 Thread RVP

On Tue, 22 Dec 2020, Brian Buhrow wrote:


hello.  My apologies for such a naive question, but what driver
should I use for the keyboard? The default, as created by X
-configure, is "kbd"


"kbd" is correct. There is no wskbd_drv.so in /usr/X11R7/lib/modules/drivers/
Actually, there should be no need to configure this. My /etc/X11/xorg.conf.d/
only has a intel.conf--which you already have.


In any case, the keyboard doesn't appear to work when X is running,
though it works fine, using a USB keyboard and the wskbd driver
when I'm using the console.


Odd. Is wscons=YES and wsmoused=NO in /etc/rc.conf?


Re: Issues with intelfb(4) and USB keyboards

2020-12-23 Thread RVP

On Tue, 22 Dec 2020, Mouse wrote:


There's a work machine which according to RandR has seven outputs: DP1,
DP2, DP3, HDMI1, HDMI2, HDMI3, and VIRTUAL1.  VIRTUAL1 is, I believe,
well, virtual.  But, in terms of the connectors actually present on the
case, there are two HDMI and one VGA.  When the VGA is connected, one
of the DPx outputs shows connected (I forget offhand which one).

I don't _know_ that DP stands for DisplayPort, but it seems likely.

So perhaps VGA looks like DP to software often enough?


On my Asus X202E laptop everything is correctly identified except for a
non-existent DP1 output. It has only 3 physical outputs: LVDS, VGA, HDMI.

-RVP


Re: Issues with intelfb(4) and USB keyboards

2020-12-22 Thread RVP

On Tue, 22 Dec 2020, Brian Buhrow wrote:


While I don't remember the exact numbers for this monitor, they
look reasonable and, there is a dotclock value in there.


Forgot to mention this: You can use cvt(1) or gtf(1) to generate
modelines.

-RVP


Re: Issues with intelfb(4) and USB keyboards

2020-12-22 Thread Michael van Elst
buh...@nfbcal.org (Brian Buhrow) writes:

>The default, as created by X -configure, is "kbd"

"kbd" is fine, it corresponds to

/usr/X11R7/lib/modules/drivers/kbd_drv.so

-- 
-- 
Michael van Elst
Internet: mlel...@serpens.de
"A potential Snark may lurk in every tree."


Re: Issues with intelfb(4) and USB keyboards

2020-12-22 Thread RVP

On Tue, 22 Dec 2020, Brian Buhrow wrote:


hello.  Below is the output of edid-decode against the data I
extracted using your wsedid program.


So, a valid EDID is present after all. This begins to look like
a DRMKMS issue. I'll try to look into this, but, we will need
a kernel guru for this sooner or later.

Try:

1. genfb/wsfb.

2. Since you have EDID and modelines, try running X blind with
   the "intel" display driver. This config fragment alone usually
   suffices:

   $ cat /etc/X11/xorg.conf.d/intel.conf
   Section "Device"
   Identifier  "Card0"
   Driver  "intel"
   # Option  "AccelMethod" "UXA"
   Option  "TearFree""on"
   Option  "VSync"   "on"
   Option  "PageFlip""on"
   Option  "SwapbuffersWait"   "on"
   Option  "TripleBuffer"  "on"
   Option  "LinearFramebuffer" "on"
   EndSection
   $

   Explicitly supply a modeline and a full config file if the "intel"
   X driver fails to read the EDID.

   Run a compositor if you have visual glitches:
   https://wiki.netbsd.org/laptops/

3. Output of this command:

   $ sysctl machdep.dmi

4. Compile a new GENERIC kernel with `.load_detect_test = 1'
   (file: /usr/src/sys/external/bsd/drm2/dist/drm/i915/i915_params.c)


-RVP


Re: Issues with intelfb(4) and USB keyboards

2020-12-22 Thread Brian Buhrow
hello.  My apologies for such a naive question, but what driver should 
I use for the keyboard?  
The default, as created by X -configure, is "kbd"
I'm thinking it should be "wskbd".  Is that correct?
In any case, the keyboard doesn't appear to work when X is running, though it 
works fine, using a USB keyboard and the wskbd driver when I'm using the
console.

I'll try the xorg.conf section you suggest and, if that doesn't work, i'll try 
the genfb driver.

I'm hoping it's an easy fix for the i915drmkms driver, soon.
Again, thanks for the help.
-Brian



Re: Issues with intelfb(4) and USB keyboards

2020-12-22 Thread Mouse
> The only thing that looks odd is that it says the monitor is attached
> to the displayport, which is incorrect.  It's attached to the 15-pin
> VGA port.

There's a work machine which according to RandR has seven outputs: DP1,
DP2, DP3, HDMI1, HDMI2, HDMI3, and VIRTUAL1.  VIRTUAL1 is, I believe,
well, virtual.  But, in terms of the connectors actually present on the
case, there are two HDMI and one VGA.  When the VGA is connected, one
of the DPx outputs shows connected (I forget offhand which one).

I don't _know_ that DP stands for DisplayPort, but it seems likely.

So perhaps VGA looks like DP to software often enough?

/~\ The ASCII Mouse
\ / Ribbon Campaign
 X  Against HTMLmo...@rodents-montreal.org
/ \ Email!   7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Re: Issues with intelfb(4) and USB keyboards

2020-12-22 Thread Brian Buhrow
hello.  Below is the output of edid-decode against the data I extracted 
using your wsedid program.  While I don't remember the exact numbers for this
monitor, they look reasonable and, there is a dotclock value in there.  The 
only thing that looks odd is that it says the monitor is attached to the
displayport, which is incorrect.  It's attached to the 15-pin VGA port.  
Perhaps that's normal, I'm not familiar with this graphics adapter.  Anyway, 
what
do you think?
And, yes, this monitor was really made in the year 2000.
-thanks
-Brian


edid-decode (hex):

00 ff ff ff ff ff ff 00 4d d9 90 03 d1 24 7b 00
2a 0a 01 04 a5 25 1b 96 e3 0c c9 a0 57 47 9b 27
12 48 4c ff ff 80 c2 80 a9 4f 81 59 81 4f 71 59
61 59 45 59 31 59 86 3d 00 c0 51 00 30 40 40 a0
13 00 60 08 11 00 00 1e 00 00 00 fd 00 30 78 1e
60 1e 00 0a 20 20 20 20 20 20 00 00 00 fc 00 53
4f 4e 59 20 43 50 44 2d 45 34 30 30 00 00 00 ff
00 38 30 37 30 33 35 33 0a 20 20 20 20 20 00 8f



Block 0, Base EDID:
  EDID Structure Version & Revision: 1.4
  Vendor & Product Identification:
Manufacturer: SNY
Model: 912
Serial Number: 8070353
Made in: week 42 of 2000
  Basic Display Parameters & Features:
Digital display
Bits per primary color channel: 8
DisplayPort interface
Maximum image size: 37 cm x 27 cm
Gamma: 2.50
DPMS levels: Standby Suspend Off
Supported color formats: RGB 4:4:4
First detailed timing includes the native pixel format and preferred 
refresh rate
Display is continuous frequency
  Color Characteristics:
Red  : 0.6250, 0.3398
Green: 0.2802, 0.6054
Blue : 0.1552, 0.0703
White: 0.2832, 0.2978
  Established Timings I & II:
IBM :   720x40070.082 Hz   9:531.467 kHz  28.320 MHz
IBM :   720x40087.850 Hz   9:539.444 kHz  35.500 MHz
DMT 0x04:   640x48059.940 Hz   4:331.469 kHz  25.175 MHz
Apple   :   640x48066.667 Hz   4:335.000 kHz  30.240 MHz
DMT 0x05:   640x48072.809 Hz   4:337.861 kHz  31.500 MHz
DMT 0x06:   640x48075.000 Hz   4:337.500 kHz  31.500 MHz
DMT 0x08:   800x60056.250 Hz   4:335.156 kHz  36.000 MHz
DMT 0x09:   800x60060.317 Hz   4:337.879 kHz  40.000 MHz
DMT 0x0a:   800x60072.188 Hz   4:348.077 kHz  50.000 MHz
DMT 0x0b:   800x60075.000 Hz   4:346.875 kHz  49.500 MHz
Apple   :   832x62474.551 Hz   4:349.726 kHz  57.284 MHz
DMT 0x0f:  1024x768i   86.958 Hz   4:335.522 kHz  44.900 MHz
DMT 0x10:  1024x76860.004 Hz   4:348.363 kHz  65.000 MHz
DMT 0x11:  1024x76870.069 Hz   4:356.476 kHz  75.000 MHz
DMT 0x12:  1024x76875.029 Hz   4:360.023 kHz  78.750 MHz
DMT 0x24:  1280x1024   75.025 Hz   5:479.976 kHz 135.000 MHz
Apple   :  1152x87075.062 Hz 192:145  68.681 kHz 100.000 MHz
  Standard Timings:
CVT :  1800x1440   59.911 Hz   5:489.447 kHz 218.250 MHz (EDID 1.4 
source)
GTF :  1800x1440   60.000 Hz   5:489.400 kHz 219.566 MHz (EDID 1.3 
source)
DMT 0x36:  1600x1200   75.000 Hz   4:393.750 kHz 202.500 MHz
DMT 0x21:  1280x96085.002 Hz   4:385.938 kHz 148.500 MHz
CVT :  1280x96074.857 Hz   4:375.231 kHz 130.000 MHz (EDID 1.4 
source)
GTF :  1280x96075.000 Hz   4:375.150 kHz 129.859 MHz (EDID 1.3 
source)
CVT :  1152x86484.790 Hz   4:377.159 kHz 119.750 MHz (EDID 1.4 
source)
GTF :  1152x86485.000 Hz   4:377.095 kHz 119.651 MHz (EDID 1.3 
source)
DMT 0x13:  1024x76884.997 Hz   4:368.677 kHz  94.500 MHz
DMT 0x0c:   800x60085.061 Hz   4:353.674 kHz  56.250 MHz
DMT 0x07:   640x48085.008 Hz   4:343.269 kHz  36.000 MHz
  Detailed Timing Descriptors:
DTD 1:  1280x1024   85.024 Hz   5:491.146 kHz 157.500 MHz (352 mm x 264 
mm)
 Hfront   64 Hsync 160 Hback 224 Hpol P
 Vfront1 Vsync   3 Vback  44 Vpol P
  Display Range Limits:
Monitor ranges (GTF): 48-120 Hz V, 30-96 kHz H, max dotclock 300 MHz
Display Product Name: 'SONY CPD-E400'
Display Product Serial Number: '8070353'
Checksum: 0x8f


Re: Issues with intelfb(4) and USB keyboards

2020-12-22 Thread RVP

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 0x848139e34000, 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 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

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()) < 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, ) < 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


Re: Issues with intelfb(4) and USB keyboards

2020-12-22 Thread Brian Buhrow
hello.  Thanks for the help.  I'll follow your instructions and report 
back.
-Brian




Re: Issues with intelfb(4) and USB keyboards

2020-12-22 Thread RVP

On Mon, 21 Dec 2020, Brian Buhrow wrote:


Yes, I have a very old monitor, an old Sony Trenitron multisync.
I can probably find a dotclock value to use in this configuration,
but I don't know how to put it in the i915drmkms driver.  Can I
put in a number with sysctl?


I don't know of any sysctl for this. Nor do I know how to pass
GTF/CVT modelines to the driver like you can do for Linux. The
solution here might be to write a small program to use the DRM
ioctls to set the desired mode (like with X and xrandr). I'll
root around. In the meantime, try genfb(4) + wsfb(4):

https://www.unitedbsd.com/d/271-wfsb/6

-RVP


Re: Issues with intelfb(4) and USB keyboards

2020-12-21 Thread Brian Buhrow
hello.  Sorry for the delay in responding.  Yes, I have a very old 
monitor, an old Sony Trenitron multisync.  I can probably find a dotclock value 
to
use in this configuration, but I don't know how to put it in the i915drmkms 
driver.  Can I put in a number with sysctl?
-thanks
-Brian



Re: Issues with intelfb(4) and USB keyboards

2020-12-19 Thread RVP

On Sat, 19 Dec 2020, Mouse wrote:


Not necessarily.  At one of my jobs, we make a turnkey appliance that
typically connects to a user- (or at least dealer-)supplied monitor,
potentially with a locally-sourced cable.  We've had multiple issues in
the field with recent versions (built atop NetBSD 8.0 and 9.1) traced
to cables that don't connect the pins necessary to carry the EDID info.


Quite true. I have an old ViewSonic LCD which sometimes sends *wrong*/no
EDID data even when the (VGA) cables are OK.

-RVP



Re: Issues with intelfb(4) and USB keyboards

2020-12-19 Thread RVP

On Sat, 19 Dec 2020, Brian Buhrow wrote:


hello.  Thanks for the quick explanation.  It still doesn't work, but 
the errors are different.
Any ideas what to try next?  How does one set the dot clock?

[ 7.099124] warning: 
../../../../external/bsd/drm2/dist/drm/i915/i915_drv.c:591: 
WARN_ON(!IS_KABYLAKE(dev_priv))kern info: [drm] Memory usable by graphics 
device = 4096M
[ 7.111382] kern info: [drm] Supports vblank timestamp caching Rev 2 
(21.10.2013).
[ 7.119122] kern info: [drm] Driver supports precise vblank timestamp query.
[ 7.139122] kern info: [drm] failed to find VBIOS tables
[ 7.159122] i915drmkms0: interrupting at ioapic0 pin 16 (i915drmkms0)
[ 7.169123] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/drm_irq.c:810)drm_calc_timestamping_constants]
 *ERROR* crtc 21: Can't calculate constants, dotclock = 0!
[ 7.169123] warning: 
../../../../external/bsd/drm2/dist/drm/i915/intel_pm.c:3276: 
WARN_ON(p->pixel_rate == 0)intelfb0 at i915drmkms0
[ 7.199122] intelfb0: framebuffer at 0x8e0139e14000, size 1280x1024, 
depth 32, stride 5120
[ 8.009123] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/intel_dp.c:3797)intel_dp_link_training_clock_recovery]
 *ERROR* too many full retries, give up
[ 8.049123] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/intel_dp.c:3797)intel_dp_link_training_clock_recovery]
 *ERROR* too many full retries, give up
[ 8.079128] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/intel_dp.c:3797)intel_dp_link_training_clock_recovery]
 *ERROR* too many full retries, give up
[ 8.119123] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/intel_dp.c:3797)intel_dp_link_training_clock_recovery]
 *ERROR* too many full retries, give up
[ 8.159124] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/intel_dp.c:3797)intel_dp_link_training_clock_recovery]
 *ERROR* too many full retries, give up
[ 8.199143] kern info: [drm] RC6 on
[ 8.199143] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/intel_dp.c:3797)intel_dp_link_training_clock_recovery]
 *ERROR* too many full retries, give up
[ 8.249123] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/intel_dp.c:3797)intel_dp_link_training_clock_recovery]
 *ERROR* too many full retries, give up
[ 8.249123] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/intel_dp.c:3868)intel_dp_link_training_channel_equalization]
 *ERROR* failed to train DP, aborting


So, the firmware got loaded OK.

You shouldn't need to set the dot clocks--the CRT, unless it is a
very old one, should respond to an EDID query and supply the correct
display-timing info back to the driver. Is the monitor OK?

If it isn't a CRT issue, then I don't know how to make the DRMKMS
driver use a custom modeline.

Suggestions:

1. Try the latest -HEAD build. It may have fixes.

2. Try `genfb/wsfb'--the generic framebuffer and the X driver which
runs on top of `genfb'. Disable i915drmkms using the userconf facility:

https://mail-index.netbsd.org/tech-x11/2020/12/10/msg002183.html

-RVP


re: Issues with intelfb(4) and USB keyboards

2020-12-19 Thread matthew green
> [ 1.03] cpu0: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz, id 0x506e3
[ .. ]
> [ 7.099124] warning: 
> ../../../../external/bsd/drm2/dist/drm/i915/i915_drv.c:591: 
> WARN_ON(!IS_KABYLAKE(dev_priv))kern info: [drm] Memory usable by graphics 
> device = 4096M

this is odd.  it indicates that a skylake cpu (
https://ark.intel.com/content/www/us/en/ark/products/88184/intel-core-i5-6500-processor-6m-cache-up-to-3-60-ghz.html)
but the GPU is calling itself kabylake generation.

i wonder if there's something fixed in newer drm that
handles this situation.  might be worth looking at
the upstream code around this part now.  does it add
additional types for skylake vs kabylake?  when i
patched in the kabylake support in 2018, i had made it
mostly match the upstream version from then.


.mrg.


Re: Issues with intelfb(4) and USB keyboards

2020-12-19 Thread RVP

On Sat, 19 Dec 2020, RVP wrote:

[ 7.124810] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/i915_drv.c:636)i915_firmware_load_error_print] 
*ERROR* failed to load firmware i915/skl_dmc_ver1.bin (0)
[ 7.124810] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/i915_drv.c:651)i915_firmware_load_error_print] 
*ERROR* The driver is built-in, so to load the firmware you need to
[ 7.124810] include it either in the kernel (see CONFIG_EXTRA_FIRMWARE) 
or

[ 7.124810] in your initrd/initramfs image.
[ 7.134810] warning: 
../../../../external/bsd/drm2/dist/drm/i915/intel_pm.c:3276: 
WARN_ON(p->pixel_rate == 0)kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/intel_guc_loader.c:560)guc_fw_fetch] 
*ERROR* Failed to fetch GuC firmware from i915/skl_guc_ver4.bin (error -2)
[ 7.134810] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/i915_gem.c:5417)i915_gem_init_hw] 
*ERROR* Failed to initialize GuC, error -5 (ignored)


Looks like you need to load the GPU firmware.
Create a directory called /libdata/firmware/i915drmkms and copy the
/lib/firmware/i915/*.bin files from some Linux system into it.
Create symbolic links, if needed, from what the kernel expects
(see above) to the latest `skl_*' (Skylake) versions of the same files.


Correction: Copy the `i915' directory into `/libdata/firmware/i915drmkms'
because the firmware loader is trying to load `i915/skl_...'.

-RVP



Re: Issues with intelfb(4) and USB keyboards

2020-12-19 Thread John Franklin



On Sat, Dec 19, 2020 at 3:44 PM, RVP  wrote:

On Sat, 19 Dec 2020, Brian Buhrow wrote:

	hello.  Thanks for the quick explanation.  It still doesn't work, 
but the errors are different.

Any ideas what to try next?  How does one set the dot clock?


Suggestions:

1. Try the latest -HEAD build. It may have fixes.

2. Try `genfb/wsfb'--the generic framebuffer and the X driver which
runs on top of `genfb'. Disable i915drmkms using the userconf 
facility:


https://mail-index.netbsd.org/tech-x11/2020/12/10/msg002183.html



Another suggestion, check the Xorg.0.log for clues.  There should be 
log entries in there about reported EDID information, what display 
outputs the driver can see, and maybe something about which one it's 
choosing.


jf
--
John Franklin
frank...@elfie.org


Re: Issues with intelfb(4) and USB keyboards

2020-12-19 Thread Mouse
> You shouldn't need to set the dot clocks--the CRT, unless it is a
> very old one, should respond to an EDID query and supply the correct
> display-timing info back to the driver.

Not necessarily.  At one of my jobs, we make a turnkey appliance that
typically connects to a user- (or at least dealer-)supplied monitor,
potentially with a locally-sourced cable.  We've had multiple issues in
the field with recent versions (built atop NetBSD 8.0 and 9.1) traced
to cables that don't connect the pins necessary to carry the EDID info.

So, even if the monitor is capable of it, the host might not see EDID.

Of course, you can also squint your mind a different way and see the
problem as being the switch from the "computer generates signal, it's
the monitor's responsibility to display it" paradigm to "monitor tells
computer what kind of signal to generate, it's the computer's
responsibility to obey" paradigm.  I ran into this bigtime when trying
to connect my SS20s to flatscreens - each end thought it had control
over the details of the video timing.  (I eventually managed to get the
SS20 to generate something the flatscreen would handle, but it took
fiddling.  Yet another case of technology advancing to the point where
it becomes difficult or impossible to do what used to be easy.)

/~\ The ASCII Mouse
\ / Ribbon Campaign
 X  Against HTMLmo...@rodents-montreal.org
/ \ Email!   7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Re: Issues with intelfb(4) and USB keyboards

2020-12-19 Thread RVP

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.  when the kernel takes over, it configures
the intelfb(4) device and the screen goes black and the monitor
claims there's no signal.


The display should be mirrored after i915drmkms takes over (at least
it does on 9.99.77).


[ 7.124810] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/i915_drv.c:636)i915_firmware_load_error_print]
 *ERROR* failed to load firmware i915/skl_dmc_ver1.bin (0)
[ 7.124810] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/i915_drv.c:651)i915_firmware_load_error_print]
 *ERROR* The driver is built-in, so to load the firmware you need to
[ 7.124810] include it either in the kernel (see CONFIG_EXTRA_FIRMWARE) or
[ 7.124810] in your initrd/initramfs image.
[ 7.134810] warning: 
../../../../external/bsd/drm2/dist/drm/i915/intel_pm.c:3276: 
WARN_ON(p->pixel_rate == 0)kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/intel_guc_loader.c:560)guc_fw_fetch]
 *ERROR* Failed to fetch GuC firmware from i915/skl_guc_ver4.bin (error -2)
[ 7.134810] kern error: 
[drm:(../../../../external/bsd/drm2/dist/drm/i915/i915_gem.c:5417)i915_gem_init_hw]
 *ERROR* Failed to initialize GuC, error -5 (ignored)


Looks like you need to load the GPU firmware.
Create a directory called /libdata/firmware/i915drmkms and copy the
/lib/firmware/i915/*.bin files from some Linux system into it.
Create symbolic links, if needed, from what the kernel expects
(see above) to the latest `skl_*' (Skylake) versions of the same files.

-RVP


Re: Issues with intelfb(4) and USB keyboards

2020-12-19 Thread Brian Buhrow
hello.  Thanks for the quick explanation.  It still doesn't work, but 
the errors are different.
Any ideas what to try next?  How does one set the dot clock?
-thanks
-Brian

[ 1.00] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 
2004, 2005,
[ 1.00] 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 
2016, 2017,
[ 1.00] 2018, 2019, 2020 The NetBSD Foundation, Inc.  All rights 
reserved.
[ 1.00] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.00] The Regents of the University of California.  All rights 
reserved.

[ 1.00] NetBSD 9.1_STABLE (MIRKWOOD) #0: Wed Dec 16 23:49:40 PST 2020
[ 1.00] 
buh...@loth-9.nfbcal.org:/usr/local/netbsd/src-90/sys/arch/amd64/compile/MIRKWOOD
[ 1.00] total memory = 16088 MB
[ 1.00] avail memory = 15594 MB
[ 1.00] WARNING: module error: module `msdos' pushed by boot loader 
already exists
[ 1.00] cpu_rng: RDSEED
[ 1.00] rnd: seeded with 256 bits
[ 1.00] timecounter: Timecounters tick every 10.000 msec
[ 1.00] Kernelized RAIDframe activated
[ 1.00] running cgd selftest aes-xts-256 aes-xts-512 done
[ 1.00] timecounter: Timecounter "i8254" frequency 1193182 Hz quality 
100
[ 1.03] efi: systbl at pa dbd17018
[ 1.03] Dell Inc. OptiPlex 5050
[ 1.03] mainbus0 (root)
[ 1.03] ACPI: RSDP 0xD0ED9000 24 (v02 DELL  )
[ 1.03] ACPI: XSDT 0xD0ED90B8 F4 (v01 DELL   CBX3 
01072009 AMI  00010013)
[ 1.03] ACPI: FACP 0xD0F009F8 00010C (v05 DELL   CBX3 
01072009 AMI  00010013)
[ 1.03] ACPI: DSDT 0xD0ED9240 0277B4 (v02 DELL   CBX3 
01072009 INTL 20160422)
[ 1.03] ACPI: FACS 0xDB80DF00 40
[ 1.03] ACPI: APIC 0xD0F00B08 84 (v03 DELL   CBX3 
01072009 AMI  00010013)
[ 1.03] ACPI: FPDT 0xD0F00B90 44 (v01 DELL   CBX3 
01072009 AMI  00010013)
[ 1.03] ACPI: FIDT 0xD0F00BD8 AC (v01 DELL   CBX3 
01072009 AMI  00010013)
[ 1.03] ACPI: MCFG 0xD0F00C88 3C (v01 DELL   CBX3 
01072009 MSFT 0097)
[ 1.03] ACPI: HPET 0xD0F00CC8 38 (v01 DELL   CBX3 
01072009 AMI. 0005000B)
[ 1.03] ACPI: SSDT 0xD0F00D00 003176 (v02 SaSsdt SaSsdt   
3000 INTL 20160422)
[ 1.03] ACPI: SSDT 0xD0F03E78 0025A5 (v02 PegSsd PegSsdt  
1000 INTL 20160422)
[ 1.03] ACPI: HPET 0xD0F06420 38 (v01 INTEL  SKL  
0001 MSFT 005F)
[ 1.03] ACPI: SSDT 0xD0F06458 000DE5 (v02 INTEL  Ther_Rvp 
1000 INTL 20160422)
[ 1.03] ACPI: SSDT 0xD0F07240 0008F6 (v02 INTEL  DELL_SFF 
 INTL 20160422)
[ 1.03] ACPI: UEFI 0xD0F07B38 42 (v01 
  )
[ 1.03] ACPI: SSDT 0xD0F07B80 000EDE (v02 CpuRef CpuSsdt  
3000 INTL 20160422)
[ 1.03] ACPI: LPIT 0xD0F08A60 94 (v01 INTEL  SKL  
 MSFT 005F)
[ 1.03] ACPI: SSDT 0xD0F08AF8 000141 (v02 INTEL  HdaDsp   
 INTL 20160422)
[ 1.03] ACPI: SSDT 0xD0F08C40 00029F (v02 INTEL  sensrhub 
 INTL 20160422)
[ 1.03] ACPI: SSDT 0xD0F08EE0 003002 (v02 INTEL  PtidDevc 
1000 INTL 20160422)
[ 1.03] ACPI: SSDT 0xD0F0BEE8 00050D (v02 INTEL  TbtTypeC 
 INTL 20160422)
[ 1.03] ACPI: DBGP 0xD0F0C3F8 34 (v01 INTEL   
0002 MSFT 005F)
[ 1.03] ACPI: DBG2 0xD0F0C430 54 (v00 INTEL   
0002 MSFT 005F)
[ 1.03] ACPI: MSDM 0xD0F0C488 55 (v03 DELL   CBX3 
06222004 AMI  00010013)
[ 1.03] ACPI: SLIC 0xD0F0C4E0 000176 (v03 DELL   CBX3 
01072009 MSFT 00010013)
[ 1.03] ACPI: TCPA 0xD0F0C658 32 (v02 ALASKA NAPAASF  
 MSFT 0113)
[ 1.03] ACPI: ASF! 0xD0F0C690 A0 (v32 INTEL   HCG 
0001 TFSM 000F4240)
[ 1.03] ACPI: BGRT 0xD0F0C730 38 (v00 ??  
01072009 AMI  00010013)
[ 1.03] ACPI: DMAR 0xD0F0C768 A8 (v01 INTEL  SKL  
0001 INTL 0001)
[ 1.03] ACPI: 10 ACPI AML tables successfully acquired and loaded
[ 1.03] ioapic0 at mainbus0 apid 2: pa 0xfec0, version 0x20, 120 
pins
[ 1.03] cpu0 at mainbus0 apid 0
[ 1.03] cpu0: CPU base freq 32 Hz
[ 1.03] cpu0: CPU max freq 36 Hz
[ 1.03] cpu0: TSC freq CPUID 319200 Hz
[ 1.03] cpu0: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz, id 0x506e3
[ 1.03] cpu0: package 0, core 0, smt 0
[ 1.03] cpu1 at mainbus0 apid 2
[ 1.03] cpu1: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz, id 0x506e3
[ 1.03] cpu1: package 0, core 1, smt 0
[ 1.03] cpu2 at mainbus0 apid 4
[ 1.03] cpu2: