User Tools

Site Tools


doc:appunti:hardware:mini_pc_intel_pentium_j3710

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:hardware:mini_pc_intel_pentium_j3710 [2026/02/22 18:20] – [Kernel 6.1] niccolodoc:appunti:hardware:mini_pc_intel_pentium_j3710 [2026/02/22 19:35] (current) – [Pygame] niccolo
Line 30: Line 30:
 </code> </code>
  
-Despite the HDMI monitor is connected, the status pseudfile reports that it is disconnected:+Despite the HDMI monitor is connected, the status pseudfile reports that it is **disconnected**:
  
 <code> <code>
Line 37: Line 37:
 </code> </code>
  
-Writing the **on** string to the file causes a kernel trace:+Writing the **on** string to the file changes the status to connected:
  
 <code> <code>
 echo on > /sys/class/drm/card0-HDMI-A-1/status echo on > /sys/class/drm/card0-HDMI-A-1/status
 +cat /sys/class/drm/card0-HDMI-A-1/status
 +connected
 </code> </code>
 +
 +but it causes a kernel trace:
  
 <code> <code>
 [   69.315446] i915 0000:00:02.0: timed out waiting for [ENCODER:94:HDMI B] port ready: got 0xf, expected 0x0 [   69.315446] i915 0000:00:02.0: timed out waiting for [ENCODER:94:HDMI B] port ready: got 0xf, expected 0x0
 </code> </code>
 +
 +When the **i915** kernel module is loaded, you can find five **DRM** (Direct Rendering Manager) devices managed by **card0**:
 +
 +<code>
 +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
 +</code>
 +
 +It is possibile to do a **complete hardware reset** of the cards using the following command:
 +
 +<code>
 +echo "0000:00:02.0" > /sys/bus/pci/drivers/i915/unbind
 +sleep 1
 +echo "0000:00:02.0" > /sys/bus/pci/drivers/i915/bind
 +</code>
 +
 +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:
 +
 +<code>
 +setterm --blank force
 +setterm --powerdown 0
 +</code>
 +
 +The monitor turns off due no signal and remains blank even keys are pressed on the keyboard.
 +
 +To revive the screen:
 +
 +<code>
 +setterm --blank poke
 +setterm --powerdown 0
 +</code>
 +
 +If the screen is blanked the following command returns **1**:
 +
 +<code>
 +setterm --blank
 +1
 +</code>
 +
 +===== Pygame =====
 +
 +We verified what driver uses the Pygame app:
 +
 +<code python>
 +import pygame
 +pygame.init()
 +print(pygame.display.get_driver())
 +</code>
 +
 +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.
  
doc/appunti/hardware/mini_pc_intel_pentium_j3710.1771780845.txt.gz · Last modified: by niccolo