Announcement

Collapse
No announcement yet.

How to reset video drivers

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] How to reset video drivers

    I have been using nvidia-340 proprietary drivers for several years without much of an issue but a day or so ago during my routine upgrades, there was a conflict with some library that was trying to overwrite something that nvidia-340 driver uses (unfortunately, I don't remember what that was). I tried to fix it but that did not go anywhere. So I decided to switch to nouveau drivers instead. This worked fine. But then, I again started to muck around to try to get the nvidia drivers working again. That did not go well. Now what I have is a system that does not have the nvidia drivers installed, xserver-xorg-video-nouveau installed and a 640x480 screen resolution. I know for a fact that nouveau drivers work with my system. So is there a way to reset xorg?
    So far I have tried the following without use:
    Code:
    sudo dpkg-reconfigure xserver-xorg
    Command exits without any errors but nothing happens.
    Code:
    sudo X -configure
    Returns the following errors:
    Code:
    _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
    _XSERVTransMakeAllCOTSServerListeners: server already running
    (EE) 
    Fatal server error:
    (EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 
    (EE) 
    Please consult the The X.Org Foundation support 
    	 at http://wiki.x.org
    for help. 
    (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
    (EE) 
    (EE) Server terminated with error (1). Closing log file.
    How do I fix this?

    #2
    The kernel modules probably did not get built for some reason, the dkms scripts didn't run, most likely. I've seen this often over time, mainly with drivers from the PPA.
    Try this in the terminal
    Code:
    sudo apt install nvidia-dkms-390 --reinstall
    sudo apt autoremove

    Sub whatever driver version number you installed in place of 390, if it is different. You did not specify which one you are trying out, or what card. On older cards, say lower than a gtx 9xx, (or gtx750 maybe) 390 is probably the best choice for most. If trying the ppa, the 396 is better for full on gaming cards, the gtx 9xx and up imo. If the 340 is the recommended driver in Driver Manager, you can stick with that, but Id lean for the stock 390 (not from the PPAs) unless it is super old.

    Also, to make sure it is all clean, run this command to remove any stray nvidia-specific driver files and libs from other versions still hanging about:
    Code:
    sudo apt autoremove
    Reboot, and you should be OK. This has worked for me when I have seen this exact issue in recent months, using the PPA drivers.

    ---original notes---

    Using Nvidia drivers, removing or moving between different versions, can leave stray file behind, so try this to remove any, if present:

    Code:
    sudo apt autoremove
    If you want to go back to nouveau and completely clean out Nvidia, you can purge all nvidia-specific files"
    Code:
    sudo apt purge *nvidia*
    And remove any /etc/x11/xorg.conf file, if one is present. (this file is not needed, but Nvidia drivers can use them to save settings made in the Nvidia control center. Once you reboot, you can use the Driver Manager to install whatever recommended driver it shows, or one of the newer ones if present. Don't use the package manager, and do not use any PPAs for drivers at this point.

    You do not specify what card you have, or which driver version you are playing with, currently, and how you are installing it. There are a few different ways.
    Last edited by claydoh; Sep 21, 2018, 09:54 PM.

    Comment


      #3
      Thank you @claydoh
      My graphics card needs nvidia-340 drivers. When I try to install them I get the following error:
      Code:
      Unpacking nvidia-340 (340.106-0ubuntu3) ...
      dpkg: error processing archive /tmp/apt-dpkg-install-6MRwSR/5-nvidia-340_340.106-0ubuntu3_amd64.deb (--unpack):
      trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLESv1_CM.so', which is also in package libglvnd-dev:amd64 1.0.0-2ubuntu2.2
      This nvidia package is coming from the default repositories, not some special PPA. I already have the nouveau drivers installed but that does not seem to be helping. My computer now boots and gets to the login screen (which is at 640x480 resolution) and my mouse and keyboard are not working either :-( I can ssh into the machine and install/remove packages and such though.

      I cannot find nvidia-dkms-340 package
      Code:
      $ sudo apt install nvidia-dkms-340 --reinstall
      Reading package lists... Done
      Building dependency tree       
      Reading state information... Done
      E: Unable to locate package nvidia-dkms-340
      Last edited by kayvee; Sep 23, 2018, 12:34 PM.

      Comment


        #4
        Ahh the nvidia dkms package is my bad, thius older driver version does not have a separate package for the dkms stuff as it is done now.

        But I did find a bug report on a mis-configured package, causing the error you see:
        https://bugs.launchpad.net/ubuntu/+s...d/+bug/1791542
        It's just happened, and there is a fix being prepped for it.
        It looks like upgrading using the --proposed repository is not working yet, but manually may be working:

        Download the file
        ssh into Kubuntu, then do this:
        Code:
        wget http://launchpadlibrarian.net/387993059/nvidia-340_340.107-0ubuntu0.18.04.1_amd64.deb
        Use the ls command to verify that the file is there
        Then run this to install:

        Code:
        sudo dpkg -i  /home/<your-username>/nvidia-340_340.107-0ubuntu0.18.04.1_amd64.deb
        sudo apt-get -f install
        sudo dpkg --configure -a
        You may see a warning message, that is OK.
        Everything should be resolved and installed after that, I hope.
        Last edited by claydoh; Sep 23, 2018, 02:44 PM.

        Comment


          #5
          I saw your message just a minute too late...
          I removed the following packages: libgl1-mesa-dev libglu1-mesa-dev libglvnd-dev libgles1 and the installation of nvidia-340 finished fine. Now, I have a separate problem. While mucking about with all of this stuff I probably did something that is now causing my machine not to recognize the keyboard and mouse either; just standard USB keyboard and wireless mouse. I searched online and already reinstalled xserver-xorg-input-all but that did not help.
          Code:
          sudo apt install xserver-xorg-input-all --reinstall
          sudo dpkg --configure -a
          Is there a way to force reconfigure this?

          Comment


            #6
            Okay, I finally fixed it!
            In the process of mucking about, I moved the folder xorg.conf.d to a backup folder just so that I can force its recreation. Apparently, it has input configuration files as well (most likely libinput.conf) that I had removed. I copied them back and everything is working fine now.

            The only remaining issue now is libgles1 package that I had removed in order to install nvidia-340 package. I don't know what it was for and if anything had broken. Hopefully I won't find out anytime soon...

            Comment


              #7

              Comment

              Working...
              X