# [SOLVED] Devices not recognised after a reboot after emerge

## ipic

It seemed like a simple update emerge, followed by a reboot. After the reboot, all sorts of devices just aren't being picked up.

Here is the list of packages updated since the last reboot (which had no problems)

```
     Mon Aug 11 18:21:19 2014 >>> dev-libs/fribidi-0.19.6

     Mon Aug 11 18:22:57 2014 >>> dev-perl/perl-tk-804.32.0

     Tue Aug 12 17:16:13 2014 >>> sys-kernel/gentoo-sources-3.14.16

     Tue Aug 12 17:40:12 2014 >>> app-emulation/virtualbox-modules-4.3.14

     Tue Aug 12 17:40:16 2014 >>> net-dialup/ppp-2.4.5-r3

     Tue Aug 12 18:00:45 2014 >>> sys-libs/glibc-2.19-r1

     Wed Aug 13 20:55:32 2014 >>> sys-kernel/genkernel-3.4.51.1

     Wed Aug 13 20:55:51 2014 >>> net-dialup/ppp-2.4.7

     Wed Aug 13 21:02:45 2014 >>> dev-db/mariadb-10.0.13

     Thu Aug 14 17:16:05 2014 >>> www-plugins/adobe-flash-11.2.202.400

     Thu Aug 14 17:16:12 2014 >>> www-client/google-chrome-36.0.1985.143_p1

     Fri Aug 15 18:04:48 2014 >>> app-portage/g-cpan-0.16.5

     Fri Aug 15 18:05:30 2014 >>> dev-db/sqlite-3.8.5

     Fri Aug 15 18:06:03 2014 >>> app-text/dos2unix-6.0.5

     Fri Aug 15 18:06:16 2014 >>> sys-kernel/genkernel-3.4.51.1-r1

     Fri Aug 15 18:06:23 2014 >>> net-libs/serf-1.3.6

     Fri Aug 15 18:06:33 2014 >>> dev-libs/newt-0.52.15

     Fri Aug 15 18:06:39 2014 >>> net-misc/rdesktop-1.8.2

     Fri Aug 15 18:06:56 2014 >>> sys-boot/unetbootin-608

     Fri Aug 15 18:07:07 2014 >>> media-libs/mlt-0.9.0

     Fri Aug 15 18:10:45 2014 >>> dev-libs/boost-1.52.0-r7

     Fri Aug 15 18:21:19 2014 >>> virtual/mysql-5.6-r1

     Sun Aug 17 08:25:01 2014 >>> sys-kernel/genkernel-3.4.51.1

     Mon Aug 18 09:15:58 2014 >>> sys-kernel/genkernel-3.4.51.2

     Thu Aug 21 17:52:59 2014 >>> dev-perl/XML-NamespaceSupport-1.110.0-r1

     Thu Aug 21 17:53:08 2014 >>> dev-perl/XML-SAX-Base-1.80.0-r1

     Thu Aug 21 17:53:20 2014 >>> dev-perl/Digest-SHA1-2.130.0-r1

     Thu Aug 21 17:53:24 2014 >>> dev-perl/MP3-Info-1.240.0-r1

     Thu Aug 21 17:53:28 2014 >>> dev-perl/Unicode-String-2.90.0-r1

     Thu Aug 21 17:53:33 2014 >>> dev-perl/HTML-Tagset-3.200.0-r1

     Thu Aug 21 17:53:38 2014 >>> net-libs/libgadu-1.11.4

     Thu Aug 21 17:53:41 2014 >>> dev-perl/XML-LibXML-2.1.400-r1

     Thu Aug 21 17:53:50 2014 >>> dev-perl/XML-Simple-2.200.0-r1

     Thu Aug 21 17:53:53 2014 >>> dev-perl/HTML-Parser-3.710.0-r1

     Thu Aug 21 17:54:42 2014 >>> sys-fs/lvm2-2.02.109

     Thu Aug 21 17:57:36 2014 >>> app-crypt/mit-krb5-1.12.2

     Thu Aug 21 17:57:58 2014 >>> net-libs/serf-1.3.7

     Thu Aug 21 17:58:04 2014 >>> dev-perl/DBD-mysql-4.20.0-r1

     Thu Aug 21 18:05:54 2014 >>> dev-vcs/subversion-1.8.10

     Thu Aug 21 18:13:10 2014 >>> dev-games/openscenegraph-3.0.1-r1

     Thu Aug 21 19:06:24 2014 >>> x11-drivers/xf86-input-keyboard-1.7.0

     Thu Aug 21 19:06:28 2014 >>> x11-drivers/xf86-input-mouse-1.9.0

     Thu Aug 21 19:06:31 2014 >>> x11-drivers/xf86-input-joystick-1.6.2

     Thu Aug 21 19:06:34 2014 >>> x11-drivers/xf86-input-evdev-2.8.2

     Thu Aug 21 19:06:38 2014 >>> x11-drivers/xf86-video-ati-7.3.0
```

It seems to me that nothing in there should cause any issues. However, when I rebooted, I noticed that the usual delay after the boot prompt that says waiting for devices (sorry can't remember exact words) doesn't happen any more. It just flashed past. After the boot finished, Xorg failed to pick up the keyboard and mouse. I hacked past that, and then found that no DVB drivers had been recognised. lsmod showed none had been loaded. So I did a manual modprobe which yielded this:

```
Aug 21 20:57:03 ian2 kernel: [ 4810.442934] dvb-usb: found a 'Hauppauge Nova-T MyTV.t' in cold state, will try to load a firmware

Aug 21 20:57:03 ian2 kernel: [ 4810.452644] dvb-usb: downloading firmware from file 'dvb-usb-dib0700-1.20.fw'

Aug 21 20:57:03 ian2 kernel: [ 4810.519298] dib0700: firmware started successfully.

Aug 21 20:57:04 ian2 kernel: [ 4811.020086] dvb-usb: found a 'Hauppauge Nova-T MyTV.t' in warm state.

Aug 21 20:57:04 ian2 kernel: [ 4811.020268] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.

Aug 21 20:57:04 ian2 kernel: [ 4811.020502] DVB: registering new adapter (Hauppauge Nova-T MyTV.t)

Aug 21 20:57:04 ian2 kernel: [ 4811.240612] usb 8-1.1: DVB: registering adapter 0 frontend 0 (DiBcom 7000PC)...

Aug 21 20:57:04 ian2 kernel: [ 4811.459074] DiB0070: successfully identified

Aug 21 20:57:04 ian2 kernel: [ 4811.539068] Registered IR keymap rc-dib0700-rc5

Aug 21 20:57:04 ian2 kernel: [ 4811.539632] input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:09.0/0000:02:00.0/usb8/8-1/8-1.1/rc/rc0/input14

Aug 21 20:57:04 ian2 kernel: [ 4811.539836] rc0: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:09.0/0000:02:00.0/usb8/8-1/8-1.1/rc/rc0

Aug 21 20:57:04 ian2 kernel: [ 4811.540247] dvb-usb: schedule remote query interval to 50 msecs.

Aug 21 20:57:04 ian2 kernel: [ 4811.540255] dvb-usb: Hauppauge Nova-T MyTV.t successfully initialized and connected.

Aug 21 20:57:04 ian2 kernel: [ 4811.540730] usbcore: registered new interface driver dvb_usb_dib0700
```

However, there is still no DVB video device appearing in /dev, so nothing for video application to pick up and play.

I must admin I have not been paying attention to the udev vs systemd ongoings. I use rc-init for bootup, but do not have udev installed (masked in favour of systemd). I may be doing something very stupid in this area.

I've run out of ideas - can anyone give me a prod of something to look at?

Something very basic has gone missing that means devices are not being picked up (video above is just one example). 

Thanks,

IanLast edited by ipic on Sun Aug 24, 2014 11:14 am; edited 1 time in total

----------

## eccerr0r

When you say you're running rc-init for bootup, I'm sort of confused, if you're using systemd for bootup, you should be using systemd for bootup... though if you don't start systemd, init/OpenRC should be used (but it should still load in all modules...)

Did you build a new kernel recently (though it looks like gentoo-sources-3.14.16 got installed)?  Did you start with a fresh .config and perhaps missed a few settings?

----------

## ipic

 *eccerr0r wrote:*   

> When you say you're running rc-init for bootup, I'm sort of confused, if you're using systemd for bootup, you should be using systemd for bootup... though if you don't start systemd, init/OpenRC should be used (but it should still load in all modules...)
> 
> Did you build a new kernel recently (though it looks like gentoo-sources-3.14.16 got installed)?  Did you start with a fresh .config and perhaps missed a few settings?

 

The problem started just after an emerge and reboot, no kernel change. I always carry my current config forward top a new kernel build.

I'm sorry if I can't get all the systemd terminology. I do *not* use systemd to boot, I use the /etc/init.d style, whatever that is called.

I was happily using udev until it got replaced by systemd - so that is why systemd is around (Gnome dependency apparently).

I have been scouring documentation, and observing boot behaviour. It appears to me that whatever used to cause "Processing uevents.." to happen early in the boot sequence has disappeared.

Any idea how I can force that to happen?

Documentation on systemd as a udev replacement is a useful as a chocolate teapot...

Thanks

Ian

----------

## Hu

```
/etc/init.d/udev:       ebegin "Populating /dev with existing devices through uevents"

/etc/init.d/udev:       ebegin "Waiting for uevents to be processed"

```

Since you say you allowed systemd to come in, I suspect that you have somehow disabled use of udev and not enabled a replacement.  For most systems, you need to run udev, eudev, or one of the close variants of those.

----------

## ipic

 *Hu wrote:*   

> 
> 
> ```
> /etc/init.d/udev:       ebegin "Populating /dev with existing devices through uevents"
> 
> ...

 

I don't have either of those:

```

ian2 ~ # grep -r uevent /etc/init.d

ian2 ~ # 
```

I can't install udev since it clashes with systemd. I can't uninstall systemd since I use Gnome applications and they require it.

I wonder...

```

ian2 ~ # locate uevent

/usr/src/linux-3.14.16-gentoo/Documentation/device-mapper/dm-uevent.txt

/usr/src/linux-3.14.16-gentoo/Documentation/filesystems/gfs2-uevents.txt

/usr/src/linux-3.14.16-gentoo/drivers/md/.dm-uevent.o.cmd

/usr/src/linux-3.14.16-gentoo/drivers/md/dm-uevent.c

/usr/src/linux-3.14.16-gentoo/drivers/md/dm-uevent.h

/usr/src/linux-3.14.16-gentoo/drivers/md/dm-uevent.o

/usr/src/linux-3.14.16-gentoo/include/config/uevent

/usr/src/linux-3.14.16-gentoo/include/config/dm/uevent.h

/usr/src/linux-3.14.16-gentoo/include/config/uevent/helper

/usr/src/linux-3.14.16-gentoo/include/config/uevent/helper/path.h

/usr/src/linux-3.14.16-gentoo/lib/.kobject_uevent.o.cmd

/usr/src/linux-3.14.16-gentoo/lib/kobject_uevent.c

/usr/src/linux-3.14.16-gentoo/lib/kobject_uevent.o

ian2 ~ # 
```

Perhaps I should be seeing something called uevent in /lib/modules. I recall seeing an option in the kernel to enable sysfs for legacy applications - I'll try that (without much hope, since it wasn't a kernel change that caused this).

Thanks

Ian

----------

## eccerr0r

If you have systemd installed, are you running it?  It should do what you need to do too.

try running "systemctl" by itself, if this returns a list of services, then systemd is running, and it should provide udev services.  Can try to debug that instead.  If it is found but gives an error, need to make sure systemd is running...

----------

## ipic

 *eccerr0r wrote:*   

> If you have systemd installed, are you running it?  It should do what you need to do too.
> 
> try running "systemctl" by itself, if this returns a list of services, then systemd is running, and it should provide udev services.  Can try to debug that instead.  If it is found but gives an error, need to make sure systemd is running...

 

```

ian2 ~ # systemctl

Failed to get D-Bus connection: Unknown error -1

ian2 ~ #
```

Nothing with systemd in its name is running:

```
ian2 ~ # ps -ef | grep system

message+  4719     1  0 09:45 ?        00:00:00 /usr/bin/dbus-daemon --system

ipic      8769  8697  0 14:52 ?        00:00:00 /usr/lib/xfce4/panel/wrapper /usr/lib/xfce4/panel/plugins/libactions.so 2 23068714 actions Action Buttons Log out, lock or other system actions 

root      9477  9403  0 14:56 pts/1    00:00:00 grep --colour=auto system

ian2 ~ # 
```

I would love to start it - but how?

```
ian2 ~ # grep -r systemd /etc/init.d/

ian2 ~ # 
```

Thanks

Ian

----------

## eccerr0r

You'll need to tell your boot loader to use systemd instead of init.

Go to your bootloader config (grub, etc.) and copy the boot lines so you have a backup and a new entry for systemd.  Then add "init=/usr/lib/systemd/systemd" to your kernel command line.  And then reboot your computer.  Make sure you get the prerequisites (or at least have the fallback bootloader options.)

The details are at http://wiki.gentoo.org/wiki/Systemd

If you have systemd installed but don't want to run it, it should still be 'possible' to fix the problem you have, but I haven't tried this situation yet (and it's not quite a supported configuration)...  In this case, you should look into trying to uninstall systemd.

----------

## ipic

 *eccerr0r wrote:*   

> You'll need to tell your boot loader to use systemd instead of init.

 

I do not want to do that. I am happy with OPENRC. How can I get udev back and not have to completely reconfigure the whole system I have bult up over 10 years?

Thanks

Ian

----------

## eccerr0r

In this case I can only now suggest just mask systemd and setting USE=-systemd.  Then do a world update.  You will then see a mask issue on systemd.  From here, you're on your own to fix the dependencies, which works pretty much the same way as fixing any other Gentoo blocker issue.  This should then get the udev package installed.

----------

## ipic

 *eccerr0r wrote:*   

> In this case I can only now suggest just mask systemd and setting USE=-systemd.  Then do a world update.  You will then see a mask issue on systemd.  From here, you're on your own to fix the dependencies, which works pretty much the same way as fixing any other Gentoo blocker issue.  This should then get the udev package installed.

 

Why should I have to do that? A week ago OpenRC was working fine with systemd udev components, I did a simple emerge @world and something broke it. You are suggesting I throw away all the Gnome apps I want to use (since they all depend on the damn thing as well).

Documentation on the web implies that OpenRC can work where systemd is present. Has Gentoo decided to take that choice away? Without telling anyone via a news item?

----------

## eccerr0r

They fixed Gnome dependencies to be able to be used without systemd installed, so there should be no issue there.

The problem is that though it should work... it's unsupported... no idea how it will break.  Most people either go one way or the other and not have a half-installed system.  It's asking for trouble.

I just tried rebooting my system into OpenRC with systemd installed.  It didn't start X11 properly and blanked my screen, freezing the console.  When logging in remotely, I noticed it did load modules...

So you're saying no modules at all gets loaded on fresh boot?  Are you up to date on all updates including that kmod change?

----------

## ipic

 *eccerr0r wrote:*   

> They fixed Gnome dependencies to be able to be used without systemd installed, so there should be no issue there.

 

I decided to try this approach. I didn't know that it would work, so thanks for the advice. Having said that - they have not fixed it completely. There was no way to get the base Gnome package to not want systemd, so that rules out anything that needs it. In my case the packages I lost were gvim and epiphany. gvim has a more or less direct alternative in qvim, but there is no replacement for empathy (I used it for a SIP phone and connecting to Google hangouts). Pity.

For the record, I followed this process:

 - Added the following the make.conf: USE="-gnome -systemd -gdata udev"

 - Made sure that /etc/portage/package.use contained no instances of "gnome" "systemd" "gdata" or "udev" against specific packages

 - Added systemd to /etc/portage/package.mask, and removed udev

 - emerge @world then  complains about needing systemd because of installed packages. For most adjustments to /etc/portage/package.use got rid of dependencies that would cause gnome to be needed. Finally (this may be a bit brutal) I unmerged systemd, and then gnome-shell (by examining lots of dependencies using emerge --depclean). After that I got a clean emerge list.

 - emerge @world pulled in udev and re-emerged a bunch of stuff

 - emerge --depclean then removed all of gnome (or at least most of it from what I could see - about 115 packages)

 - revdep-rebuild then caught everything that got broken, with the exception of google-chrome for some reason. Manual emerge of google-chrome fixed that problem.

 - Added udev to boot runlevel.

Reboot, and I have my system back   :Very Happy:  Quick check /dev/video devices are present. Checked it all out, can now print, produce sound, and watch DVB.

 *eccerr0r wrote:*   

> So you're saying no modules at all gets loaded on fresh boot?  Are you up to date on all updates including that kmod change?

 

The modules would load if I loaded them manually through modprobe. The problem (I think) was that nothing was picking up the uevents generated, and hence no device entries were created in /dev. Re-instating udev cured that problem.  

I am really puzzled by this approach by Gnome and systemd. Why break something that has worked since the dawn of time (yes, I was around when original BSD started all this off!). From what I can see systemd is from the same stable as pulseaudio - so perhaps not surprising that it is such a pile of *****. Why the Gnome guys should be taken in is harder to explain.

I am marking this topic as [SOLVED]. Should be Half Solved, since I got back a working system, but I had too loose a substantial portion of it in the process. So not really a solution.

Thanks for all who assisted.

Ian

----------

## ipic

 *ipic wrote:*   

> I decided to try this approach. I didn't know that it would work, so thanks for the advice. Having said that - they have not fixed it completely. There was no way to get the base Gnome package to not want systemd, so that rules out anything that needs it. In my case the packages I lost were gvim and epiphany. gvim has a more or less direct alternative in qvim, but there is no replacement for empathy (I used it for a SIP phone and connecting to Google hangouts). Pity.

 

I take that back. It was getting late last night, and I was trying to get the whole replacement done in one go. Cold light of day, and I looked a bit more carefully. I think that the existence of previous packages (subsequently removed by emerge --depclean) caused issues for gvim and empathy.

Having cleaned everything out, both empathy and gvim allowed for a -gnome (and a few others) use flag that allowed them to install. So, I have them back, without Gnome, and using udev.

Full solution after all   :Very Happy: 

Thanks again for the help.

Ian

----------

