nvidia version mismatch (debian method)
Lat
Status: Interested
Joined: 11 Apr 2008
Posts: 29
Reply Quote
This is not a wished featured to be added to sgfxi, but a heads up that this situation exist. This only happens if the nvidia driver is installed using the debian method (probably fglrx as well)

When I compile my kernels, I have a script that installs the debs of my built kernel, and also detects if a nvidia card is present. This time I knew there is a mismatch of versions of nvidia packages.

:: Code ::
displayversions.sh "nvidia-glx nvidia-kernel-source nvidia-settings"
nvidia-glx:
  Installed: 180.22-2
  Candidate: 180.29-1
nvidia-kernel-source:
  Installed: 180.22-2
  Candidate: 180.29-1
nvidia-settings:
  Installed: 180.22-1
  Candidate: 180.22-1


hence, m-a a-i would upgrade those packages and install the driver. Nothing wrong there, the only thing is that nvidia-settings is still 180.22 and not 180.29.

The driver will work without problems, but if I wanted to attach a second monitor, or/and wanted to modify its settings I probably couldn't do it.

A worst scenario can happen when the experimental repo is activated. nvidia-kernel-source AND nvidia-glx may have mismatches. Then there will be problems.
Back to top
Lat
Status: Interested
Joined: 11 Apr 2008
Posts: 29
Reply Quote
This is the code that I added to my install-kernel.sh that I added to show what I did for this isssue hoping it helps
:: Code ::
 echo "Using debian non-free nvidia"
 # For the moment, I know I only own non-legacy cards, so no detection of
 # what source are needed is considered in this install
 nvidiaSource='nvidia-kernel-source'

 # nvidia packages to be tested
 nvipkgs="nvidia-glx $nvidiaSource nvidia-settings"
 nvcand=""
 nvinst=""
 bnvcand="0"
 bnvinst="0"
 mnvinst="0"

 # check for every nvidia package their candidate and installed status
 for a in "$nvipkgs" ; do
  # - Check the candidate and install version, and strip the -9 part off of 180.12-2
  # - The variable is left at the end, so there's no blank space at the beginning of the list
  nvcand="$(apt-cache policy $a|grep Candidate|awk '{print $2}'|cut -d "-" -f 1) $nvcand"
  tnvinst="$(apt-cache policy $a|grep Installed|awk '{print $2}'|cut -d "-" -f 1)"
  # if mnvinst is 1, then one nvidia package isn't installed or missing
  [[ tnvinst == "(none)" ]] && mnvinst="1"
  nvinst="$tnvinst $nvinst"
 done

 # - count the lines of uniq versions
 # - awk command is used to eliminate the white space and the end of the list
 nvcand=$(echo "$nvcand"|awk '{print $1}'|uniq|wc -l)

 nvinst=$(echo "$nvinst"|awk '{print $1}'|uniq|wc -l)

 # if nvcand or nvinst have more than one unique line
 # it means there's a mismatch of versions
 if [[ "$nvinst" -gt "1" ]] ; then
  echo "The installed nvidia package versions have dismatches"
  bnvins="1"
 fi

 if [[ $nvcand -gt 1 ]] ; then
  echo "The candidate nvidia package versions have dismatches"
  bnvcand="1"
 fi

# is there a nvidia candidate mismatched?
 if [[ "$bnvcand" == "1" ]] ; then
 # if the installednvidia packages aren't mismatched, the compile and install
  if [[ "$mnvinst" != "1" ]] ; then
   m-a build -t -f -l ${VER} $nvidiaSource 1> /dev/null
   m-a install -t -f -l ${VER} $nvidiaSource 1> /dev/null
  else
   echo "Error: There are nvidia packages with distmatched version"
   echo "It is not recommened to install a nvidia driver for the moment"
  fi
 else
  # no nvidia candidate dismatch. Then we can upgrade the packages, if applicable

Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4124
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
I've never used nvidia-settings, for dual monitor I've used xorg.conf dual monitor options, which have never failed me yet, though we'll see how that works with the new xorg 1.6 that's coming down the road.

Just a hint, uniq is an odd one

:: Code ::
sort -f -b $SM_CONFIG_FILE | uniq > $tempFile

for example is what's required in smxi to handle actual uniq processing.

In general, I feel that the debian nvidia/fglrx handling is largely a doomed venture, and as you can see, the maintainers aren't ever going to handle it reliably, they never have, that's why I wrote sgfxi in the beginning to not default to the debian method.

However, you can install nvidia happily with no issues and never use nvidia-settings, I've never used it on any system to do anything, so that's not something I think is that big a deal.

By the way, the real news of course is that, as I've been predicting, ATI/AMD is now dropping support for fglrx for all cards earlier than hd2000 as of 9.4, and, what's worse, are actually pretending that the end users are getting a favor for this failure, many newer cards still, years after release, have only partial support for all features in radeon/radeonhd drivers.
Back to top
Lat
Status: Interested
Joined: 11 Apr 2008
Posts: 29
Reply Quote
Yes, you're right. The input needs to be sorted before issuing uniq. I've have that bug before. Thank you for the reminding.

What do you use to configure xorg for dual? xrandr or www.sorgonet.com/linux/nv-online/ ?
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4124
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
www.sorgonet.com/linux/nv-online/

That guy did such a great job with his programming that I decided not to even bother trying to emulate it with smxi, just to point people to his page. Thanks for putting the link up though for other people who might need this information.

I had to bang my head against the uniq wall too for a while in smxi before I learned it, that's how the /etc/smxi.conf things are sorted and also made to be unique.

What I'm worried about is the new xorg 1.6 not working with this tried and true xorg.conf method.

Here's my (cleaned up) Section "Device":
:: Code ::
Section "Device"
        Identifier  "Card0"
        Driver  "nvidia"
        Option  "IgnoreDisplayDevices"  "TV"
        Option      "Coolbits"  "1"
        Option      "AddARGBGLXVisuals" "true"
        Option      "TripleBuffer"      "false"
        VendorName  "All"
        BoardName   "All"
        BusID   "PCI:05:00:0"
        Option "NoLogo" "TRUE"
        Option "NvAGP" "0"
        Option "DigitalVibrance" "0"
        Option "TransparentIndex" "0"
        Option "CursorShadowAlpha" "64"
        Option "CursorShadowXOffse" "4"
        Option "CursorShadowYOffset" "2"
        Option "Twinview" "TRUE"
        Option "TwinViewOrientation" "RightOf"
        Option "SecondMonitorHorizSync" "30-81"
        Option "SecondMonitorVertRefresh" "56-75" #56-75
        Option "MetaModes" "1280x1024,1280x1024"
        Option "ConnectedMonitor" "CRT,CRT"
EndSection

Back to top
Display posts from previous:   

All times are GMT - 8 Hours