# noob doesn't understand graphics/audio drivers

## not_a_robot

I'm brand new to Gentoo and the kernel, followed the handbook and have read over some of the wiki but I'm still not wrapping my head around what's going on.

My problems:

1) I don't have sound.

2) I think I am running the graphics hardware with generic drivers, and I'd like to use the specific ones.

I'm not running X, and I have installed fbterm and managed to view videos on the framebuffer.

My hardware:

ASUS Z390i motherboard

i5 9600K with UHD 630 integrated graphics

I'm not sure about the sound. Mobo manual says "ROG SupremeFX S1220A". lspci says Intel Corporation Device a348

Graphics and sound are both (supposed to be) carried over HDMI

I've noticed in the output of lspci -v that the audio device has "Kernel driver in use: snd_hda_intel" while the VGA controller has no "Kernel driver in use" listing.

I have CONFIG_RM_I915=y and CONFIG_SND_HDA_I915=y

I thought i915 was a graphics driver? What is i965 and how does it relate?

Full output of lspci -v:

```
00:00.0 Host bridge: Intel Corporation Device 3ec2 (rev 0a)

   Subsystem: ASUSTeK Computer Inc. Device 8694

   Flags: bus master, fast devsel, latency 0

   Capabilities: [e0] Vendor Specific Information: Len=10 <?>

   Kernel driver in use: skl_uncore

00:02.0 VGA compatible controller: Intel Corporation Device 3e98 (prog-if 00 [VGA controller])

   Subsystem: ASUSTeK Computer Inc. Device 8694

   Flags: bus master, fast devsel, latency 0, IRQ 255

   Memory at a0000000 (64-bit, non-prefetchable) [size=16M]

   Memory at 90000000 (64-bit, prefetchable) [size=256M]

   I/O ports at 3000 [size=64]

   [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]

   Capabilities: [40] Vendor Specific Information: Len=0c <?>

   Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00

   Capabilities: [ac] MSI: Enable- Count=1/1 Maskable- 64bit-

   Capabilities: [d0] Power Management version 2

   Capabilities: [100] Process Address Space ID (PASID)

   Capabilities: [200] Address Translation Service (ATS)

   Capabilities: [300] Page Request Interface (PRI)

00:14.0 USB controller: Intel Corporation Device a36d (rev 10) (prog-if 30 [XHCI])

   Subsystem: ASUSTeK Computer Inc. Device 8694

   Flags: bus master, medium devsel, latency 0, IRQ 137

   Memory at a1220000 (64-bit, non-prefetchable) [size=64K]

   Capabilities: [70] Power Management version 2

   Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+

   Capabilities: [90] Vendor Specific Information: Len=14 <?>

   Kernel driver in use: xhci_hcd

00:14.2 RAM memory: Intel Corporation Device a36f (rev 10)

   Subsystem: ASUSTeK Computer Inc. Device 8694

   Flags: fast devsel

   Memory at a123a000 (64-bit, non-prefetchable) [disabled] [size=8K]

   Memory at a1240000 (64-bit, non-prefetchable) [disabled] [size=4K]

   Capabilities: [80] Power Management version 3

00:14.3 Network controller: Intel Corporation Device a370 (rev 10)

   Subsystem: Intel Corporation Device 0034

   Flags: bus master, fast devsel, latency 0, IRQ 16

   Memory at a1234000 (64-bit, non-prefetchable) [size=16K]

   Capabilities: [c8] Power Management version 3

   Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+

   Capabilities: [40] Express Root Complex Integrated Endpoint, MSI 00

   Capabilities: [80] MSI-X: Enable+ Count=16 Masked-

   Capabilities: [100] #00

   Capabilities: [14c] Latency Tolerance Reporting

   Capabilities: [164] Vendor Specific Information: ID=0010 Rev=0 Len=014 <?>

   Kernel driver in use: iwlwifi

00:16.0 Communication controller: Intel Corporation Device a360 (rev 10)

   Subsystem: ASUSTeK Computer Inc. Device 8694

   Flags: fast devsel, IRQ 255

   Memory at a123f000 (64-bit, non-prefetchable) [disabled] [size=4K]

   Capabilities: [50] Power Management version 3

   Capabilities: [8c] MSI: Enable- Count=1/1 Maskable- 64bit+

   Capabilities: [a4] Vendor Specific Information: Len=14 <?>

00:17.0 SATA controller: Intel Corporation Device a352 (rev 10) (prog-if 01 [AHCI 1.0])

   Subsystem: ASUSTeK Computer Inc. Device 8694

   Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 255

   Memory at a1238000 (32-bit, non-prefetchable) [size=8K]

   Memory at a123e000 (32-bit, non-prefetchable) [size=256]

   I/O ports at 3090 [size=8]

   I/O ports at 3080 [size=4]

   I/O ports at 3060 [size=32]

   Memory at a123d000 (32-bit, non-prefetchable) [size=2K]

   Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-

   Capabilities: [70] Power Management version 3

   Capabilities: [a8] SATA HBA v1.0

00:1b.0 PCI bridge: Intel Corporation Device a340 (rev f0) (prog-if 00 [Normal decode])

   Flags: bus master, fast devsel, latency 0

   Bus: primary=00, secondary=01, subordinate=01, sec-latency=0

   I/O behind bridge: 00004000-00004fff [size=4K]

   Memory behind bridge: a1300000-a14fffff [size=2M]

   Prefetchable memory behind bridge: 00000000a1500000-00000000a16fffff [size=2M]

   Capabilities: [40] Express Root Port (Slot+), MSI 00

   Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-

   Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 8694

   Capabilities: [a0] Power Management version 3

   Kernel driver in use: pcieport

00:1c.0 PCI bridge: Intel Corporation Device a338 (rev f0) (prog-if 00 [Normal decode])

   Flags: bus master, fast devsel, latency 0

   Bus: primary=00, secondary=02, subordinate=02, sec-latency=0

   I/O behind bridge: None

   Memory behind bridge: None

   Prefetchable memory behind bridge: None

   Capabilities: [40] Express Root Port (Slot-), MSI 00

   Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-

   Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 8694

   Capabilities: [a0] Power Management version 3

   Kernel driver in use: pcieport

00:1d.0 PCI bridge: Intel Corporation Device a330 (rev f0) (prog-if 00 [Normal decode])

   Flags: bus master, fast devsel, latency 0, IRQ 120

   Bus: primary=00, secondary=03, subordinate=03, sec-latency=0

   I/O behind bridge: None

   Memory behind bridge: a1100000-a11fffff [size=1M]

   Prefetchable memory behind bridge: None

   Capabilities: [40] Express Root Port (Slot+), MSI 00

   Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-

   Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 8694

   Capabilities: [a0] Power Management version 3

   Capabilities: [100] Advanced Error Reporting

   Capabilities: [140] Access Control Services

   Capabilities: [150] Precision Time Measurement

   Capabilities: [220] #19

   Capabilities: [250] Downstream Port Containment

   Kernel driver in use: pcieport

00:1f.0 ISA bridge: Intel Corporation Device a305 (rev 10)

   Subsystem: ASUSTeK Computer Inc. Device 8694

   Flags: bus master, medium devsel, latency 0

00:1f.3 Audio device: Intel Corporation Device a348 (rev 10)

   Subsystem: ASUSTeK Computer Inc. Device 8723

   Flags: bus master, fast devsel, latency 32, IRQ 138

   Memory at a1230000 (64-bit, non-prefetchable) [size=16K]

   Memory at a1000000 (64-bit, non-prefetchable) [size=1M]

   Capabilities: [50] Power Management version 3

   Capabilities: [80] Vendor Specific Information: Len=14 <?>

   Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+

   Kernel driver in use: snd_hda_intel

00:1f.4 SMBus: Intel Corporation Device a323 (rev 10)

   Subsystem: ASUSTeK Computer Inc. Device 8694

   Flags: medium devsel, IRQ 16

   Memory at a123c000 (64-bit, non-prefetchable) [size=256]

   I/O ports at efa0 [size=32]

   Kernel driver in use: i801_smbus

00:1f.5 Serial bus controller [0c80]: Intel Corporation Device a324 (rev 10)

   Subsystem: ASUSTeK Computer Inc. Device 8694

   Flags: fast devsel

   Memory at fe010000 (32-bit, non-prefetchable) [size=4K]

00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-V (rev 10)

   Subsystem: ASUSTeK Computer Inc. Ethernet Connection (7) I219-V

   Flags: bus master, fast devsel, latency 0, IRQ 122

   Memory at a1200000 (32-bit, non-prefetchable) [size=128K]

   Capabilities: [c8] Power Management version 3

   Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+

   Kernel driver in use: e1000e

03:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961 (prog-if 02 [NVM Express])

   Subsystem: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961

   Flags: bus master, fast devsel, latency 0, IRQ 16, NUMA node 0

   Memory at a1100000 (64-bit, non-prefetchable) [size=16K]

   Capabilities: [40] Power Management version 3

   Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+

   Capabilities: [70] Express Endpoint, MSI 00

   Capabilities: [b0] MSI-X: Enable+ Count=8 Masked-

   Capabilities: [100] Advanced Error Reporting

   Capabilities: [148] Device Serial Number 00-00-00-00-00-00-00-00

   Capabilities: [158] Power Budgeting <?>

   Capabilities: [168] #19

   Capabilities: [188] Latency Tolerance Reporting

   Capabilities: [190] L1 PM Substates

   Kernel driver in use: nvme

```

Full output of aplay -L:

```
null

    Discard all samples (playback) or generate zero samples (capture)

default:CARD=PCH

    HDA Intel PCH, Generic Analog

    Default Audio Device

sysdefault:CARD=PCH

    HDA Intel PCH, Generic Analog

    Default Audio Device

front:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

    Front speakers

surround21:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

    2.1 Surround output to Front and Subwoofer speakers

surround40:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

    4.0 Surround output to Front and Rear speakers

surround41:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

    4.1 Surround output to Front, Rear and Subwoofer speakers

surround50:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

    5.0 Surround output to Front, Center and Rear speakers

surround51:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

    5.1 Surround output to Front, Center, Rear and Subwoofer speakers

surround71:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

iec958:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Digital

    IEC958 (S/PDIF) Digital Audio Output
```

[Moderator edit: added [code] tags to preserve output layout. -Hu]

----------

## NeddySeagoon

not_a_robot,

Welcome to Gentoo,

```
00:02.0 VGA compatible controller: Intel Corporation Device 3e98 (prog-if 00 [VGA controller])

00:1f.3 Audio device: Intel Corporation Device a348 (rev 10)
```

You have a single sound card. That makes things easier.

Normally the video card would have its own sound card built in. 

You have only one digital output too.

```
iec958:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Digital

    IEC958 (S/PDIF) Digital Audio Output
```

In alsamixer find the output with IEC958 or S/PDIF in its name and unmute it.

This will probably mute your analogue sound as snd_hda_intel cab do both the 44.1kHz sample rate for analogue and 48.0kHz rate for digital outputs but not both at the name time.

Sound cards are in two parts. The PIC interface part, in your case, controlled by snd_hda_intel and the CODEC that does all the IO. That's your "ROG SupremeFX S1220A"

Google says its a Realtek ALC1220.  The kernel needs to support both parts.

Thats CONFIG_SND_HDA_CODEC_REALTEK in the kernel.

You may also need CONFIG_SND_HDA_CODEC_HDMI

To help with your graphics make friends with wgetpaste and put the output of dmesg and your kernel .config file onto a pastebin site.

Post the links here. They are far to big to fit into a post.

----------

## not_a_robot

Thank you! I now have sound coming through the analog outputs but still nothing over HDMI. I have noticed in others' aplay -L outputs that HDMI will be listed, but mine is missing.

Here is dmesg http://dpaste.com/3SS1GTS

Here is .config http://dpaste.com/2NQG1Q5

----------

## Jaglover

Your kernel is too old for your hardware. Support for your Intel was added in kernel-4.20.

----------

## not_a_robot

How do I select the kernel version? I just skimmed back over the handbook and couldn't find a reference to kernel version, so I'm not exactly sure how I wound up with 4.19.

----------

## Jaglover

```
emerge -av1 =gentoo-sources-5.0.1
```

Portage will tell you how to install it.

----------

## not_a_robot

I get:

```
emerge: there are no ebuilds to satisfy "=gentoo-sources-5.0.1"
```

If it makes a difference, I'm on profile default/linux/amd64/17.0 (stable)

----------

## Jaglover

Then run emerge --sync, 5.0.1 was just added.

----------

## NeddySeagoon

not_a_robot,

```
[   11.392782] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec

[   11.392797] hdaudio hdaudioC0D2: Unable to bind the codec
```

You do need snd_hda_codec_hdmi but it can't find your sound card.

```
[    0.317625] Linux agpgart interface v0.103

[    0.317642] efifb: probing for efifb

[    0.317648] efifb: framebuffer at 0x90000000, using 32448k, total 32448k

[    0.317650] efifb: mode is 3840x2160x32, linelength=15360, pages=1

[    0.317651] efifb: scrolling: redraw

[    0.317653] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0

[    0.327406] Console: switching to colour frame buffer device 480x135

[    0.336837] fb0: EFI VGA frame buffer device
```

You are indeed using a generic framebuffer device for your console.

Your kernel has 

```
CONFIG_DRM_I915=y
```

so you should be using the framebuffer that provides.

Go with Jaglovers advice and update your kernel. This page lists all the hardware that the driver works with.

Your Device 3e98 is there too. As its not being used, that device ID is probably not listed in your kernel, so the driver will not bind to your device.

```

$ grep -i 3e98 -R /usr/src/linux/
```

 on kernel-4.19.0 shows its not listed.

$ grep -i 3e98 -R /usr/src/linux-5.0.0-gentoo/ includes 

```
/usr/src/linux-5.0.0-gentoo/include/drm/i915_pciids.h:   INTEL_VGA_DEVICE(0x3E98, info), /* SRV GT2 */ \
```

That's the definition for your video device. Notice the 0x3E98.

----------

## Jaglover

A word of warning.

Using much newer kernel than your stable branch may put you in a situation when you need also unstable versions of some applications which build kernel modules, like proprietary nVidia drivers or VirtualBox, for instance.

In case you do not wish to open this can of worms you may opt for one of 4.20 kernels available in portage.

https://packages.gentoo.org/packages/sys-kernel/gentoo-sources

----------

## not_a_robot

Thanks to you both. I've compiled a 5.0.1 kernel and I can see in the dmesg output that both the intel graphics driver and the HDMI audio are beig referenced, so that's good, but as soon as the handoff occurs to the intel driver, the screen goes black. I'm able to get dmesg output and reboot from console by typing blind.

dmesg: http://dpaste.com/0HPGRXK

.config: http://dpaste.com/0P3CNNT

----------

## Jaglover

Can't spot anything wrong at first glance. How exactly the screen blanks? Does it turn black with backlight on or it goes into sleep with "No Signal" message?

----------

## not_a_robot

No signal.

----------

## Jaglover

This probably means the EDID is not read from monitor or it is buggy. As a result monitor protects itself from incompatible video mode and turns off. You need to specify a safe video mode by hand if this is the case.

----------

## not_a_robot

I installed read-edid and tried it with both the 4.19 and 5.0 kernel, with the same result.

```
This is read-edid version 3.0.2. Prepare for some fun.

Attempting to use i2c interface

Looks like no busses have an EDID. Sorry!

Attempting to use the classical VBE interface

   Performing real mode VBE call

   Interrupt 0x10 ax=0x4f00 bx=0x0 cx=0x0
```

My monitor is actually a Samsung "Smart TV", maybe that has something to do with it.

How do I set this manually? I managed to set my framebuffer size manually in /etc/default/grub, maybe some setting I have in there (GRUB_GFXPAYLOAD_LINUX=keep?) is causing a problem.

My /etc/default/grub: http://dpaste/02PWDXE

----------

## Jaglover

Yes you can add video mode to kernel command line, also you could read /usr/src/linux/Documentation/EDID/HOWTO.txt.

Edit: Once I had a computer which sent the video to a wrong output altogether - the output even wasn't present on motherboard. Read about this here: https://www.osadl.org/Single-View.111+M5f0e4909445.0.html

----------

## NeddySeagoon

not_a_robot,

Can you startx? 

It might be a console only problem. That would be worth knowing.

----------

## not_a_robot

Jaglover, that link and doc was productive. I wound up taking the following steps:

1) Build a custom EDID for 4K@60h using values pulled from the advanced calculator here: https://www.extron.com/product/videotools.aspx

This caused dmesg to show an attempt to load my '3840x2160.bin" for "DP-1".

2) Disable DP-1 and enable HDMI-A-1 on the kernel command liine.

Now dmesg reports finding HDMI-A-1 and loading 3840x2160.bin for it. However, the TV is still reporting "no signal".

3) Repeat step (1) for 30h and 24h. Same result.

4) Attempt to load predefined EDID for 1920x1280. Same result.

5) Omit all EDID data but enable HDMI-A-1 to see if it will read EDID this time. It doesn't,

6) On the assumption that I most likely got the EDID values wrong, I chat with Samsung support to see if I could get the EDID directly from them.

This was unhelpful. They claimed that Samung TVs don't use EDID because they are "plug and play." Requests to be forwarded to an engineer were deflected.

I can think of one thing to try next with regard to EDID, and that is to purchase an HDMI passthrough EDID emulator. Hopefully it doesn't come to that.

NeddySeagoon, I'll try after reinstalling X tonight.

----------

## Jaglover

Wouldn't it be easier to pass video=<yourmode> to your kernel for testing? In case you are using Grub2 it is just a matter of hitting 'e' and adding the option you wish to test. Furthermore, you could try with some mainstream live distro, if it works then you can duplicate the setup.

----------

## not_a_robot

Jaglover:

I gave it a try, no dice. `video=HDMI-A-1:3840x2160@60`

I tried to boot from an arch-linux livecd and the moment it switches graphics modes during boot, I see this: http://dpaste.com/1NC5182

It looks like it could be a horizontal sync issue; maybe I can get the EDID arch is trying to use and tweak it until it works?

NeddySeagoon:

`startx` was apparently successful, though I still didn't get any video output. I removed the kms.edid_firmware statement from my kernel command line to see if the video mode might be autodetected. My xorg log (http://dpaste.com/2VKNFHG) shows some hopeful signs, I think. The monitor still isn't getting its settings across, though, the 4k video mode isn't detected.

Kernel config is here: 

http://dpaste.com/15XS1S9

----------

## Jaglover

```
video=HDMI-A-1:3840x2160@60
```

Some things to check.

Do you really have HDMI-A-1 output? Is the above syntax correct?

Regarding your Xorg, you need to run an application on it, otherwise it will terminate. If you build Kodi frontend for instance, run Kodi on Xorg and it will stay up.

----------

## not_a_robot

I'm reasonably sure I have HDMI-A-1. I tried HDMI-1 at first but this had no visible effect; using HDMI-A-1 causes some messages about it to appear in dmesg, as well as creating an entry in /sys/class/drm (or wherever they populate, I'm not in front of the machine right now).

I installed lxde and xorg in hopes that lxde would just be automatically selected as my wm. I'm not too familiar with X, (I always took it for granted on desktop systems and have spent the last few years doing my personal comptering on guiless devservers in the cloud anyway.) so I will need to poke around with it when I get home tonight and make sure I'm actually running something on Xorg.

In this case, though, Xorg seems to stay up - judging by the Xorg log.

----------

## not_a_robot

I also tried with a different monitor - in this case, a handheld HDMI projector. Same result, same exact dmesg output (besides timestamps).

----------

## NeddySeagoon

not_a_robot,

It looks promising but ...

```
[    25.897] (II) modeset(0): Output HDMI-1 has no monitor section

[    25.897] (II) modeset(0): EDID for output DP-1

[    25.897] (II) modeset(0): EDID for output DP-2

[    25.907] (II) modeset(0): EDID for output HDMI-1

[    25.907] (II) modeset(0): Printing probed modes for output HDMI-1

[    25.907] (II) modeset(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)

[    25.907] (II) modeset(0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)

[    25.907] (II) modeset(0): Modeline "800x600"x56.2   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz e)

[    25.907] (II) modeset(0): Modeline "848x480"x60.0   33.75  848 864 976 1088  480 486 494 517 +hsync +vsync (31.0 kHz e)

[    25.907] (II) modeset(0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
```

There are no widescreen modes there, like you are only getting old VESA modes.

```
[    26.588] (II) Server terminated successfully (0). Closing log file.
```

suggests that Xorg worked properly but found nothing to do, so exited cleanly.

```
emerge twm xterm xclock -1av
```

will get you the default test applications for Xorg.

Is 

```
[    26.127] (II) modeset(0): Setting screen physical size to 270 x 203
```

the correct size, in mm for your display?

That's too small to be useful for a 4k display. Do you have another display device attached?

That EDID data, including the physical size, came from somewhere. 

Looking at the preferred video drivers, you hawe

```
[    25.829] (==) Matched intel as autoconfigured driver 0

[    25.829] (==) Matched modesetting as autoconfigured driver 1

[    25.829] (==) Matched fbdev as autoconfigured driver 2

[    25.829] (==) Matched vesa as autoconfigured driver 3

[    25.829] (==) Assigned the driver to the xf86ConfigLayout

[    25.829] (II) LoadModule: "intel"

For diagnostics only, turn on

[code]# CONFIG_FB_SIMPLE is not set[/code]Grub sets up a framebuffer. This option allows the kernel to draw on that framebuffer. The kernel will not do any framebuffer setup. It just draws on what it finds. It just might get you an image though.

[    25.830] (WW) Warning, couldn't open module intel
```

If you can get it, the output of dmesg will be useful.

----------

## not_a_robot

I don't have any other displays attached - and the output size is definitely wrong. I baked the intel driver into the kernel instead of compiling as a module, which is probably why Xorg isn't finding the module. 

dmesg: http://dpaste.com/3XJ1QSV

----------

## russK

Regarding startx, did you set VIDEO_CARDS in make.conf?  I see no mention of it (I'm using my phone so I might have missed it).

https://wiki.gentoo.org/wiki/Xorg/Guide

Regards

----------

## not_a_robot

Yes, I have VIDEO_CARDS="i965 intel"

Here is the full make.conf: http://dpaste.com/3VEG2VW

----------

## NeddySeagoon

not_a_robot,

The Intel Xorg driver is in two parts.  

The kernel part 

```
[    1.812340] fbcon: inteldrmfb (fb0) is primary device

[    1.867978] Console: switching to colour frame buffer device 128x48

[    1.884646] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
```

is doing its thing driving the console.

The Xorg part, which depends on the kernel part, is missing.

As an aside,

```
[    2.147057] iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)

[    2.148914] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-43.ucode failed with error -2

... 

[    2.184292] VFS: Mounted root (ext4 filesystem) readonly on device 259:3.
```

If you want to make the wifi driver built in, its firmware must be bulilt in too.

I can tell its built in as it tries to start before root is mounted. 

```
[    1.791864] [drm] forcing DP-1 connector off

[    1.795872] [drm] forcing HDMI-A-1 connector on
```

4k on HDMI ... well maybe. 

That needs at least HDMI 1.3 at both ends and the cable needs to be up to it too. Do you have HDMI 1.3 on the TV and the Graphics card?

My display will only do 4k at 30Hz over HDMI. You really don't want 30Hz, the refresh rate may be very annoying.

Is using DP an option, even if its only for testing?

There is another way but I don't know how to do it in the console.

Xorg can generate any random resolution and refresh rate you care to name. You have to describe it to Xorg, then tell Xorg to use it.

From my Xorg.0.log 

```
[   213.430] (II) AMDGPU(0): Modeline "3840x2160"x60.0  533.25  3840 3888 3920 4000  2160 2163 2168 2222 +hsync -vsync (133.3 kHz eP)
```

That's one set of numbers for a 3840x2160 60.0Hz modeline.

Going down this path we might get Xorg to work at 4k but first we need to give Xorg something to do so 

```
emerge twm xterm xclock -1av
```

and run startx.

----------

## not_a_robot

By the way, here are the logs from when I load my custom edid def with "drm.edid_firmware="

xorg: http://dpaste.com/04S5DQZ

dmesg: http://dpaste.com/3TE04EK

----------

## NeddySeagoon

not_a_robot,

```
[    1.826094] [drm] Initialized i915 1.6.0 20181204 for 0000:00:02.0 on minor 0

[    1.827364] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)

[    1.827508] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input3

[    1.827618] [drm] Got external EDID base block and 0 extensions from "edid/3840x2160.bin" for connector "HDMI-A-1"
```

Its using your 3840x2160.bin EDID file.

but Xorg claims that it describes

```
[    16.374] (II) modeset(0): Printing probed modes for output HDMI-1

[    16.374] (II) modeset(0): Modeline "1792x1008"x60.0  150.25  1792 1904 2096 2400  1008 1009 1012 1043 -hsync +vsync (62.6 kHz)
```

1792x1008 is a very odd mode.

----------

## not_a_robot

NeddySeagoon:

Unfortunately I have no DP displays available to me at home. The TV, HDMI cable, and mobo HDMI output are all rated for HDMI 2.0. 

So, if the Xorg part is missing, how do I get it? I can only compile the intel driver as a module xor built-in, from what I can tell.

As for the wifi driver, I did include it, because I am getting wifi, but I think I selected extraneous wifi drivers in the kernel (but only included the one firmware file relevant to my actual wifi device). I keep meaning to go back and unselect the unused wifi devices from my kernel config.

I emerge'd those tools and ran startx. I realized I didn't let xorg run all the way before killing it (I can't see the screen so I can't tell when to hit ctrl+c) so I reran it and waited a bit this time. Here is what I got: http://dpaste.com/2E3BBZY

And I noticed this odd video mode, too. I must have screwed up my EDID def.It's here: http://dpaste.com/11CJ0VW

----------

## Jaglover

not_a_robot,

you do not need to set this high resolution mode for your console, Xorg has its own graphics driver and sets its modes separately. First, just try something modest to get your console working, maybe 1680x1050 or even less. Although you may need to pass this binary EDID to Xorg, it seems not get it properly.

----------

## NeddySeagoon

not_a_robot,

You have 

```
[    31.828] (II) modeset(0): Modeline "1792x1008"x60.0  150.25  1792 1904 2096 2400  1008 1009 1012 1043 -hsync +vsync (62.6 kHz)
```

i don't see how that is related to your input (below) at all.

```
/* Display */

#define CLOCK 594000 /* kHz */

#define XPIX 3840

#define YPIX 2160

#define XY_RATIO XY_RATIO_16_9

#define XBLANK 560

#define YBLANK 90

#define XOFFSET 176

#define XPULSE 88

#define YOFFSET 8

#define YPULSE 10

#define DPI 72

#define VFREQ 60

#define TIMING_NAME "Linux UHD"

#define HSYNC_POL 1

#define VSYNC_POL 1
```

As a get you going, add nomodeset to the kernel command line.  You can do that by pressing 'e' at the grub menu, to edit the in memory copy of grub.cfg.q

Do you get a display fron grub?

HDMI 2.0 is fine for 4k and 60Hz

----------

## not_a_robot

Jaglover: ok, using 1680x1050.

NeddySeagoon: I do get a display from grub. Using nomodeset, the display does not cut out. But, startx gives an error "no screens found".

dmesg: http://dpaste.com/08181QR

xorg: http://dpaste.com/2ERXH8N

----------

## NeddySeagoon

not_a_robot,

Good thats progress.  Xorg was using the modesetting driver because the userspace part of the Xorg driver is missing.

nomodeset removes the /dev/dri/card0, so no drm drivers can work.

Your preferred driver list is 

```
[    64.280] (==) Matched intel as autoconfigured driver 0

[    64.280] (==) Matched modesetting as autoconfigured driver 1

[    64.280] (==) Matched fbdev as autoconfigured driver 2

[    64.280] (==) Matched vesa as autoconfigured driver 3
```

Neither intel nor modesetting can be used while nomodeset in is effect. fbdev is plan and simple.

```
emerge -1av x11-drivers/xf86-video-fbdev
```

will install the Xorg fbdev driver. 

Still using nomodeset, Xorg should work but it will be slow.

----------

## not_a_robot

That worked - startx took me into a gui.

----------

## NeddySeagoon

not_a_robot,

Now that you have a GUI of sorts, life will get easier.

Please pastebin your dmesg, Xorg.0.log and kernel .config file.

The latter is at /usr/src/linux/.config

----------

## not_a_robot

dmesg: http://dpaste.com/3CN3Z3V

kernel config: http://dpaste.com/0Q5TB92

xorg log: http://dpaste.com/2F1PD0W

----------

## NeddySeagoon

not_a_robot,

```
[  5456.290] (II) FBDEV(0): Virtual size is 1024x768 (pitch 1024)
```

It will be distorted as that's a 4x3 mode but its progress.

Its using your efi framebuffer.

```
[    0.284717] efifb: mode is 1024x768x32, linelength=4096, pages=1
```

Your kernel .config contains  

```
# PC SMBus host controller drivers

#

# CONFIG_I2C_ALI1535 is not set

# CONFIG_I2C_ALI1563 is not set

# CONFIG_I2C_ALI15X3 is not set

# CONFIG_I2C_AMD756 is not set

# CONFIG_I2C_AMD8111 is not set

# CONFIG_I2C_I801 is not set

# CONFIG_I2C_ISCH is not set

CONFIG_I2C_ISMT=m

# CONFIG_I2C_PIIX4 is not set

CONFIG_I2C_NFORCE2=m

# CONFIG_I2C_NFORCE2_S4985 is not set

# CONFIG_I2C_NVIDIA_GPU is not set

# CONFIG_I2C_SIS5595 is not set

# CONFIG_I2C_SIS630 is not set

# CONFIG_I2C_SIS96X is not set

# CONFIG_I2C_VIA is not set

# CONFIG_I2C_VIAPRO is not set
```

 CONFIG_I2C_NFORCE2 is a bit odd. Its for a 20 year old motherboard chip set.

Are you sure CONFIG_I2C_ISMT is for your hardware and is the module loaded?  It will be is lsmod.

I would expect one of 

```
# CONFIG_I2C_I801 is not set

# CONFIG_I2C_ISCH is not set

CONFIG_I2C_ISMT=m

# CONFIG_I2C_PIIX4 is not set
```

to be correct. They are all Intel I2C controllers but I don't know which one.

A missing option here may prevent your EDID data from being read.

Right now, your EDID is being ignored, just like in days of old before EDID existed.

What does 

```
lspci -nnk
```

show?

You didn't mess up your /usr/src/linux/Documentation/EDID settings.  /usr/src/linux/Documentation/EDID/edid.S did.

Its suffered bitrot and only works for analogue outputs.

----------

## not_a_robot

lspci -nnk: http://dpaste.com/3T38S5M

Interesting that I need I2C drivers. I had assumed this option was only relevant for embedded devices and such.

I didn't select a lot of the options in this kernel - I started with something from genkernel and tweaked from there. There's a lot of things enabled that I didn't deselect simply out of caution.

After enabling all four of those options in the kernel, I see that SMBus is now using the i801_smbus driver, where it wasn't previously.

----------

## Jaglover

Your VGA device should have i915 driver loaded. It is not showing. Have you verified you run the kernel you think you are running. 

```
uname -a
```

----------

## not_a_robot

Is it not disabled by nomodeset?

----------

## NeddySeagoon

not_a_robot,

Now that you have an I2C driver, can you read the EDID data from the display?

----------

## not_a_robot

I don't seem to be able to. I rebooted without nomodeset and the display cut out again. get-edid just hangs: http://dpaste.com/0RZP4PB

Xorg log is the same: http://dpaste.com/2YNF0V6

----------

## NeddySeagoon

not_a_robot,

```
[    14.242] (II) modeset(0): EDID for output HDMI-1

[    14.242] (II) modeset(0): Printing probed modes for output HDMI-1

[    14.242] (II) modeset(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)

[    14.242] (II) modeset(0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)

[    14.242] (II) modeset(0): Modeline "800x600"x56.2   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz e)

[    14.242] (II) modeset(0): Modeline "848x480"x60.0   33.75  848 864 976 1088  480 486 494 517 +hsync +vsync (31.0 kHz e)

[    14.242] (II) modeset(0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)

[    14.242] (II) modeset(0): Output DP-1 disconnected

[    14.242] (II) modeset(0): Output DP-2 disconnected

[    14.242] (II) modeset(0): Output HDMI-1 connected
```

That's the EDID in action and it claims that 

```
[    14.242] (II) modeset(0): Output HDMI-1 using initial mode 1024x768 +0+0

..

[    14.466] (II) modeset(0): Setting screen physical size to 270 x 203
```

is in use.

That's the same resolution as you get with nomodeset.

Exactly when did the display got blank?

Did you see the Grub Menu?

The boot messages?

The login message?

Any of Xorg at all?

Lets try with the Intel Xorg driver which is not yet installed.

```
emerge -1av  x11-drivers/xf86-video-intel
```

and see if you get a different answer.

The Intel driver supports all sorts of hardware acceleration but that's eye candy just now.

If that won't work, we can try hand crafting a 4k modeline.  I'll convert mine to the Xorg modeline syntax.

That may fix Xorg.

----------

## Jaglover

ROG STRIX Z390-I GAMING

Shouldn't be anything special. 

Possible bad hardware?

Perhaps some setting in UEFI firmware is incorrect or the board needs a firmware update to support your CPU?

Did you say Arch Linux went black, too? Any other Linux, Ubuntu live or Mint?

----------

## not_a_robot

 *NeddySeagoon wrote:*   

> 
> 
> Exactly when did the display got blank?
> 
> 

 

Right after the message "fb0: switching to inteldrmfb from EFI VGA".

 *NeddySeagoon wrote:*   

> 
> 
> Did you see the Grub Menu?
> 
> 

 

Yes

 *NeddySeagoon wrote:*   

> 
> 
> The boot messages?
> 
> 

 

Up to the one about fb0.

 *NeddySeagoon wrote:*   

> 
> 
> The login message?
> 
> 

 

No.

 *NeddySeagoon wrote:*   

> 
> 
> Any of Xorg at all?
> 
> 

 

No.

 *NeddySeagoon wrote:*   

> 
> 
> Lets try with the Intel Xorg driver 
> 
> 

 

I get the same result.

xorg log: http://dpaste.com/2MWW5BS

dmesg: http://dpaste.com/3QABYFZ

 *Jaglover wrote:*   

> 
> 
> Possible bad hardware?
> 
> 

 

Very possible. This has been a nightmare build, I've already had one CPU go dead and I'm beginning to suspect the motherboard killed it.

 *Jaglover wrote:*   

> 
> 
> Perhaps some setting in UEFI firmware is incorrect or the board needs a firmware update to support your CPU?
> 
> 

 

It shouldn't, this board was specifically advertized as supporting 9th gen Intel CPUs.

 *Jaglover wrote:*   

> 
> 
> Did you say Arch Linux went black, too? Any other Linux, Ubuntu live or Mint?
> 
> 

 

Worse - it had some kind of weird horizontal tearing. I haven't tried any other distros yet, I'll try Ubuntu live next.

----------

## not_a_robot

Update: just tried Ubuntu live cd. Same horizontal tearing. Must be the motherboard onboard video?

----------

## NeddySeagoon

not_a_robot,

Xorg didn't find the Intel driver. 

```
[    14.151] (II) LoadModule: "intel"

[    14.152] (WW) Warning, couldn't open module intel

[    14.152] (EE) Failed to load module "intel" (module does not exist, 0)
```

That video disappears after "fb0: switching to inteldrmfb from EFI VGA" makes me think the Intel kernel driver is being selected but detecting another display output as being active,

since the video disappears. Certainly, Xorg reads EDID from somewhere.

The image is presented on the screen by reading out some memory pixel by pixel to draw the image on the screen. It starts in the top left goes along the top line, moves down a line and so on.  The image isn't drawn in the memory like that, the drawing isn't even synchronised to the readout to the screen. If both processes go on in the same region of RAM at the same time, the picture looks really ugly. Over the years, a number of ways to combat the mess on the screen that using a single range of memory like that have been used.

The range of memory used to store the image is called a frame buffer. It holds a single frame for the display.

Today, with RAM being low cost, the video system uses two or even three framebuffers. One is being used to refresh the screen, another has the nexf image being drawn and a trird, if there is one, has a complete image waiting for display. The framebuffers are switched during the vertical blanking time, when nothing is being read ont to the display.

That's all well and good when it works. However, it all depends on the graphics system being able to draw frames in 'real time'. For a 60Hz refresh rate, thats every 16.667ms.

What happens when the drawing system can't keep up?

The new frame isn't ready.  There isn't a good solution. The options are, switch frames anyway. 

That's ugly. Delay the switch until the drawing completes. That's generates tearing. You see a part of an old frame again and part of a new one.

Throw the part drawn frame away, show the old frame again, but you might not me able to draw the next new frame either.

Horizontal tearing just a video artefact caused by the video system being unable to render frames in real time, its probably the least worst option.

The fix is to use the right graphics driver with the right acceleration options.   

What driver did the Ubuntu live cd use?

Its Xorg log would be interesting.

----------

## not_a_robot

Thanks for the detailed explanation. Indeed, the output from Ubuntu live cd was very interesting.

dmesg: http://dpaste.com/2RB74K9

lspci -nnk : http://dpaste.com/260TZTW

xorg: http://dpaste.com/10CXGK1

A few things I noticed, but don't know what to make of:

1) There are 3 connections: DP-1, DP-2, and HMDI-1. On the back panel of my motherboard, however, I only see a DisplayPort and an HDMI.

2) DP-1 is the only one that seems to be getting any EDID, and xorg log mentions something related to HMDI (line 187) under DP-1's EDID.

3) I don't see a 60Hz 4K mode getting picked up. I has assumed that, with every component rated for HDMI 2.0, and the mobo boasting 4K@60Hz, and the TV boasting 4K@120Hz (with motion interpolation), that I would see a 4K@60Hz mode.

4) Ubuntu selected a different SMBus module from what I had in Gentoo.

5) Some drivers (i915, snd_hda_intel) are being loaded both in-kernel and as modules. How do I do this in Gentoo?

----------

## NeddySeagoon

not_a_robot,

As you say ... very interesting. Lets start with the Xorg log. 

```
[    17.937] (==) Matched modesetting as autoconfigured driver 0

[    17.937] (==) Matched fbdev as autoconfigured driver 1

[    17.937] (==) Matched vesa as autoconfigured driver 2
```

The intel driver is not even considered as an option for Xorg.

It goes on 

```
[    18.942] (II) modeset(0): glamor X acceleration enabled on Mesa DRI Intel(R) HD Graphics (Coffeelake 3x8 GT2) 

[    18.942] (II) modeset(0): glamor initialized

[    18.990] (II) modeset(0): Output DP-1 has no monitor section

[    18.990] (II) modeset(0): Output DP-2 has no monitor section

[    18.998] (II) modeset(0): Output HDMI-1 has no monitor section

[    19.046] (II) modeset(0): EDID for output DP-1

[    19.048] (II) modeset(0): Manufacturer: SAM  Model: f13  Serial#: 16780800

[    19.048] (II) modeset(0): Year: 2018  Week: 1
```

to detect a SAMsung display on the Display Port 1 connector. Check the serial number on the label, if its 16780800, that's your display :)

It was made in the first week of January 2018.

```
[    19.048] (II) modeset(0): Max Image Size [cm]: horiz.: 142  vert.: 80
```

That's a better size too. Its cm, not mm this time.

Lastly, there is 

```
[    19.048] (II) modeset(0): Printing probed modes for output DP-1

[    19.048] (II) modeset(0): Modeline "3840x2160"x30.0  297.00  3840 4016 4104 4400  2160 2168 2178 2250 +hsync +vsync (67.5 kHz eP)
```

which is the expected 4k modeline.

In short, Xorg worked as expected.  Now dmesg.

```
[    4.855363] efifb: framebuffer at 0x90000000, using 3072k, total 3072k

[    4.855364] efifb: mode is 1024x768x32, linelength=4096, pages=1
```

It starts in 1024x768 mode.  Ahhh. Thats where your strange EDID comes from. Its the capabilities of the EFI framebuffer. 

```
[    6.122931] Console: switching to colour frame buffer device 480x135

[    6.164024] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
```

shows that the inteldrmfb is in use for the console.

I don't see the resolution in use by the inteldrmfb frame buffer.

The takeaway is that the shape of the connector that the display is plugged into in not always related to the electronics driving the port.

Your video card sees the display as connected to Display Port 1, even if its an HDMI connector.

This suggests the following approach.  

Don't force anything on the kernel as it boots. That worked on Ubuntu. Maybe it works on Gentoo now too.

By setting nomodeset, the autodetection was turmed off, so whatever grub did was carried through to Xorg.

That's why it was 1024x768. Your forcing of HDMI-1 was ignored too.

We know that your display provides correct EDID data.  If the above does not work. Try forcing each output in turn but do not provide any EDID data.

Xorg says 

```
[    18.990] (II) modeset(0): Output DP-1 has no monitor section

[    18.990] (II) modeset(0): Output DP-2 has no monitor section

[    18.998] (II) modeset(0): Output HDMI-1 has no monitor section
```

So the electronics knows of three outputs, that's regardless of the number of physical ports on the card.

I suspect that Gentoo will report your display on DP-1 when it works.  Its the same codebase as Ubuntu.

----------

## not_a_robot

Ok, disabled forcing and tried again. This time Xorg.0.log showed that xorg apparently got the right resolution. However the screen still goes to sleep.

xorg: http://dpaste.com/3JHN9P9

dmesg: http://dpaste.com/0E5CSS3

lspci --nnk: http://dpaste.com/0ED5BQY

----------

## NeddySeagoon

not_a_robot,

```
[     9.614] (--) intel(0): Output DP1 using initial mode 3840x2160 on pipe 0

[     9.614] (==) intel(0): TearFree enabled
```

It still thinks its using DP1.  TearFree enabled means double buffering is turned on.

That's the Intel driver in use too.

What does "Goes to Sleep mean"?

```
[     9.618] (II) Initializing extension DPMS
```

Is Display Power Management being enabled.

The screen will go blank after a period of inactivity and go to standby sometime later.

Pressing a key or moving the mouse will wake it up. Wakeup from blanking is very fast. Wakeup from sleep takes a lot longer, my system takes about 30 sec.

DPMS can be fine tuned or disabled if you want.

The 

```
man xorg.conf
```

page says

```
       Option "BlankTime"  "time"

              sets  the  inactivity timeout for the blank phase of the screen‐

              saver.  time is in minutes.  This  is  equivalent  to  the  Xorg

              server's  -s flag, and the value can be changed at run-time with

              xset(1).  Default: 10 minutes.
```

The automatics do a fairly good job oy setting up a single display system but there are lots of knobs to play with.

In days of old, with CRT based displays it was possible to destroy your display. With flat panels, the worst that happens is you get no picture or a "Video out of range" message. 

The display may have its own DPMS too.

----------

## not_a_robot

 *NeddySeagoon wrote:*   

> 
> 
> What does "Goes to Sleep mean"?
> 
> 

 

The screen goes black, and eventually displays "No Signal" and returns to some kind of standby mode where it displays info about the TV (this is also what happens if I turn the TV on with nothing connected).

Not sure what to actually call this, so I've been referring to it as "cutting out" or "going to sleep" throughout the thread. I guess the signal just drops?

----------

## Jaglover

There are only two possibilities AFAIK, either your signal goes to a wrong output or it is incompatible with your TV.

----------

## NeddySeagoon

not_a_robot,

Essentially, yes. There are three parts to the signal, this dates from the analogue days.

The Vertical Sync, used to signal the end of a frame.

The Horizontal Sync, used to signal the end of a line.

The Video, which is the picture you see.

When the video is removed (blanked), there is no picture. Everything is operating normally and mouse movement or a keystroke should remove the blanking signal.

In this state, the display can't tell its just the video missing, so you won't get any messages generated by the display itself.

Standby is trigged by sending something other than syncs on the sync lines. The display detects this and should react accordingly.

Now you may get "No Signal", if the TV does not go into standby.

Both of these states are normal reduced power operation. The system should wake up in response to the mouse or keyboard.

Does it?

How long does the screen take to go black?

How long does it take for the "No Signal" message to appear?

----------

## not_a_robot

The display goes black instantly - I barely glimpse the "fb0: switching..." message.

The TV's own waiting animation (a black screen with some dots rotating in a circle) starts immedately after, and then goes to a screen that says "No Signal" after a few seconds.

Pressing the keyboard does nothing - though my keystrokes are registered, and I'm able to log in, get dmesg output, etc. by typing blind.

I have a second motherboard, identical to this one, arriving today. I've already replaced the CPU.

When I hook it up to a 1080p projector, there is no tearing in ubuntu.

----------

## NeddySeagoon

not_a_robot,

I'n not worried about the tearing. That will be missing options on mesa and maybe a few other packages, which together provides the video acceleration.

To fix mesa and friends, you need to set the VIDEO_CARDS in make.conf, then rebuild affected packages.

We have been doing the bare minimum to get video drivers installed, without worrying about all the trimmings.

Set your  VIDEO_CARDS in make.conf, then run 

```
emerge -uDNav @world --keep-going
```

-- edit --

Clicked submit too soon.

It sounds like the framebuffer is coming up on the wrong output. 

Try forcing each output in turn.  One of them must be right.

Xorg thinks its using DP-1 and it claims to be reading EDID data from there too.

----------

## not_a_robot

Ok, ran emerge, and tried disabling each display in turn.

DP-2 and HDMI have the same behavior as I've seen up to now.

Forcing DP-1 is interesting. The screen freezes at the boot message "fb0: switching to inteldrmfb". The system otherwise behaves as normal, I can log in and perform commands by typing blind. When I change terminals with Alt-Fn, the screen goes black, but does not go to "No Signal".

DP-1 is the only one that seems to get EDID, but DP-2 doesn't even attempt any resolution, while HDMI attempts 1024x768.

xorg logs:

for DP-1: http://dpaste.com/03WAAXD

for DP-2: http://dpaste.com/2SB3CE2

for HDMI: http://dpaste.com/017Z2XZ

----------

## Jaglover

```
[    23.761] (WW) intel(0): Unknown chipset
```

Your intel driver does not recognize your graphics (too new?), Ubuntu was using modeset. So ... try with modeset and output DP-1.

----------

## NeddySeagoon

not_a_robot,

What Jaglover said, but the vendor and device ID were listed in the kernel, so the Intel framebuffer console should work, even if Xorg doesn't.

 *Quote:*   

> ="not_a_robot"The screen freezes at the boot message "fb0: switching to inteldrmfb". 

 

Thats the last thing written to the EFI framebuffer before the switch to inteldrmfb, as if inteldrmfb was drawing on a different output.

As its still on the screen, either inteldrmfb is drawing to a different region of memory, that is not being displayed, or its drawing to a different region of memory that is being displayed on another output.

Nothing ties the memory region being drawn to the one being displayed The two are deliberately separate, or double buffering would be difficult. 

As Xorg claims you have three outputs, what I have in mind is to send the image to all three outputs at the same time.

That's called clone mode.  It may fix Xorg but won't do anything for the console. 

I'll need to read up about it as it will involve writing an xorg.conf file and its been a while since I've done that.

----------

## not_a_robot

Now this is interesting:

I enabled all 3 outputs this time, and my screen went black as usual, but then I logged in, ran startx, and the screen came back!

Here is xorg log: http://dpaste.com/3HQ428G

I still don't see 4K mode under HDMI! But my TV does confirm (via an "info" button on the remote) that it is at 1024x768@60Hz. 

Seems the 4K modes are only under DP-1 and have some kind of timing issue.

----------

## NeddySeagoon

not_a_robot,

This is making my head hurt again.

```
[    16.904] (--) intel(0): Output DP2 using initial mode 1024x768 on pipe 0

[    16.904] (--) intel(0): Output HDMI1 using initial mode 1024x768 on pipe 0

...

[    16.945] (II) intel(0): EDID for output DP1

[    16.945] (II) intel(0): Manufacturer: SAM  Model: f13  Serial#: 16780800

...

[    16.946] (II) intel(0): Printing DDC gathered Modelines:

[    16.946] (II) intel(0): Modeline "3840x2160"x0.0  297.00  3840 4016 4104 4400  2160 2168 2178 2250 +hsync +vsync (67.5 kHz eP)

...

[    17.041] (II) intel(0): Output DP1 connected

[    17.041] (II) intel(0): Output DP2 connected

[    17.041] (II) intel(0): Output HDMI1 connected

[    17.041] (II) intel(0): Output VIRTUAL1 disconnected

[    17.041] (II) intel(0): Using fuzzy aspect match for initial modes

[    17.041] (II) intel(0): Output DP1 using initial mode 1024x768 +0+0

[    17.041] (II) intel(0): Output DP2 using initial mode 1024x768 +0+0

[    17.041] (II) intel(0): Output HDMI1 using initial mode 1024x768 +0+0

```

so all outputs are using the best resolution they have in common anh your display is connected to one of them but we can't tell which.

I can believe the EDID data is on one and the video is on another though.

----------

## not_a_robot

Could it be an issue with the onboard video of this particular mobo? I have a replacement that just arrived - I'd rather send it back without opening it but I can give it a try if these problems could be due to a fault in this specific board.

By the way, xrandr --listmonitors says:

```

Monitors: 2

0: +*DP1 1024/1420x768/800+0+0 DP1

1: +DP2 1024/271x768/203+0+0 DP2 HDMI1

```

DP2 and HDMI are the same output? And DP1 is my primary display?

Also, DP1 is the only one with correct screen size. 1420x800mm instead of that weird 271x203 popping up again for DP2 and HDMI1.

```
xrandr --ouput HDMI1 --auto
```

 has no visible effect.

```
xrandr --ouput DP1 --auto
```

 causes the display to cut out.

Switching output back to HDMI1, and the display remains off.

Looks like we are outputting to HDMI1, after all, but EDID is being received over DP1?

----------

## not_a_robot

Here's that EDID! Courtesy of get-edid & edid-decode

http://dpaste.com/2QS6CPZ

I see my 60Hz mode, but it looks like I gotta take a hit to color depth to get it. Oh well.

Also, stack traces are starting to pop up in dmesg: http://dpaste.com/0GQ5ARQ

Looks like the warning always comes from https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/i915/intel_dp.c#L532

After inserting some more warnings, I've determined that intel_dp->max_link_rate = 0 at this point. Will dig around more tomorrow night.

----------

## not_a_robot

Another interesting thing - 2nd to last line of Xorg log is (EE) intel(0): failed to set mode: Invalid argument

But this is for when startx works, and switches to 1024x768

Is it possible that the intel driver just doesn't support the 4K@60Hz output mode?

----------

## Jaglover

not_a_robot,

there is a line telling the chipset is not recognized. I wouldn't pay much attention to anything that comes after that. You could try the live driver from portage. Or stay with modeset.

----------

## not_a_robot

What is a live driver? Is that like the nightly build or something? And I would need i915, right?

----------

## Jaglover

xf86-video-intel-9999 - this is the latest snapshot. These **9999 ebuilds are not meant for production use, but in some corner cases may be useful. This is the Xorg driver, it won't affect your console in any way.

----------

## NeddySeagoon

not_a_robot,

Live, otherwise -9999 version ebuilds pull directly from the upstream project.

You can get commit by commit access, so live, as it happens.

----------

## not_a_robot

Nice! That did something. Here's the diff on my last 2 Xorg logs:

```

2c2

< (WW) intel(0): Unknown chipset

---

> (--) intel(0): gen9 engineering sample

381c381

< (II) intel(0): SNA initialized with disabled backend

---

> (II) intel(0): SNA initialized with Coffeelake (gen9) backend

387,388d386

< (II) intel(0): Textured video not supported on this hardware or backend

< (WW) intel(0): loading DRI2 whilst acceleration is disabled.

```

Sadly, display still goes to No Signal, and HDMI still reports 1024x768 max.

Full xorg log: http://dpaste.com/3QDFFGK

----------

## NeddySeagoon

not_a_robot,

We will try doing it the hard way. I'll write an xorg.conf file but not tonight.

I'll need to do some reading of 

```
man xorg.conf
```

Its a while since I've configured Xorg by hand.

What I have in mind is to tell Xorg you have three identical displays connected, even though you don't.

I expect Xorg to draw the same image on all three but we won't know which in the one actually in use.

If there is an image, we can do some trial and error to turn them off one at a time.

----------

## Jaglover

Putting 'xrandr --auto' into ~/.xinitrc may give some results.

----------

## NeddySeagoon

Jaglover,

Its also possible to use xrandr to fiddle with outputs.  Thats a lot easier than a manual xorg.conf

----------

## Jaglover

NeddySeagoon,

xrandr normally requires valid DISPLAY variable, I wasn't sure what that would be. Methinks it is possible to SSH into this box and find out what can be done with xrandr.

----------

## not_a_robot

Good idea - I can ssh through my phone and continue interacting with the system regardless of the state of the monitor.

btw, 

DISPLAY = :0

Here is the output of xrandr -q: http://dpaste.com/2BG9M4C

edit: I was able to try a few different video modes with xrandr. Looks like we ARE outputting to DP1, because I can change the resolution with 

```
# xrandr --output DP1 --mode 1920x1080
```

Trying to interact with HDMI1 has no visible effect, and gives an error 

```
xrandr: Configure crtc 1 failed
```

xrandr -q --verbose confirms that DP2 and HDMI1 are clones: http://dpaste.com/1V4R356

The highest resolution I can set is 1920x1080 (0x52). Trying to set any of the 4K modes (0x48 thru 0x51) results in a No Signal.

----------

## NeddySeagoon

not_a_robot,

Cloning was what I was planing to achieve with an xorg.conf file.

----------

## NeddySeagoon

not_a_robot,

Cloning was what I was planing to achieve with an xorg.conf file.

-- edit --

What does VIRTUAL1 disconnected do and what happens if you enable it?

See this Arch Linux discussion

----------

## not_a_robot

I enabled it like I saw in the Arch Linux discussion, and it created a new disconnected VIRTUAL2.

randr -q --verbose: http://dpaste.com/3RSSZWZ

----------

