Bug 913203

Summary: Load i2c-dev module when i2cdetect is executed
Product: [Fedora] Fedora Reporter: Evan McNabb <emcnabb>
Component: i2c-toolsAssignee: Jaromír Cápík <jcapik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 22CC: ajax, gerd, jcapik, miminar, nhorman, ovasik, rasibley
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: i2c-tools-3.1.0-15.fc24 i2c-tools-3.1.0-15.fc23 i2c-tools-3.1.0-15.fc22 i2c-tools-3.1.0-15.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 914728 1071397 (view as bug list) Environment:
Last Closed: 2015-10-13 00:05:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 914728    
Attachments:
Description Flags
proposed patch for this issue
none
updated patch none

Description Evan McNabb 2013-02-20 16:16:23 UTC
Description of problem:

i2cdetect requires the i2c-dev module be loaded so the appropriate /dev entries are created. This is not done automatically, so when i2cdetect is initially run it gives the false impression that no buses/devices exist:

# i2cdetect -l
# modprobe i2c-dev
# i2cdetect -l
i2c-0	i2c       	i915 gmbus ssc                  	I2C adapter
i2c-1	i2c       	i915 gmbus vga                  	I2C adapter
i2c-2	i2c       	i915 gmbus panel                	I2C adapter
i2c-3	i2c       	i915 gmbus dpc                  	I2C adapter
i2c-4	i2c       	i915 gmbus dpb                  	I2C adapter
i2c-5	i2c       	i915 gmbus dpd                  	I2C adapter
i2c-6	i2c       	DPDDC-C                         	I2C adapter
i2c-7	i2c       	DPDDC-D                         	I2C adapter

Perhaps i2cdetect should do a blind module load? Or at a minimum complain if the device files don't exist (and tell the user to load it). Note, it does complain with some options - but doesn't indicate the solution of the missing module:

# i2cdetect 0
Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory

Version-Release number of selected component (if applicable):
i2c-tools-3.1.0-2.fc18.x86_64

How reproducible:
Every time.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Fedora End Of Life 2013-12-21 11:34:10 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2014-02-05 19:20:49 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 3 Michal Minar 2014-06-05 07:32:05 UTC
Created attachment 902419 [details]
proposed patch for this issue

Comment 4 Michal Minar 2014-06-05 07:33:18 UTC
Attached is a patch solving this issue.

Comment 5 Michal Minar 2014-07-17 09:13:35 UTC
Created attachment 918644 [details]
updated patch

incorporated improvements proposed by Danielle Constantino

Comment 6 Gerd v. Egidy 2015-01-18 22:28:05 UTC
Still unfixed in Fedora 21

Comment 7 Fedora End Of Life 2015-05-29 08:53:59 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Fedora End Of Life 2015-06-29 11:46:28 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 Tim Hawkins 2015-10-06 01:36:53 UTC
This bug is still present in Fedora 22, and likely in Fedora 23 too.

Comment 10 Jaromír Cápík 2015-10-08 15:40:50 UTC
It seems that none of the tools from the i2c-tools package can work without the i2c-dev module and therefore we need to take care of the module auto-load. The easiest way how to achieve that is to put the i2c-dev module in the modules-load.d directory and call the modprobe in the %post, so that the module is loaded after the first package installation (I would skip it for updates). Hopefully it won't cause any harm when auto-loaded after each boot.

Comment 11 Fedora Update System 2015-10-08 16:18:42 UTC
i2c-tools-3.1.0-15.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-f659daaf1a

Comment 12 Fedora Update System 2015-10-08 16:18:46 UTC
i2c-tools-3.1.0-15.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-e794fee22b

Comment 13 Fedora Update System 2015-10-09 12:51:31 UTC
i2c-tools-3.1.0-15.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update i2c-tools'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-b1c8d93987

Comment 14 Fedora Update System 2015-10-09 13:54:27 UTC
i2c-tools-3.1.0-15.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update i2c-tools'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-e794fee22b

Comment 15 Fedora Update System 2015-10-09 13:55:15 UTC
i2c-tools-3.1.0-15.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update i2c-tools'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-f659daaf1a

Comment 16 Fedora Update System 2015-10-13 00:05:36 UTC
i2c-tools-3.1.0-15.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2015-11-10 23:19:55 UTC
i2c-tools-3.1.0-15.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2015-11-11 05:53:18 UTC
i2c-tools-3.1.0-15.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.