Graphics device not properly supported by driver

Hi support,

I’m attempting to use my display via docker in Balena on an Intel Alder Lake and I’m experiencing issues accessing the graphics device. dmesg shows the following:
Your graphics device 4680 is not properly supported by the driver in this kernel version. To force driver probe anyway, use i915.force_probe=4680 module parameter or CONFIG_DRM_I915_FORCE_PROBE=4680 configuration option

I’ve tried adding i915.force_probe=4680 to the config.json and setting CONFIG_DRM_I915_FORCE_PROBE=4680 in the device setting but neither seems to have any effect.

Do you have any ideas on how to fix this?
Kind regards,
Josja

I’m not sure about the “not properly supported” part, but in the meantime I can help with the suggested workarounds. CONFIG_DRM_I915_FORCE_PROBE is a Linux kernel configuration item, so you’re probably only going to make use of that if you’re compiling your own kernel. The i915.force_probe=4680 however looks like a command line argument to the kernel. You can add them by editing the appropriate file. Depending on your setup, this will probably be /mnt/boot/cmdline.txt, or if that doesn’t exist, /mnt/boot/grub/grub.cfg, or if that doesn’t exist, /mnt/boot/EFI/BOOT/grub.cfg.

@hraftery according to this post: Setting kernel parameters in BalenaOS using /mnt/boot/EFI/BOOT/grub_extraenv changes to that file area not persistent over OS updates. Do you have any thoughts about that? Or is there any progress on making changes like that available from the dashboard?

Hi, as you mention balenaOS does not currently support customization kernel command line arguments. The recommended approach is for the user application to unload the graphics driver and reload it with the appropriate parameters before launching the graphical application.

The process would look something like:

  • stop plymouth with Dbus before graphics driver is used
  • possibly disable virtual console echo 0 > /sys/class/vtconsole/vtcon0/bind
  • rmmod {driver} / modprobe -r {driver}
  • modprobe {driver} … (new settings)

Check out the following forum post for a similar example blacklist drivers in host OS - #25 by jgordon.

You need to update the graphics driver. And after that is not working, reinstall it and install it again. And also use a driver updater to update all drivers from time to time.

For someone landing on this thread trying to re-load the i915 driver on Balena: there is an additional dependency that is not present for the nouveau driver referred to above. The snd_hda_intel kernel module also depends on the i915 module. So to be able to reload the driver I used the following script:

    ## Disable all display elements that could prevent removal of i915 module
    # Stop plymouth service used for splash screen display
    dbus-send --system --dest=org.freedesktop.systemd1 --type=method_call /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager.StartUnit string:"plymouth-quit.service" string:"replace"
    # Disable virtual console
    for vtcon in /sys/class/vtconsole/*; do
        echo 0 > ${vtcon}/bind
    done

    # Wait some time for plymouth and virtual console to stop
    echo "Waiting to stop display services.."
    sleep 2

    # Remove the snd_hda_intel kernel module first since it depends on the i915 module
    rmmod snd_hda_intel

    # Remove the i915 kernel module
    rmmod i915

    # Reload the i915 kernel module with the proper parameters
    modprobe i915 <set the required parameters here>

    # Reload the snd_hda_intel module
    modprobe snd_hda_intel

2 Likes

hey,

do you mind explaining how i can add this script to my docker container? or do you have a github repo showcasing that?

any help is appreciated! Thanks!

What you can do is put the content above in a start.sh script. At the end of that script you add

exec [path and name of your application]

Such that at the end of the script your application is started. By using exec it will replace the shell that is executing the script, making sure that all signals sent to the container are received by your application and not by the shell.

Then you can add this script to your Dockerfile where at the end of the docker file you point to start.sh as the command to start instead of your application:

FROM some_image
COPY --chmod=755 start.sh /etc/start.sh

# Do here whatever you need to get your application into the container.

CMD ["/etc/start.sh"]
1 Like