1
0
Fork 0
mirror of https://github.com/pikvm/pikvm.git synced 2026-03-02 18:16:56 -05:00

fresh os build fails to create /dev/kvmd-video on startup causing kvmd-tc358743 to fail #1103

Closed
opened 2026-02-20 14:11:05 -05:00 by deekerman · 13 comments
Owner

Originally created by @magore on GitHub (Jan 23, 2026).

Originally assigned to: @mdevaev on GitHub.

Describe the bug
For raspberry Pi 2W and hdmi tc358743 target the device /dev/kvmd-video is not created automatically on startup when KVM OS image is made following documented https://docs.pikvm.org/building_os/.
Simple fix: manually symlinking /dev/video0 to /dev/kvmd-video and restarting the kvmd-tc358743 services fixes the problem and video capture works - but fails again after the next reboot

To Reproduce
Steps to reproduce the behavior, like:

  1. Build the OS image for raspberry Pi 2W and hdmi tc358743 target using https://docs.pikvm.org/building_os
  2. Boot image on system on Pi 2W with a tc3587423 HDMI cature device.
  3. dmesg shows error systemd[1]: Expecting device /dev/kvmd-video
  4. Workaround: manually ln -s /dev/video0 /dev/kvmd-video and restart kvmd-tc358743 and it works

Expected behavior
/dev/kvmd-video should get created automattically

Desktop (please complete the following information):

  • OS: Ubuntu 24.04 is the OS

build system

  • Browser Google Chrome
  • Version 143.0.7499.193
  • VNC client not used

PiKVM info:

  • Raspberry Pi board version: RPi 2W

  • PiKVM platform: v2-hdmi

  • Video capture type: CSI bridge

  • KVMD version: pacman -Q | grep kvmd
    kvmd 4.140-1
    kvmd-fan 0.32-1
    kvmd-platform-v2-hdmi-rpi4 4.140-1
    kvmd-webterm 0.50-1

  • uStreamer version: pacman -Q | grep ustreamer
    ustreamer 6.45-1

  • Linux kernel: uname -a
    Linux pikvm 6.12.56-5-rpi #1 SMP Sun Jan 18 09:17:56 UTC 2026 armv7l GNU/Linux

Additional context
dmesg clips showing the device detection
[ 0.031319] /soc/csi@7e801000: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/tc358743@f
[ 0.031417] /soc/i2c0mux/i2c@1/tc358743@f: Fixed dependency cycle(s) with /soc/csi@7e801000
[ 0.032944] /soc/csi@7e801000: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/tc358743@f
[ 0.033972] /soc/i2c0mux/i2c@1/tc358743@f: Fixed dependency cycle(s) with /soc/csi@7e801000

Here is a log file showing the error status of kvmd-tc358743 before and after the fix

diagnostic-and-repair.txt

Originally created by @magore on GitHub (Jan 23, 2026). Originally assigned to: @mdevaev on GitHub. **Describe the bug** For raspberry Pi 2W and hdmi tc358743 target the device /dev/kvmd-video is not created automatically on startup when KVM OS image is made following documented https://docs.pikvm.org/building_os/. Simple fix: manually symlinking /dev/video0 to /dev/kvmd-video and restarting the kvmd-tc358743 services fixes the problem and video capture works - but fails again after the next reboot **To Reproduce** Steps to reproduce the behavior, like: 1. Build the OS image for raspberry Pi 2W and hdmi tc358743 target using https://docs.pikvm.org/building_os 2. Boot image on system on Pi 2W with a tc3587423 HDMI cature device. 3. dmesg shows error systemd[1]: Expecting device /dev/kvmd-video 4. Workaround: manually ln -s /dev/video0 /dev/kvmd-video and restart kvmd-tc358743 and it works **Expected behavior** /dev/kvmd-video should get created automattically **Desktop (please complete the following information):** - OS: Ubuntu 24.04 is the OS build system - Browser Google Chrome - Version 143.0.7499.193 - VNC client not used **PiKVM info:** - Raspberry Pi board version: RPi 2W - PiKVM platform: v2-hdmi - Video capture type: CSI bridge - KVMD version: pacman -Q | grep kvmd kvmd 4.140-1 kvmd-fan 0.32-1 kvmd-platform-v2-hdmi-rpi4 4.140-1 kvmd-webterm 0.50-1 - uStreamer version: `pacman -Q | grep ustreamer` ustreamer 6.45-1 - Linux kernel: `uname -a` Linux pikvm 6.12.56-5-rpi #1 SMP Sun Jan 18 09:17:56 UTC 2026 armv7l GNU/Linux **Additional context** dmesg clips showing the device detection [ 0.031319] /soc/csi@7e801000: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/tc358743@f [ 0.031417] /soc/i2c0mux/i2c@1/tc358743@f: Fixed dependency cycle(s) with /soc/csi@7e801000 [ 0.032944] /soc/csi@7e801000: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/tc358743@f [ 0.033972] /soc/i2c0mux/i2c@1/tc358743@f: Fixed dependency cycle(s) with /soc/csi@7e801000 Here is a log file showing the error status of kvmd-tc358743 before and after the fix [diagnostic-and-repair.txt](https://github.com/user-attachments/files/24818322/diagnostic-and-repair.txt)
Author
Owner

@magore commented on GitHub (Jan 23, 2026):

Hacking the udev rule /usr/lib/udev/rules.d/99-kvmd.rules and adding rule below as the first rule "fixes" the problem and the system works - however it needs someone actually familiar with the overall project to fix it correctly:
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTR{name}=="unicam-image", GROUP="kvmd", SYMLINK+="kvmd-video", TAG+="systemd"

@magore commented on GitHub (Jan 23, 2026): Hacking the udev rule /usr/lib/udev/rules.d/99-kvmd.rules and adding rule below as the first rule "fixes" the problem and the system works - however it needs someone actually familiar with the overall project to fix it correctly: KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTR{name}=="unicam-image", GROUP="kvmd", SYMLINK+="kvmd-video", TAG+="systemd"
Author
Owner

@mdevaev commented on GitHub (Jan 23, 2026):

Hello. What about the stock image? Could you install it, update OS and check?

@mdevaev commented on GitHub (Jan 23, 2026): Hello. What about the stock image? Could you install it, update OS and check?
Author
Owner

@magore commented on GitHub (Jan 24, 2026):

I will give the stock image a try - it might take a few days to get to it. I will report the results. Thanks!

@magore commented on GitHub (Jan 24, 2026): I will give the stock image a try - it might take a few days to get to it. I will report the results. Thanks!
Author
Owner

@mdevaev commented on GitHub (Jan 24, 2026):

I'll be waiting!

@mdevaev commented on GitHub (Jan 24, 2026): I'll be waiting!
Author
Owner

@magore commented on GitHub (Feb 1, 2026):

I tested with a downloaded a stock image v2-hdmi-zero2w-arm-latest.img.xz and It works. So the difference I was seeing was only due to the build process somehow dropping a udev rule to create symlink to /dev/kvmd-video. Sorry for the delay in testing this!

@magore commented on GitHub (Feb 1, 2026): I tested with a downloaded a stock image v2-hdmi-zero2w-arm-latest.img.xz and It works. So the difference I was seeing was only due to the build process somehow dropping a udev rule to create symlink to /dev/kvmd-video. Sorry for the delay in testing this!
Author
Owner

@mdevaev commented on GitHub (Feb 2, 2026):

Please post the content of /usr/lib/udev/rules.d/99-kvmd.rules and /etc/ude/rules.d/99-kvmd.rules from your own image that you built.

@mdevaev commented on GitHub (Feb 2, 2026): Please post the content of `/usr/lib/udev/rules.d/99-kvmd.rules` and `/etc/ude/rules.d/99-kvmd.rules` from your own image that you built.
Author
Owner

@magore commented on GitHub (Feb 2, 2026):

There is no file call /etc/udev/rules.d/99-kvmd.rules in

[root@pikvm /]# ls -l /etc/udev/rules.d
total 8
-rw-r--r-- 1 root root 550 Sep 29 15:32 95-raspberrypi-io-access.rules
-rw-r--r-- 1 root root  81 Jan 18 23:05 raspberrypi.rules

For the file /usr/lib/udev/rules.d/99-kvmd.rules you can see my addition and notes as the original line does not match for my CSI HDMI device - my rule matches any video[0-9] so is a kludge

 cat /usr/lib/udev/rules.d/99-kvmd.rules
# https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name
# https://wiki.archlinux.org/index.php/Udev#Setting_static_device_names
# MIKE GORE
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTR{name}=="unicam-image", GROUP="kvmd", SYMLINK+="kvmd-video", TAG+="systemd"
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", KERNELS=="fe801000.csi|fe801000.csi1", ATTR{name}=="unicam-image", GROUP="kvmd", SYMLINK+="kvmd-video", TAG+="systemd"
KERNEL=="hidg0", GROUP="kvmd", SYMLINK+="kvmd-hid-keyboard"
KERNEL=="hidg1", GROUP="kvmd", SYMLINK+="kvmd-hid-mouse"
KERNEL=="hidg2", GROUP="kvmd", SYMLINK+="kvmd-hid-mouse-alt"

I also am including kernel messages concerning my device detection from dmesg
[root@pikvm /]# dmesg | grep -i tc358743

[    0.031106] /soc/csi@7e801000: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/tc358743@f
[    0.031204] /soc/i2c0mux/i2c@1/tc358743@f: Fixed dependency cycle(s) with /soc/csi@7e801000
[    0.032727] /soc/csi@7e801000: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/tc358743@f
[    0.033754] /soc/i2c0mux/i2c@1/tc358743@f: Fixed dependency cycle(s) with /soc/csi@7e801000
[   11.895956] tc358743 10-000f: tc358743 found @ 0x1e (i2c-11-mux (chan_id 1))
@magore commented on GitHub (Feb 2, 2026): There is no file call /etc/udev/rules.d/99-kvmd.rules in ``` [root@pikvm /]# ls -l /etc/udev/rules.d total 8 -rw-r--r-- 1 root root 550 Sep 29 15:32 95-raspberrypi-io-access.rules -rw-r--r-- 1 root root 81 Jan 18 23:05 raspberrypi.rules ``` For the file /usr/lib/udev/rules.d/99-kvmd.rules you can see my addition and notes as the original line does not match for my CSI HDMI device - my rule matches any `video[0-9]` so is a kludge ``` cat /usr/lib/udev/rules.d/99-kvmd.rules # https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name # https://wiki.archlinux.org/index.php/Udev#Setting_static_device_names # MIKE GORE KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTR{name}=="unicam-image", GROUP="kvmd", SYMLINK+="kvmd-video", TAG+="systemd" KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", KERNELS=="fe801000.csi|fe801000.csi1", ATTR{name}=="unicam-image", GROUP="kvmd", SYMLINK+="kvmd-video", TAG+="systemd" KERNEL=="hidg0", GROUP="kvmd", SYMLINK+="kvmd-hid-keyboard" KERNEL=="hidg1", GROUP="kvmd", SYMLINK+="kvmd-hid-mouse" KERNEL=="hidg2", GROUP="kvmd", SYMLINK+="kvmd-hid-mouse-alt" ``` I also am including kernel messages concerning my device detection from dmesg [root@pikvm /]# dmesg | grep -i tc358743 ``` [ 0.031106] /soc/csi@7e801000: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/tc358743@f [ 0.031204] /soc/i2c0mux/i2c@1/tc358743@f: Fixed dependency cycle(s) with /soc/csi@7e801000 [ 0.032727] /soc/csi@7e801000: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/tc358743@f [ 0.033754] /soc/i2c0mux/i2c@1/tc358743@f: Fixed dependency cycle(s) with /soc/csi@7e801000 [ 11.895956] tc358743 10-000f: tc358743 found @ 0x1e (i2c-11-mux (chan_id 1)) ```
Author
Owner

@mdevaev commented on GitHub (Feb 3, 2026):

Please run this command and post the entire log: udevadm info -a -p $(udevadm info -q path -n /dev/kvmd-video)

@mdevaev commented on GitHub (Feb 3, 2026): Please run this command and post the entire log: `udevadm info -a -p $(udevadm info -q path -n /dev/kvmd-video)`
Author
Owner

@magore commented on GitHub (Feb 4, 2026):

udevadm-info.txt

@magore commented on GitHub (Feb 4, 2026): [udevadm-info.txt](https://github.com/user-attachments/files/25064804/udevadm-info.txt)
Author
Owner

@mdevaev commented on GitHub (Feb 4, 2026):

It seems the build configuration is wrong. Specifically, you have an incorrect BOARD= or PLATFORM= values in config.mk. Please show the build config.

@mdevaev commented on GitHub (Feb 4, 2026): It seems the build configuration is wrong. Specifically, you have an incorrect `BOARD=` or `PLATFORM=` values in `config.mk`. Please show the build config.
Author
Owner

@magore commented on GitHub (Feb 4, 2026):

The script attached is my build script with comments. After that is the build log.
doit.sh
log.txt

I just noticed while reviewing the attacted log file that it had reported the error I made! The export line for the board was: export BOARD = zero2w which is has spaces in it. When I created the script I was doing a cut/paste from Section 4 under building os which has spaces in the assignment lines. I had removed those while making the script - all except I missed that one. Section 3 of the building os did not have the spaces.
Anyway: Major face palm mistake on my part. Interestingly the only change that typo caused was the udev rule as once fixed the whole project worked fine.

I am sorry for the time this waisted

@magore commented on GitHub (Feb 4, 2026): The script attached is my build script with comments. After that is the build log. [doit.sh](https://github.com/user-attachments/files/25080292/doit.sh) [log.txt](https://github.com/user-attachments/files/25080293/log.txt) I just noticed while reviewing the attacted log file that it had reported the error I made! The export line for the board was: `export BOARD = zero2w` which is has spaces in it. When I created the script I was doing a cut/paste from [Section 4 under building os](https://docs.pikvm.org/building_os/) which has spaces in the assignment lines. I had removed those while making the script - all except I missed that one. Section 3 of the building os did not have the spaces. Anyway: Major face palm mistake on my part. Interestingly the only change that typo caused was the udev rule as once fixed the whole project worked fine. I am sorry for the time this waisted
Author
Owner

@magore commented on GitHub (Feb 4, 2026):

FYI - I should have mentioned at the start that I really like this project because of the docker build process - I just sent a paypal donation. I had originally tried an image early in the project developement and just recently got around to trying it again. Very polished and professionally done.

@magore commented on GitHub (Feb 4, 2026): FYI - I should have mentioned at the start that I really like this project because of the docker build process - **I just sent a paypal donation**. I had originally tried an image early in the project developement and just recently got around to trying it again. Very polished and professionally done.
Author
Owner

@mdevaev commented on GitHub (Feb 4, 2026):

I'm glad that problem is solved and thank you for the donation! Hope that everything will work fine.

@mdevaev commented on GitHub (Feb 4, 2026): I'm glad that problem is solved and thank you for the donation! Hope that everything will work fine.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pikvm-pikvm#1103
No description provided.