User Tools

Site Tools


doc:appunti:hardware:mini_pc_intel_pentium_j3710

This is an old revision of the document!


Mini PC Intel Pentium J3710

Video card problem with kernel 6.12

Using Debian 13 Trixie with kernel 6.12.69, the screen goes blank (no HDMI signal) as soon as it switches to frame buffer. With dmesg you can read the following errors:

[    6.587061] i915 0000:00:02.0: [drm] timed out waiting for [ENCODER:98:HDMI B] port ready: got 0xf, expected 0x0
[   16.775053] i915 0000:00:02.0: [drm] *ERROR* [CRTC:53:pipe A] flip_done timed out
[   27.015096] i915 0000:00:02.0: [drm] *ERROR* flip_done timed out
[   27.015122] i915 0000:00:02.0: [drm] *ERROR* [CRTC:53:pipe A] commit wait timed out
[   37.255074] i915 0000:00:02.0: [drm] *ERROR* flip_done timed out
[   37.255097] i915 0000:00:02.0: [drm] *ERROR* [CONNECTOR:99:HDMI-A-1] commit wait timed out
[   47.495072] i915 0000:00:02.0: [drm] *ERROR* flip_done timed out
[   47.495095] i915 0000:00:02.0: [drm] *ERROR* [PLANE:32:primary A] commit wait timed out
[   57.735072] i915 0000:00:02.0: [drm] *ERROR* [CRTC:53:pipe A] flip_done timed out
[   57.932964] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device

The only way to boot Debian 13 with kernel 6.12 is to pass the nomodeset kernel parameter.

Kernel 6.1

It is possible to install kernel 6.1.0 from Debian 12 Bookworm, so that frame buffer works:

[    5.399065] fbcon: i915drmfb (fb0) is primary device
[    5.438998] Console: switching to colour frame buffer device 128x37
[    5.458533] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device

Despite the HDMI monitor is connected, the status pseudfile reports that it is disconnected:

cat /sys/class/drm/card0-HDMI-A-1/status
disconnected

Writing the on string to the file changes the status to connected:

echo on > /sys/class/drm/card0-HDMI-A-1/status
cat /sys/class/drm/card0-HDMI-A-1/status
connected

but it causes a kernel trace:

[   69.315446] i915 0000:00:02.0: timed out waiting for [ENCODER:94:HDMI B] port ready: got 0xf, expected 0x0

When the i915 kernel module is loaded, you can find five DRM (Direct Rendering Manager) devices managed by card0:

ls -1 /sys/class/drm/
card0
card0-DP-1
card0-DP-2
card0-HDMI-A-1
card0-HDMI-A-2
card0-HDMI-A-3
renderD128
version

It is possibile to do a complete hardware reset of the cards using the following command:

echo "0000:00:02.0" > /sys/bus/pci/drivers/i915/unbind
sleep 1
echo "0000:00:02.0" > /sys/bus/pci/drivers/i915/bind

After the unbind you can verify that the directory /sys/class/drm/ is empty, it will be populated again after the bind.

Blanking the Virtual Terminal

When the host is started in frame buffer text console, the setterm command can be used to force the screen to go blank:

setterm --blank force
setterm --powerdown 0

The monitor turns off due no signal and remains blank even keys are pressed on the keyboard.

To revive the screen:

setterm --blank poke
setterm --powerdown 0

If the screen is blanked the following command returns 1:

setterm --blank
1

The Debian package libdrm-tests contains the modetest tool.

FIXME What is this?

echo 4 > /sys/class/graphics/fb0/blank
echo 0 > /sys/class/graphics/fb0/blank

Writing the value 4 to the pseudodevice changes the DPMS property from On=0 to Off=3. It is possibile to check all the properties using modetest:

modetest -M i915 -p
opened device `Intel Graphics` on driver `i915` (version 1.6.0 at 20201103)
Connectors:
id      encoder status          name            size (mm)       modes   encoders
95      94      connected       HDMI-A-1        0x0             5       94
  modes:
        index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
  #0 1024x768 60.00 1024 1048 1184 1344 768 771 777 806 65000 flags: nhsync, nvsync; type: driver
  #1 800x600 60.32 800 840 968 1056 600 601 605 628 40000 flags: phsync, pvsync; type: driver
  ...
    2 DPMS:
        flags: enum
        enums: On=0 Standby=1 Suspend=2 Off=3
        value: 3
    ....

107     106     connected       HDMI-A-2        470x260         30      106
  modes:
        index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
  #0 1024x600 59.82 1024 1068 1156 1344 600 603 609 625 50250 flags: phsync, nvsync; type: preferred, driver
  #1 1920x1080 60.00 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: driver
  ...
    2 DPMS:
        flags: enum
        enums: On=0 Standby=1 Suspend=2 Off=3
        value: 3
    ....

FIXME What is this?

/usr/sbin/vbetool dpms on
/usr/sbin/vbetool dpms off

Pygame

We verified what driver uses the Pygame app:

import pygame
pygame.init()
print(pygame.display.get_driver())

It says KMSDRM.

Using that driver the SDL Simple DirectMedia Layer library owns the DRM master, external tools (modetest, sysfs) do not work for blanking the screen. The correct solution is to control this from inside SDL.

HDMI Monitor supported modes

cat /sys/class/drm/card0-HDMI-A-1/modes
1024x600
800x600
800x600
800x600
800x600
720x576
...
fbset -i -fb /dev/fb0

mode "1024x600"
    geometry 1024 600 1024 600 32
    timings 0 0 0 0 0 0 0
    rgba 8/16,8/8,8/0,0/0
endmode

Frame buffer device information:
    Name        : i915drmfb
    Address     : 0
    Size        : 2457600
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 1
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 4096
    Accelerator : No
doc/appunti/hardware/mini_pc_intel_pentium_j3710.1771860201.txt.gz · Last modified: by niccolo