# [SOLVED] Kernel modules not loaded automatically by udev-233

## arcctgx

Hi Gentoo experts  :Wink: 

Recently I broke my installation, and I don't know what can I do to fix it. I need some assistance.

After a recent world upgrade, I noticed that at boot some of the services are not starting: alsasound, lm_sensors and net.enp0s14 (I'm on OpenRC, if that matters). alsasound and lm_sensors are not starting because the required kernel modules are not loaded automatically. net.enp0s14 is not starting because the network interface lost its "predictable" name, and it went back to being eth0 (no problem with device driver in this case, because it's compiled into the kernel, not as a module).

There is no problem with loading the kernel modules with modprobe, and once it's done the lm_sensors and alsasound can be started manually. For the network interface, as a temporary workaround I have created net.eth0 service (by making a symlink net.eth0 -> net.lo inside /etc/init.d/ just like with enp0s14), and added it to the default runlevel.

When I started X11, I noticed that my mouse and keyboard were not working. The system was otherwise responsive (I was able to ssh from a different machine and kill the XServer).

In this last world update, sys-fs/udev was upgraded from 225-r1 to 233. Loading appropriate kernel modules is udev responsibility, right? So maybe this udev update is the root cause of my problems?

I thought about reverting udev to previous version by setting a mask >sys-fs/udev-225-r1 in /etc/portage/package.mask. But when I did emerge -auvDN @world again, it tried to pull eudev, which resulted in a conflict:

```
# emerge -auvDN @world

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild     U  ] virtual/perl-ExtUtils-MakeMaker-7.100.200_rc-r1::gentoo [7.100.200_rc::gentoo] 0 KiB

[ebuild     U  ] virtual/perl-Test-Harness-3.360.100_rc-r1::gentoo [3.360.100_rc::gentoo] 0 KiB

[ebuild     U  ] virtual/perl-File-Spec-3.630.100_rc-r1::gentoo [3.630.100_rc::gentoo] 0 KiB

[ebuild     U  ] virtual/perl-Storable-2.560.100_rc-r1::gentoo [2.560.100_rc::gentoo] 0 KiB

[ebuild   R    ] media-gfx/imagemagick-6.9.8.6:0/6.9.8.6::gentoo  USE="X bzip2 corefonts cxx jpeg lcms lzma openmp pango png svg tiff truetype xml zlib -djvu -fftw -fontconfig -fpx -graphviz -hdri -jbig -jpeg2k -lqr (-opencl) -openexr -perl -postscript -q32 -q8 -raw -static-libs {-test} -webp -wmf (-autotrace%)" 0 KiB

[ebuild     UD ] sys-fs/udev-225-r1::gentoo [233::gentoo] USE="acl kmod (-selinux) -static-libs%" 3,788 KiB

[ebuild  N     ] sys-fs/eudev-3.1.5::gentoo  USE="hwdb introspection kmod -rule-generator (-selinux) -static-libs {-test}" 1,705 KiB

[ebuild     U  ] sys-auth/consolekit-1.1.2::gentoo [1.1.0-r1::gentoo] USE="acl pam policykit udev%* -cgroups -debug -doc -evdev% -pm-utils (-selinux) {-test}" 1,100 KiB

[blocks B      ] sys-fs/udev ("sys-fs/udev" is blocking sys-fs/eudev-3.1.5)

Total: 8 packages (5 upgrades, 1 downgrade, 1 new, 1 reinstall), Size of downloads: 6,592 KiB

Conflict: 1 block (1 unsatisfied)

 * Error: The above package list contains packages which cannot be

 * installed at the same time on the same system.

  (sys-fs/udev-225-r1:0/0::gentoo, ebuild scheduled for merge) pulled in by

    >=sys-fs/udev-217 required by (virtual/udev-217:0/0::gentoo, installed)

    sys-fs/udev required by @selected

  (sys-fs/eudev-3.1.5:0/0::gentoo, ebuild scheduled for merge) pulled in by

    >=sys-fs/eudev-1.3:0/0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] (>=sys-fs/eudev-1.3:0/0[abi_x86_32(-)]) required by (virtual/libudev-232:0/1::gentoo, installed)
```

And I'm not sure if this is the correct way to address this issue anyway. I'd rather fix the issue with udev-233.

I went through the contents of /var/log/, but didn't find out any enlightening error messages related to udev. Only the prints that said that services could not be started, due to kernel modules not being loaded (duh). Could someone give me some pointers? How can I diagnose this further? Is there something I should have done prior to updating udev to this version? I didn't see anything in news items, nor here https://wiki.gentoo.org/wiki/Udev/Upgrade_Guide

FWIW, here's my emerge --info:

```
# emerge --info

Portage 2.3.6 (python 2.7.12-final-0, default/linux/x86/13.0/desktop, gcc-5.4.0, glibc-2.23-r4, 3.4.113-gentoo-r1 i686)

=================================================================

System uname: Linux-3.4.113-gentoo-r1-i686-AMD_Athlon-TM-_XP_2000+-with-gentoo-2.3

KiB Mem:     1034160 total,     28444 free

KiB Swap:     514044 total,    513888 free

Timestamp of repository gentoo: Sun, 23 Jul 2017 00:45:01 +0000

sh bash 4.3_p48-r1

ld GNU ld (Gentoo 2.28 p1.2) 2.28

app-shells/bash:          4.3_p48-r1::gentoo

dev-lang/perl:            5.24.1-r2::gentoo

dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo

dev-util/cmake:           3.7.2::gentoo

dev-util/pkgconfig:       0.28-r2::gentoo

sys-apps/baselayout:      2.3::gentoo

sys-apps/openrc:          0.26.3::gentoo

sys-apps/sandbox:         2.10-r3::gentoo

sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo

sys-devel/automake:       1.15-r2::gentoo

sys-devel/binutils:       2.28-r2::gentoo

sys-devel/gcc:            5.4.0-r3::gentoo

sys-devel/gcc-config:     1.7.3::gentoo

sys-devel/libtool:        2.4.6-r3::gentoo

sys-devel/make:           4.2.1::gentoo

sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)

sys-libs/glibc:           2.23-r4::gentoo

Repositories:

gentoo

    location: /usr/portage

    sync-type: rsync

    sync-uri: rsync://rsync.pl.gentoo.org/gentoo-portage

    priority: -1000

arcctgx

    location: /home/portage/overlay_arcctgx

    masters: gentoo

ACCEPT_KEYWORDS="x86"

ACCEPT_LICENSE="* -@EULA"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=athlon-xp -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CXXFLAGS="-O2 -march=athlon-xp -pipe"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -march=i686 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"

FFLAGS="-O2 -march=i686 -pipe"

GENTOO_MIRRORS="rsync://gentoo.prz.rzeszow.pl/gentoo http://gentoo.prz.rzeszow.pl"

LANG="pl_PL"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"

PORTAGE_TMPDIR="/home/portage/tmp"

USE="3dnow 3dnowext X a52 acl acpi alsa berkdb bzip2 cairo cdda cdr cleartype cli consolekit corefonts crypt cxx dbus dri dts dvd dvdr dvi encode exif fam ffmpeg firefox flac fortran gadu gdbm geoip gif glamor gpm gtk iconv jpeg lcms libnotify lm_sensors lzma mad mmx mmxext mng modules mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pdf png policykit ppds readline reiserfs sdl seccomp session sse ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis x264 x86 xattr xcb xml xv xvid zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="vesa nv nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
```

Last edited by arcctgx on Wed Aug 30, 2017 11:25 pm; edited 1 time in total

----------

## Tony0945

No help here for your udev/eudev problem, but to load your modules add a line(s) to /etc/conf.d/modules like this:

```

modules="radeon e1000e snd_hda_intel acpi_cpufreq ohci_pci ehci_pci"

modules+=" k10temp f71882fg "
```

Using your own modules, of course.

In the past all modules were loaded without specifying them. I do not know when or why the change was made.

EDIT:

And make sure to

"rc-update add modules boot"

----------

## Syl20

 *arcctgx wrote:*   

> I thought about reverting udev to previous version by setting a mask >sys-fs/udev-225-r1 in /etc/portage/package.mask. But when I did emerge -auvDN @world again, it tried to pull eudev, which resulted in a conflict:
> 
> ```
> (snip)
> 
> ...

 

It seems you also need to mask >=virtual/libudev-232.

Anyway, why not migrating to eudev ?

----------

## arcctgx

 *Syl20 wrote:*   

> Anyway, why not migrating to eudev ?

 

I'm not opposed to using eudev. I'm using it in Slackware installation on another machine, and I've never had any trouble with it.

I guess I have never given it much thought. My Gentoo was installed in April 2011, and has never been reinstalled. That was before udev -> eudev fork. So I just always had udev, and it was fine... Until now, that is. If there ever was a notice that switching to eudev is preferred, I must've missed it.

But, come to think of it, since I'm running OpenRC I actually *should* migrate to eudev, right?

----------

## Josef.95

Hm yes, sounds like udev is not runing :-/

Please take a look on 

```
/etc/init.d/udev status

rc-update show sysinit

and

ps aux | grep udev
```

And yes, for a downgrade test 

```
emerge -av1 =sys-fs/udev-225-r1 =virtual/libudev-215-r1
```

 should work.

And btw, your Kernel (3.4.113-gentoo-r1) is very old,

I'm not sure if these compatible with current udev versions.

(I think, a Kernel update would be fine :))

----------

## josephg

 *arcctgx wrote:*   

> But, come to think of it, since I'm running OpenRC I actually *should* migrate to eudev, right?

 

if you're not running systemd, you should migrate away from udev. gentoo standard is openrc with eudev.

----------

## Tony0945

 *Tony0945 wrote:*   

> In the past all modules were loaded without specifying them. I do not know when or why the change was made.

 

Ran across it by accident yesterday when reading the wiki. The change is because I switched from eudev to mdev.

https://wiki.gentoo.org/wiki/Mdev  Bookmark it in case udev/eudev gives too many problems. But be sure to migrate at least to eudev. Straight udev will keep trying to pull systemd onto your system. Like a virus.

----------

## arcctgx

 *Josef.95 wrote:*   

> Hm yes, sounds like udev is not runing :-/

 

Actually, looks like it is. When I was looking through the contents /var/log/ I didn't see any error messages related to udev failure. And:

```
# /etc/init.d/udev status 

 * status: started

# rc-update show sysinit

                devfs | sysinit

                dmesg | sysinit

     opentmpfiles-dev | sysinit

                sysfs | sysinit

                 udev | sysinit

         udev-trigger | sysinit

# ps aux | grep udev

root       389  0.0  0.0   3628   480 ?        Ss   Jul22   0:00 /lib/systemd/systemd-udevd --daemon
```

And yes, the kernel is a bit dated... But still supported by Gentoo, as far as I know.  :Wink: 

Please don't laugh, but it's the last kernel to support official drivers of my old NVIDIA GPU... And nouveau just doesn't work well for me on this machine.

I will perform udev downgrade test as Josef.95 suggested, and try to migrate to eudev. But I'm currently away from that machine, and I don't want to perform such changes remotely. I'll get back with results as soon as I have anything meaningful to say (even if it's just "hey, eudev works fine!", which would be the best outcome IMO).

Thank you all for your help so far.

----------

## arcctgx

OK, looks like it's working now.

First I went back to udev-225-r1, as Josef.95 suggested. After reboot things went back to normal: ALSA modules were loaded, my "predictable" network interface was there again, and peripherals were working in X. Well, almost: modules required by lm_sensors are still not loaded, but I believe this is an unrelated issue.

After this downgrade test I migrated to eudev by following the procedure outlined here: https://forums.gentoo.org/viewtopic-p-7369696.html#7369696. The difference was that etc-update didn't report any configuration files that needed updating, and also emerge @preserved-rebuild didn't indicate that anything needs rebuilding.

So, almost complete success. As a workaround for the lm_sensors module issue, I added the required modules to /etc/conf.d/modules, as Tony0945 suggested. I'll investigate this issue further, and if I can't find a solution I'll start another thread.

Thank you all for assistance.

----------

