What to do if Linux Modem Manager is interfering with writing keymaps to your own keyboard

background

I shared it because I was addicted to playing with the keymap of my own keyboard (ErgoDash mini) after a long time. Not limited to ErgoDash mini, this is an event that can occur when handling a self-made keyboard using Pro Micro (rather, all devices using Arduino compatible boards) in a Linux environment.

As an event, when I tried to write a keymap with the following command in the cloned directory of QMK Firmware,

$ sudo make ergodash/mini:[Keymap directory]:avrdude

Writing failed with the following error.

avrdude: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.

The environmental information at the time of occurrence is as follows.

$ uname -vrpm
4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020 x86_64 x86_64

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"

Conclusion for the time being

The keymap write failed due to a Linux ModemManager interrupt. After stopping ModemManager as shown below, re-execution of writing was successful. ** * Be sure to confirm that you are not using Modem Manager before executing. If you have a mobile broadband connection, it's suspicious, so let's stop. ** **

$ sudo systemctl stop ModemManager.service

Commentary

ModemManager controls the connection with [Mobile Broadband](https://ja.wikipedia.org/wiki/Mobile Broadband). It is a daemon that will help you. Many modems used for mobile broadband connection are connected via USB. So, of course, Modem Manager can open a USB port. The USB port to which the keyboard (or rather Pro Micro) is connected is no exception, and if an interrupt by ModemManager occurs during the keymap writing process, the process will fail.

It seems to be a well-known issue, and an issue has been drafted to address it in the QMK Firmware repository. Apparently, the workaround seems to be something like "If ModemManager is running when executing flash processing, a warning will be issued", so it seems that there is no change in what you have to do.

If you do not use the stopped Modem Manager, you can leave it as it is. If you never use it, you can disable the automatic start setting with the following command.

$ sudo systemctl disable ModemManager.service

If you say, "That said, it was started, so I want to restore it ...", you can restart it.

$ sudo systemctl start ModemManager.service

Referenced page

Assembled Helix Keyboard Kit --FOHTE.NET avrdude: Error: butterfly programmer uses avr_write_page() but does not provide a cmd() method - Stack Exchange #877024 modemmanager should ask before messing with serial ports - Debian Bug report logs

Recommended Posts

What to do if Linux Modem Manager is interfering with writing keymaps to your own keyboard
What to do if the inode is exhausted on EC2 Linux
What to do if you can't build your project with Maven
What to do if you forget your login password on Manjaro Linux
What to do if pyenv is not enabled (zsh)
What to do if ubuntu says your password is too short to change [passwd command] [ubuntu]
What to do if you can't sort files with subscripts
What to do if you can't use WiFi on Linux
What to do if Linux VLC can no longer rotate
What to do if you lose your EC2 key pair
What to do if you can't install pyaudio with pip #Python
What to do if you get a UnicodeDecodeError with pip install
What to do if "Unnamed: 0" is added in to_csv-> read_csv in pandas
What to do if yum breaks
What to do with Magics install
What to do with PYTHON release?
What to do if you can't find well with grep's -f option
What to do if there is a decimal in python json .dumps
What to do if the Pipenv environment is corrupted by updating Homebrew
What to do if you couldn't send an email to Yahoo with Python.
What to do if you get stuck during Anaconda installation on Linux
What to do if the Chainer (Windows) sample mnist terminates with WinError 183.
What to do if pyenv install does not proceed with an error
What to do if the server doesn't start with python manage.py runserver
What to do if an error occurs when importing numpy with VScode
What to do if you get a TypeError with numpy min, max
What to do if you get Could not fetch URL 443 with pip
What to do if fprintd requires a password when registering your fingerprint
To import your own module with jupyter
What to do after installing Linux (Ubuntu)
What to do if you get angry with swapon failed: Operation not permitted
What to do if CERTIFICATE_VERIFY_FAILED occurs when nltk.download () is done on macOS pyhon
What to do if scrapy doesn't work after installing scrapy with pip on mac
What to do if Japanese language support is not completely installed on Ubuntu 16.04
What to do if (base) is displayed at the beginning of the Mac terminal
Try to make your own AWS-SDK with bash
What to do if pipreqs results in UnicodeDecodeError
Note: What to do if pip install fails
What to do if mod_fcgid cannot resolve UnicodeEncodeError
What to do if rails s doesn't work
What to do if pip cannot be installed
What to do if atom autocomplete-python doesn't work
What to do if Docker-sync suddenly stops working
What to do if "amazon-linux-extras" → "No module named amazon_linux_extras"
How to make Linux compatible with Japanese keyboard
Steps to install your own library with pip
What to do if you get an "unknown service" error from your gRPC server
What to do if your Jupyter Notebook for beginners asks for a password or token
What to do if you get an OpenSSL error when installing Python 2 with pyenv
I want to get started with the Linux kernel, what is the list head structure?
[Python] What to do when No module named'pyproj.datadir' appears when Exe is done with PyInstaller
What to do if the progress bar is not displayed in tqdm of python
What to do if Python IntelliSense is not displayed in VS Code on Windows
What to do if you get an Import Error when importing matplotlib with Jupyter
[Introduction to Python] What is the important "if __name__ =='__main__':" when dealing with modules?
What to do if you get the error ʻERR_FEATURE_UNAVAILABLE_ON_PLATFORM` when using ts-node-dev on Linux
What to do if you run python in IntelliJ and end with an error