Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic:  Solution for broken alternatives link group with nvidia-driver  (Read 6666 times)

Offline musca

  • User
  • Posts: 725
  • sid, fly high!
Hello dear Nvidia users,

Geforce 6xxx and 7xxx are now legacy and their users find themselves thrown onto a commandline when upgrading their drivers to latest releases. Here is the clean downgrade procedure. We don't touch the device section for the driver "nvidia" in your xorg.conf.d/.
 
List your installed nvidia*-packages with this command:
# dpkg -l | awk '/^ii.*nvidia/ {print $2}'
glx-alternative-nvidia
libgl1-nvidia-glx:amd64
nvidia-alternative
nvidia-driver
nvidia-installer-cleanup
nvidia-kernel-common
nvidia-kernel-dkms
nvidia-support
nvidia-vdpau-driver:amd64
xserver-xorg-video-nvidia

You can now purge them with this command. But beware: don't purge your gnome desktop! Read the output before you continue!
You will see a warning dialog about removal of an active glx-driver. This is fine as we dont reboot in this state.
Code: [Select]
apt-get purge $(dpkg -l | awk '/^ii.*nvidia/ {print $2}') Now install your desired driver e.g. nvidia-legacy-304xx-driver:
Code: [Select]
apt-get install nvidia-legacy-304xx-driver
Attention please!
Switching between current and legacy driver release seems to sometimes break the alternatives link group. Your xserver still cannot start in this state. Check the link with
Code: [Select]
ls -l /usr/lib/xorg/modules/drivers/nvidia_drv.soIf the link is missing, repeat the procedure from above to fix this or create the link manually.

I want to provide examples for reference here, just in case someone needs to manually set a link.

This is a link group for the package "nvidia-driver"  (here version 319.60-2)
Code: [Select]
/usr/lib/xorg/modules/drivers/nvidia_drv.so
  -> /etc/alternatives/glx--nvidia_drv.so
   -> /usr/lib/nvidia/current/nvidia_drv.so

This is a link group for the package "nvidia-legacy-304xx-driver"
Code: [Select]
/usr/lib/xorg/modules/drivers/nvidia_drv.so
 -> /etc/alternatives/glx--nvidia_drv.so
  -> /usr/lib/nvidia/nvidia_drv.so
   -> /etc/alternatives/nvidia--nvidia_drv.so
    -> /usr/lib/nvidia/legacy-304xx/nvidia_drv.so


Have 3D fun with Nvidia!

greetings
musca
„Es irrt der Mensch, solang er strebt.“  (Goethe, Faust)

Offline piper

  • User
  • Posts: 1.785
  • we are the priests ... of the temples of syrinx
Thanks musca, one of my machines has a nvidia 7900 in it and I haven't done a du in 3-4 days on that one yet, this will come in handy within the next hour :)
Free speech isn't just fucking saying what you want to say, it's also hearing what you don't want to fucking hear

I either give too many fucks or no fucks at all, it's like I cannot find a middle ground for a moderate fuck distribution, it's like what the fuck

Offline DeepDayze

  • User
  • Posts: 457
I still have one system with a 7900 in it as well and this tip will certainly come in handy

Offline ralul

  • User
  • Posts: 1.814
My old Apple MacMini has a nvidia card capable of new proprietary Nvidia-331. These brand new Debian experimental packages work very well for me, no issues building with linux-3.11.6:
Code: [Select]
# aptitude search '~V331'|grep -e'^i'|sed -e's/^....//' -e's/ .*$//'
libgl1-nvidia-glx
libnvidia-ml1
libxnvctrl0
nvidia-alternative
nvidia-detect
nvidia-driver
nvidia-glx
nvidia-kernel-dkms
nvidia-settings
nvidia-vdpau-driver
xserver-xorg-video-nvidia
Remember all from exeperimental!
experiencing siduction runs better than my gentoo makes me know I know nothing

Offline musca

  • User
  • Posts: 725
  • sid, fly high!
remark on 'aptitude search'
« Reply #4 on: 2013/11/05, 14:41:50 »
Hey ralul,

thanks for your feedback, good to know nvidia-driver version 331 (beta) is in good shape.

A little remark to aptitude search '~V331' :  Your query doesn't simply list packages of version 331, but it lists packages of any version which also have a version of 331 in any of your repos. In other words: The packages on the list exist in version 331, but they don't need to be installed in that version.  On my system i didn't install nvidia 331 but 319.60 and your command still lists the packages:
Code: [Select]
$ aptitude search '~V331'|grep -e'^i'|sed -e's/^....//' -e's/ .*$//'
libgl1-nvidia-glx
libxnvctrl0
nvidia-alternative
nvidia-driver
nvidia-kernel-dkms
nvidia-vdpau-driver
xserver-xorg-video-nvidia

Luckily aptitude can "Narrow"  (~S)  with a filter (~i) the results of a search pattern (~V319) to installed packages  like this. I also reduced its output to just packagename with a formatstring so no grep and sed is needed:
Code: [Select]
$ aptitude search '~S~i~V319' -F '%p'
libgl1-nvidia-glx
libxnvctrl0
nvidia-alternative
nvidia-driver
nvidia-kernel-dkms
nvidia-vdpau-driver
xserver-xorg-video-nvidia

Selecting the packages only by versionnumbers does not allways give the desired result. Here i filtered by description, suppressed the Nouveau-driver by its versionnumber and sort in order of ascending version.
Code: [Select]
$ aptitude search '~dnvidia~S~i!~V1.0.9' -F '%v%p' | sort -V How will the result look like? Hmm, try it by yourself!

Have fun with aptitude!
greetings
musca

« Last Edit: 2013/11/05, 14:56:55 by musca »
„Es irrt der Mensch, solang er strebt.“  (Goethe, Faust)