I have an older system where everything works fine, and a newer system where it doesn't. To be specific: X does not start up.

I've traced down the error to the fact that update-alternatives for some reason is in manual mode for the groups glx and nvidia.

This from the working system:

update-alternatives --display glx   
glx - auto mode
  link currently points to /usr/lib/nvidia
/usr/lib/mesa-diverted - priority 5
  slave glx--libGL.so.1-i386-linux-gnu: /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1
/usr/lib/nvidia - priority 100
  slave glx--libGL.so.1-i386-linux-gnu: /usr/lib/i386-linux-gnu/nvidia/libGL.so.1
  slave glx--libXvMCNVIDIA.so.1-i386-linux-gnu: /usr/lib/i386-linux-gnu/nvidia/libXvMCNVIDIA.so.1
  slave glx--libXvMCNVIDIA_dynamic.so.1-i386-linux-gnu: /usr/lib/i386-linux-gnu/nvidia/libXvMCNVIDIA_dynamic.so.1
  slave glx--libnvidia-cfg.so.1-i386-linux-gnu: /usr/lib/i386-linux-gnu/nvidia/libnvidia-cfg.so.1
  slave glx--linux-libglx.so: /usr/lib/nvidia/libglx.so
  slave glx--nvidia-bug-report.sh: /usr/lib/nvidia/nvidia-bug-report.sh
  slave glx--nvidia_drv.so: /usr/lib/nvidia/nvidia_drv.so
Current 'best' version is '/usr/lib/nvidia'.

And this from the system that has the error:

update-alternatives --display glx  
glx - manual mode
  link currently points to /usr/lib/mesa-diverted
/usr/lib/mesa-diverted - priority 5
  slave glx--libGL.so.1-i386-linux-gnu: /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1
/usr/lib/nvidia - priority 100
  slave glx--libGL.so.1-i386-linux-gnu: /usr/lib/i386-linux-gnu/nvidia/libGL.so.1
  slave glx--libXvMCNVIDIA.so.1-i386-linux-gnu: /usr/lib/i386-linux-gnu/nvidia/libXvMCNVIDIA.so.1
  slave glx--libXvMCNVIDIA_dynamic.so.1-i386-linux-gnu: /usr/lib/i386-linux-gnu/nvidia/libXvMCNVIDIA_dynamic.so.1
  slave glx--libnvidia-cfg.so.1-i386-linux-gnu: /usr/lib/i386-linux-gnu/nvidia/libnvidia-cfg.so.1
  slave glx--linux-libglx.so: /usr/lib/nvidia/libglx.so
  slave glx--nvidia-bug-report.sh: /usr/lib/nvidia/nvidia-bug-report.sh
  slave glx--nvidia_drv.so: /usr/lib/nvidia/nvidia_drv.so
Current 'best' version is '/usr/lib/nvidia'.

As you can see, for some reason the glx group is set to manual. This is also the case for the nvidia group. All the priorities are set correctly.

Now, I know a manual solution (that would be running 'update-alternatives --config glx' correctly) since my system is automatically installed and supposed to run perfectly afterwards (just look the older system). So I want to understand the root cause.

You should know this problem is already present right after a fresh install. No manual intervention happened. I'm trying to understand why and when this set to manual mode happens.

The manpage of update-alternatives implies that only a --set or --config switches a group to manual mode. However I cannot find anything that executes any of those commands.

The only difference between the two system, I believe, is that the newer uses more recent packages from Debian Wheezy. I've already compared all the postinst maintainer scripts between the older and newer versions, and nothing has changed there in the relevant packages.

I don't know a lot about update-alternatives so I hope someone can help me.

I've already compared all the postinst maintainer scripts between the older and newer versions, and nothing has changed there in the relevant packages.

It could be a very old version of the package, or other package, or you in your attempts to repair it did. There are too many possible suspects (you included) that is difficult to find exactly which was really the process that changed it... but at least you can know when. update alternatives has a log file, in /var/log/alternatives.log. If you hasn't have your system for too long installed is possible that the answer of when is there and from there you can figure out who. Your premises are all correct.

up vote 0 down vote accepted

I found the answers myself. Apparantly in an update of Debian live-build hook script were added to set the glx and nvidia link groups. We use live-build to create the system I was talking about. An example /usr/share/live/build/hooks/0320-update-glx-alternative.chroot

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.