How to load and install the i2c-dev kernel module on 22.04?

bd flag

user@desktop:~/ddcci-plasmoid$ find /lib/modules/$(uname -r) -name i2c-dev • returns nothing

user@desktop:~/ddcci-plasmoid$ lsmod | grep i2c_dev • returns nothing

ec flag
**Welcome to the Ask Ubuntu community.** Your question as written is unclear. You indicate that you want to load/install the i2c-dev kernel module, but the first command you use is to find the module, and the second command is to see if it's loaded (which it's not). What do you want to do?
cn flag

You don't!

By default, i2c-dev is compiled into the kernel, rather than as a separate module, which is why you can't find it as such.

Grepping the kernel headers grep -R i2c-dev /usr/src/linux-headers-$(uname -r)/ is often a useful trick for discovering these sorts of things, which is how I found this in drivers/i2c/Kconfig:

config I2C_CHARDEV
        tristate "I2C device interface"
          Say Y here to use i2c-* device files, usually found in the /dev
          directory on your system.  They make it possible to have user-space
          programs use the I2C bus.  Information on how to do this is
          contained in the file <file:Documentation/i2c/dev-interface.rst>.

          This support is also available as a module.  If so, the module 
          will be called i2c-dev.

You can confirm it is built in by running the command: grep I2C_CHARDEV /boot/config-$(uname -r), which will return:


and not as it would for a module:

I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.