LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Hardware (http://www.linuxquestions.org/questions/forumdisplay.php?f=18)
-   -   HDMI Scanlines & flicking when composite converter attached at boot. (http://www.linuxquestions.org/questions/showthread.php?t=4175462301)

lukebeales 05-17-2013 01:04 AM

HDMI Scanlines & flicking when composite converter attached at boot.
 
Hi all,

I have a slackware 14 system with an i915 which has two HDMI outputs connected and it works perfectly, using xrandr to adjust resolutions and such once it gets in to X.

The issue appears when I change one of the HDMI connections to go through a HDMI to AV converter (composite + audio) and happens during startup. The basic process is this:

* Bios displays
* Lilo graphic displays
* Initial kernel text displays
* Starts udev, initiates graphics & switches to high resolution console
!!! Issue starts here, from now on the straight HDMI connection keeps flicking and readjusting, & the converted HDMI disappears !!!
* System keeps doing its loading until X
* X starts in correct resolution. Still no converted image, and straight HDMI still flicking madly with a "scanline" slowly revealing the picture from top to bottom. The "scanline" sometimes skips and reveals about half the screen quickly, and the flicking is very random in timing.

Audio does however work regardless.

Using nomodeset disables the intel driver and changes to slow rendering so that isn't an option. It does however let the converted display continue on as normal.

I can get the converted display to work if I leave it unplugged until sometime after the udev / initial scripts. If I plug it in then, it stays blank until X, which detects it and everything works and displays flawlessly. Also interesting to note is Ubuntu loads perfectly with no flicking. The only real difference I can see is a newer kernel (3.5 vs 3.2).

So I am guessing it is something to do with KMS which doesn't look like it can be avoided, or even possibly a handshake issue on the module loading, or maybe even audio causing havoc?

Any ideas are welcome!

lukebeales 05-17-2013 02:39 AM

A bit more testing.

Issue definitely occurs when udev & modprobe happen. Here is the output from dmesg for that period relevant to the video.
(ignore the times - I stuck an artificial 30s delay to narrow down the issue. normally happens around 5s.)

Code:

[  35.271694] HDMI status: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[  35.271721] HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[  35.271797] HDMI status: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[  35.276111] HDMI: detected monitor  at connection type HDMI
[  35.276115] HDMI: available speakers: FL/FR
[  35.276120] HDMI: supports coding type LPCM: channels = 2, rates = 32000 44100 48000, bits = 16
[  35.276193] HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[  35.276274] HDMI status: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[  35.280105] HDMI: detected monitor  at connection type HDMI
[  35.280109] HDMI: available speakers: FL/FR
[  35.280114] HDMI: supports coding type LPCM: channels = 2, rates = 32000 44100 48000, bits = 16
[  35.280437] HDMI status: Codec=3 Pin=7 Presence_Detect=0 ELD_Valid=0
[  35.281157] i915 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[  35.281164] i915 0000:00:02.0: setting latency timer to 64
[  35.282800] HDMI: detected monitor  at connection type HDMI
[  35.282804] HDMI: available speakers: FL/FR
[  35.282809] HDMI: supports coding type LPCM: channels = 2, rates = 32000 44100 48000, bits = 16
[  35.423232] mtrr: type mismatch for e0000000,10000000 old: write-back new: write-combining
[  35.423238] [drm] MTRR allocation failed.  Graphics performance may suffer.
[  35.423659] i915 0000:00:02.0: irq 44 for MSI/MSI-X
[  35.423674] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[  35.423677] [drm] Driver supports precise vblank timestamp query.
[  35.423785] [drm:intel_dsm_platform_mux_info] *ERROR* MUX INFO call failed
[  35.423877] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
[  35.966089] fbcon: inteldrmfb (fb0) is primary device
[  35.966657] HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=1
[  35.966707] HDMI status: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=0
[  36.018425] HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[  36.018469] HDMI status: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[  36.319332] HDMI status: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[  36.322847] HDMI: detected monitor CAT-6066 at connection type HDMI
[  36.322852] HDMI: available speakers: FL/FR LFE FC RL/RR RC FLC/FRC RLC/RRC
[  36.322858] HDMI: supports coding type LPCM: channels = 2, rates = 32000 44100 48000, bits = 16 20 24
[  36.393953] Console: switching to colour frame buffer device 160x45
[  36.399431] fb0: inteldrmfb frame buffer device
[  36.399434] drm: registered panic notifier
[  36.409783] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input8
[  36.409849] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[  36.409903] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0

Also when fixing the console to 1280x720 the slow "scanline" is very clear and obvious just like in X, whereas at 1920x1080 it isn't as clear and the flickering is more prevalent.

Edit: Here's the "clean" dmesg when two HDMI monitors are connected with no issues.

Code:

[  35.258582] HDMI status: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=0
[  35.258747] HDMI status: Codec=3 Pin=7 Presence_Detect=0 ELD_Valid=0
[  35.259361] i915 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[  35.259371] i915 0000:00:02.0: setting latency timer to 64
[  35.400273] mtrr: type mismatch for e0000000,10000000 old: write-back new: write-combining
[  35.400279] [drm] MTRR allocation failed.  Graphics performance may suffer.
[  35.400672] i915 0000:00:02.0: irq 44 for MSI/MSI-X
[  35.400680] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[  35.400682] [drm] Driver supports precise vblank timestamp query.
[  35.400790] [drm:intel_dsm_platform_mux_info] *ERROR* MUX INFO call failed
[  35.400880] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
[  35.818831] fbcon: inteldrmfb (fb0) is primary device
[  36.142740] Console: switching to colour frame buffer device 160x45
[  36.148171] fb0: inteldrmfb frame buffer device
[  36.148174] drm: registered panic notifier
[  36.158584] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input8
[  36.158650] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[  36.158706] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0

Wondering if it might just need a delay somehow as the converter seems to take a little time to switch when videomodes change. It might decide to do a hotplug as it mentions?


Edit #2: Even more info. Booting up clean (as directly above), then swapping an output straight to the converter produces no log messages whatsoever. But when X is restarted it still comes up with clean pictures as if nothing is wrong and logs the following:

Code:

[ 5505.121543] libfcoe_device_notification: NETDEV_UNREGISTER lo
[ 5505.346449] HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[ 5505.346499] HDMI status: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[ 5505.647361] HDMI status: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[ 5505.650880] HDMI: detected monitor CAT-6066 at connection type HDMI
[ 5505.650885] HDMI: available speakers: FL/FR LFE FC RL/RR RC FLC/FRC RLC/RRC
[ 5505.650891] HDMI: supports coding type LPCM: channels = 2, rates = 32000 44100 48000, bits = 16 20 24
[ 5506.243304] HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=1
[ 5506.243363] HDMI status: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=0
[ 5506.431285] HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[ 5506.431336] HDMI status: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[ 5506.732198] HDMI status: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[ 5506.735714] HDMI: detected monitor CAT-6066 at connection type HDMI
[ 5506.735719] HDMI: available speakers: FL/FR LFE FC RL/RR RC FLC/FRC RLC/RRC
[ 5506.735724] HDMI: supports coding type LPCM: channels = 2, rates = 32000 44100 48000, bits = 16 20 24
[ 5514.484013] HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=1
[ 5514.484059] HDMI status: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=0
[ 5514.675145] HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[ 5514.675201] HDMI status: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[ 5514.976065] HDMI status: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[ 5514.979582] HDMI: detected monitor CAT-6066 at connection type HDMI
[ 5514.979588] HDMI: available speakers: FL/FR LFE FC RL/RR RC FLC/FRC RLC/RRC
[ 5514.979594] HDMI: supports coding type LPCM: channels = 2, rates = 32000 44100 48000, bits = 16 20 24
[ 5532.237093] HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=1
[ 5532.237147] HDMI status: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=0
[ 5532.420669] HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[ 5532.420728] HDMI status: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[ 5532.721569] HDMI status: Codec=3 Pin=5 Presence_Detect=1 ELD_Valid=1
[ 5532.725084] HDMI: detected monitor CAT-6066 at connection type HDMI
[ 5532.725089] HDMI: available speakers: FL/FR LFE FC RL/RR RC FLC/FRC RLC/RRC
[ 5532.725096] HDMI: supports coding type LPCM: channels = 2, rates = 32000 44100 48000, bits = 16 20 24

So the issue is to do with the initial loading of the module. If it gets that right (eg. if the converter isn't attached) then it can be attached/detached/etc without any problems. The initial console switch happens almost instantly, whereas X takes a fair while to get going as referenced by the times. So is there a way to delay the console switch until the module has calmed down and done its detecting?


Edit again:

The command where the issue happens is in rc.udev:

Code:

/sbin/udevadm trigger --type=devices --action=add
And just for fun, this is the udevadm monitor when the hdmi is connected.

Code:

KERNEL[613.643278] change  /devices/pci0000:00/0000:00:02.0/drm/card0 (drm)
ACTION=change
DEVNAME=/dev/dri/card0
DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0
DEVTYPE=drm_minor
HOTPLUG=1
MAJOR=226
MINOR=0
SEQNUM=3200
SUBSYSTEM=drm
UDEV_LOG=3

UDEV  [613.643737] change  /devices/pci0000:00/0000:00:02.0/drm/card0 (drm)
ACTION=change
DEVNAME=/dev/dri/card0
DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0
DEVTYPE=drm_minor
HOTPLUG=1
MAJOR=226
MINOR=0
SEQNUM=3200
SUBSYSTEM=drm
UDEV_LOG=3
USEC_INITIALIZED=613643607


lukebeales 05-19-2013 04:24 AM

All sorted - decided to bite the bullet and build a more recent kernel (3.5.4) which solved the problem. Must have been something iffy in the 3.2 release.

Hopefully this helps someone out!


All times are GMT -5. The time now is 02:21 PM.