fbpx

[QMK] Linux 平台的 udev 錯誤

如果您的 qmk setup 出現下列錯誤:

Ψ QMK Doctor is checking your environment.
Ψ Detected Linux.
⚠ Missing udev rules for 'dfu' boards. You'll need to use `sudo` in order to flash them.
⚠ Missing udev rules for 'input_club' boards. You'll need to use `sudo` in order to flash them.
⚠ Missing udev rules for 'stm32' boards. You'll need to use `sudo` in order to flash them.
⚠ Missing udev rules for 'bootloadhid' boards. You'll need to use `sudo` in order to flash them.
⚠ Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.
⚠ Missing udev rules for 'caterina' boards. You'll need to use `sudo` in order to flash them.

解決方法

請參考官方文件的說明:https://beta.docs.qmk.fm/faqs/faq_build

在 Linux 環境需要建立幾個 udev 的檔案:

/etc/udev/rules.d/50-atmel-dfu.rules:

# Atmel ATMega32U4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess", RUN{builtin}+="uaccess"
# Atmel USBKEY AT90USB1287
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess", RUN{builtin}+="uaccess"
# Atmel ATMega32U2
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess", RUN{builtin}+="uaccess"

/etc/udev/rules.d/54-input-club-keyboard.rules:

# Input Club keyboard bootloader
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess", RUN{builtin}+="uaccess"

/etc/udev/rules.d/55-caterina.rules:

# ModemManager should ignore the following devices
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"

/etc/udev/rules.d/56-dfu-util.rules:

# stm32duino
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess"
# Generic stm32
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess", RUN{builtin}+="uaccess"

/etc/udev/rules.d/57-bootloadhid.rules:

# bootloadHID
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess", RUN{builtin}+="uaccess"

錯誤:Detected ModemManager without the necessary udev rules

如果您的 qmk setup 出現下列錯誤:

Ψ Detected Linux.
⚠ Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.

解決方法,執行下列指令:

sudo apt-get purge modemmanager

完成之後再次執行 qmk setup 即可。

Show CommentsClose Comments

Leave a comment