(Solved) 64bit LMDE + Nvidia = freeze on shutdown/logout

Archived topics about LMDE 1 and LMDE 2
Locked
campbegc

(Solved) 64bit LMDE + Nvidia = freeze on shutdown/logout

Post by campbegc »

Hello,

I love my LMDE 64 installation, but I have a small problem:

I'm currently unable to use the menu buttons for "shutdown", "logout", and "switch users". Any time I do, the computer freezes hard, forcing a manual restart or power off. This also happens for Control + Alt + Backspace, and Control + Print Screen + K. When this freeze occurs, I am unable to switch to a different terminal via Control + Alt +F#.

-Computer-
Processor : 4x Intel(R) Core(TM) i3 CPU 550 @ 3.20GHz
Memory : 8188MB (618MB used)
Operating System : Linux Mint Debian Edition
-Version-
Kernel : Linux 3.2.0-2-amd64 (x86_64)
-OpenGL-
Vendor : NVIDIA Corporation
Renderer : GeForce GT 440/PCIe/SSE2
Version : 4.2.0 NVIDIA 295.20
Direct Rendering : Yes

I used these command to install the nvidia drivers:
sudo apt-get install module-assistant
sudo apt-get install nvidia-kernel-common
sudo apt-get install nvidia-glx
sudo apt-get install nvidia-kernel-source
sudo apt-get install nvidia-xconfig
m-a prepare
m-a a-i nvidia
modprobe nvidia
nvidia-xconfig

I also installed nvidia-glx-ia32

I have encountered this behavior not only on LMDE64, but also LMDE32 (686-pae kernel) and Maya (686-pae kernel).

While I'm not as concerned about the menu buttons, I would love to have control + alt + Backspace usable again. Any suggestions would be greatly appreciated. Thanks!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
cmost
Level 4
Level 4
Posts: 416
Joined: Tue Sep 18, 2007 7:36 am
Location: Newport, Kentucky

Re: 64bit LMDE + Nvidia Drivers = freeze on shutdown, logout

Post by cmost »

I always compile my own nvidia driver, that way I can use the latest one. If I were you, I'd update to the latest nvidia 302.17 driver. You might as well update your kernel too, since later kernels have better hardware support. I've been using the latest Liquorix 3.4.x kernel and corresponding headers along with the latest nvidia driver and everything is creamy as butter on my amd64 rig. Here's how to do it.

First, go to here: [url]ftp://download.nvidia.com/XFree86/Linux-x86_64/[/url] and fetch the latest nvidia driver. Save it to /home/username/nvidia/
Optionally, you can also download the latest nvidia-settings utility, grab it here: [url]ftp://download.nvidia.com/XFree86/nvidia-settings/[/url]
NOTE: replace "username" in /home/username with YOUR actual username!

Next, go to your terminal and enter this command to modify your Apt sources:

Code: Select all

sudo gedit /etc/apt/sources.list
Copy and paste the following to the end of the file, save it.

Code: Select all

## Liquorix Kernel - latest Debian Kernel
deb http://liquorix.net/debian sid main
deb http://liquorix.net/debian sid main future
Close Gedit, then back in your terminal, issue

Code: Select all

sudo apt-get update
Now open Synaptic

Code: Select all

sudo synaptic
Do a keyword search on "Linux image"

Mark the following packages for installation. Note: You can leave your existing kernel in place, but I would uninstall any proprietary nvidia drivers and also the xserver-xorg-video nouveau (this module will be disabled by the proprietary nvidia installer so leaving it isn't a big deal) and associated dependencies before you restart.

Code: Select all

linux-headers-3.4.0-3.dmz.2-liquorix-amd64
linux-headers-liquorix-amd64
linux-image-3.4.0-4.dmz.2-liquorix-amd64
linux-image-liquorix-amd64
Note: These are the latest liquorix packages as of today's date! Pick the newest ones, they're updated regularly.

You will also need some compilation tools, so search for and mark (including dependencies):

Code: Select all

make 
gcc
gcc-4.6
gcc-4.6-base
build-essential
Click 'Apply' to install (and remove) any marked packages.

Next, reboot...your shiny new 3.4 Liquorix kernel is selected by default in Grub 2. If not, highlight it to boot the new kernel.

If you removed nouveau, you will not be able to start the X server. This is normal. If nouveau is still functional, you'll arrive at the login screen as usual. If X didn't start, cancel any attempt to trouble-shoot (we know why) and you should wind up at a command prompt. If you're at the login screen, type ALT+F1 to arrive at a command prompt. Login with your username and password.

If you arrived at a graphical login screen, you'll need to kill the xserver before proceeding with installing nvidia's proprietary driver.

Code: Select all

sudo /etc/init.d/mdm stop
Now let's install the nvidia driver!

Code: Select all

cd /home/username/nvidia
ls -l
sudo sh *302.17*.run
Accept the agreement, then follow the prompts. Make sure you install the 32 bit libs, don't let it modify your /etc/X11/xorg.conf file. If the nouveau module is still present, nvidia will attempt to disable it, which will require a reboot so you'll have to repeat the above steps to get back to this point.

Once the proprietary nvidia driver is installed, you can either reboot or simply issue this command:

Code: Select all

sudo /etc/init.d/mdm restart
You should arrive at your normal graphical login screen! :D Log into the system normally and you will have the latest and greatest kernel and nvidia drivers.

Now, if you want nvidia-settings, there are two ways to go about it. The quickest and easiest method is to simply install the older version from the package manager, but block any recommended packages. The older version works fine with the newer drivers. To do that, issue this command in a terminal

Code: Select all

sudo apt-get install nvidia-settings --no-install-recommends
To compile the latest version from the downloaded file, follow these steps:
Using the file manager, navigate to /home/username/nvidia
Right-click on the 'nvidia-settings-302.17.tar.bz2' and extract it.
Next, go into the new 'nvidia-settings-3.2.17' folder
Right-click somewhere and choose 'Open in Terminal' to open a command prompt in this location. (Alternately, open the Terminal from a shortcut and then simply cd to /home/username/nvidia/nvidia-settings-3.2.17 to get there.)
Before we can do anything, we need a few dependencies. Issue this command:

Code: Select all

sudo apt-get install libgtk2.0-dev libxv-dev libxxf86vm-dev m4
Now, there's one little fiddly thing we need to take care of on amd64 based systems before we build nvidia-settings.
In the terminal, type:

Code: Select all

cd src/libXNVCtrl
make
cd ..
cd ..
Now, we can type

Code: Select all

make
sudo make install
Note: the build will take some time - pay attention if it fails with any errors as you likely need a dependency. Once it builds successfully, type 'sudo make install' followed by your root password to install it.
Type the following to launch the utility

Code: Select all

nvidia-settings
Enjoy! :D
Dual Intel Xeon 3.6 GHz, 24 Cores
192 GB DDR3 RAM
AMD Radeon Pro WX 7100
campbegc

Re: 64bit LMDE + Nvidia Drivers = freeze on shutdown, logout

Post by campbegc »

Wow! Thanks!

I've never used Liquorix before. I'll be interested to see how this works. I'll try this and post the results.
campbegc

Re: 64bit LMDE + Nvidia Drivers = freeze on shutdown, logout

Post by campbegc »

Update:

I've installed the liquorix, uninstalled the nvidia drivers and manually re-installed the 302.17 nvidia drivers per the instructions. The good news: Liquorix runs just fine. The bad: Cinnamon now fails to start, leaving me at the same black screen with a few squiggly characters as before.

So, I can still log into MATE, and it seems the difference is that MATE doesn't require acceleration. Example: When I launch nvidia-settings in terminal, and click on OpenGL/GLX info, I see that direct rendering is disabled, and this output occurs in terminal:

NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).

If I launch it as super user, I find out that direct rendering is enabled, and there is no error in the terminal.
It seems that hardware acceleration is disabled by default, and I'm not sure how to turn it back on, save reinstalling the nvidia drivers from the repositories.

Also, the "shutdown/logoff/Ctrl+Alt+Backspace" freeze problem persists.

Any Suggestions?
cmost
Level 4
Level 4
Posts: 416
Joined: Tue Sep 18, 2007 7:36 am
Location: Newport, Kentucky

Re: 64bit LMDE + Nvidia Drivers = freeze on shutdown, logout

Post by cmost »

Make sure that your user account (username) is a member of the 'video' group, then restart.

Here's how to check.
In Mate, click Menu --> Administration --> Users and Groups

In the applet that pops up, select your username, then click 'Advanced Settings' (enter your admin password) then click the tab for 'User Privileges'. Scroll down and place a check mark next to 'use video devices'. Then reboot. Does that help?
Dual Intel Xeon 3.6 GHz, 24 Cores
192 GB DDR3 RAM
AMD Radeon Pro WX 7100
campbegc

Re: 64bit LMDE + Nvidia Drivers = freeze on shutdown, logout

Post by campbegc »

Update:

Back in Cinnamon, which is awesome. Adding my username to the video group did the trick. This has been wonderful, learning how to install liquorix and the newest drivers, instead of wait for the repositories.

The original problem persists unfortunately. I can't exit the x server without a hard freeze.

If there are any other suggestions, I'd love to hear them, if not, I'll just live with it.

I really appreciate the time and effort you've taken to help me. Thanks!
cmost
Level 4
Level 4
Posts: 416
Joined: Tue Sep 18, 2007 7:36 am
Location: Newport, Kentucky

Re: 64bit LMDE + Nvidia Drivers = freeze on shutdown, logout

Post by cmost »

Hi. Can you please post the contents of /etc/X11/xorg.conf

Also, try gathering up this information so we can begin the deep troubleshooting process:

All of the X server log file(s): /var/log/Xorg.*.log
Output of the dmesg command
Content of /var/log/mdm/ (only if there is nothing interesting in /var/log/Xorg.*.log and dmesg output!)

Also, I took the liberty of researching your issue and found an interesting tidbit about how the nvidia kernel module is loaded and unloaded during startup and shutdown. There's a bug that seems to be related to how nvidia.ko initiates and re-initiates display devices. By preventing it from unloading/reloading, the reinit process is skipped. You could put your kernel module into persistent mode which means it's always loaded. See if that prevents your freezes.

Code: Select all

sudo nvidia-smi -pm 1
Dual Intel Xeon 3.6 GHz, 24 Cores
192 GB DDR3 RAM
AMD Radeon Pro WX 7100
campbegc

Re: 64bit LMDE + Nvidia Drivers = freeze on shutdown, logout

Post by campbegc »

I am awed by your Kung Fu.

Changing the nvidia kernel to persistent mode did the trick. I can now shutdown, logoff, and kill the x server any way I please, and it doesn't go into a hard freeze. Since the source of this problem was a Nvidia Kernel bug, And you've presented the work around, I'm going to go ahead an mark this as solved (unless there's a reason to still go over all those logs).

Thank you so much for all your time and help! I really appreciate it! Liquorix is smooth and creamy indeed. Thanks again.
cmost
Level 4
Level 4
Posts: 416
Joined: Tue Sep 18, 2007 7:36 am
Location: Newport, Kentucky

Re: 64bit LMDE + Nvidia Drivers = freeze on shutdown, logout

Post by cmost »

You're very welcome! My pleasure! :D

Now, a word to the wise. Now that you're running the Liquorix kernel and home-brewed latest and greatest nvidia module, there are some care and feeding instructions. You will need to re-compile your nvidia driver every time the Liquorix kernel is updated or if Mint issues updates to xorg or xserver. It only takes a few moments (just repeat the steps outlined for installing the nvidia driver in my initial post) so no worries. If you want to prevent the Liquorix kernel from upgrading automatically, you simply need to uninstall the following from Synaptic:

Code: Select all

linux-headers-liquorix-amd64
linux-image-liquorix-amd64
That way you can upgrade at your leisure. :D Good luck and happy Minting!
Dual Intel Xeon 3.6 GHz, 24 Cores
192 GB DDR3 RAM
AMD Radeon Pro WX 7100
campbegc

Re: 64bit LMDE + Nvidia Drivers = freeze on shutdown, logout

Post by campbegc »

Okay! I'll remember that. Thanks again.
jan_goyvaerts

Re: (Solved) 64bit LMDE + Nvidia = freeze on shutdown/logout

Post by jan_goyvaerts »

Was this by any chance related to Twinview ? I'm having a crash/freeze each time a display switches to character mode. Whether this is via CTRL-ALT-F1 or a shutdown. It all works when switching to single screen first.

I've tried various things - including what's here in the thread - at no prevail. The only thing I can find in all logs is this one line:

Aug 10 12:52:41 no-nb-pool3 kernel: [ 677.244074] dell_wmi: Received unknown WMI event (0x11)
ashfaq

Re: 64bit LMDE + Nvidia Drivers = freeze on shutdown, logout

Post by ashfaq »

cmost wrote:I always compile my own nvidia driver, that way I can use the latest one. If I were you, I'd update to the latest nvidia 302.17 driver. You might as well update your kernel too, since later kernels have better hardware support. I've been using the latest Liquorix 3.4.x kernel and corresponding headers along with the latest nvidia driver and everything is creamy as butter on my amd64 rig. Here's how to do it.

First, go to here: [url]ftp://download.nvidia.com/XFree86/Linux-x86_64/[/url] and fetch the latest nvidia driver. Save it to /home/username/nvidia/
Optionally, you can also download the latest nvidia-settings utility, grab it here: [url]ftp://download.nvidia.com/XFree86/nvidia-settings/[/url]
NOTE: replace "username" in /home/username with YOUR actual username!

Next, go to your terminal and enter this command to modify your Apt sources:

Code: Select all

sudo gedit /etc/apt/sources.list
Copy and paste the following to the end of the file, save it.

Code: Select all

## Liquorix Kernel - latest Debian Kernel
deb http://liquorix.net/debian sid main
deb http://liquorix.net/debian sid main future
Close Gedit, then back in your terminal, issue

Code: Select all

sudo apt-get update
Now open Synaptic

Code: Select all

sudo synaptic
Do a keyword search on "Linux image"

Mark the following packages for installation. Note: You can leave your existing kernel in place, but I would uninstall any proprietary nvidia drivers and also the xserver-xorg-video nouveau (this module will be disabled by the proprietary nvidia installer so leaving it isn't a big deal) and associated dependencies before you restart.

Code: Select all

linux-headers-3.4.0-3.dmz.2-liquorix-amd64
linux-headers-liquorix-amd64
linux-image-3.4.0-4.dmz.2-liquorix-amd64
linux-image-liquorix-amd64
Note: These are the latest liquorix packages as of today's date! Pick the newest ones, they're updated regularly.

You will also need some compilation tools, so search for and mark (including dependencies):

Code: Select all

make 
gcc
gcc-4.6
gcc-4.6-base
build-essential
Click 'Apply' to install (and remove) any marked packages.

Next, reboot...your shiny new 3.4 Liquorix kernel is selected by default in Grub 2. If not, highlight it to boot the new kernel.

If you removed nouveau, you will not be able to start the X server. This is normal. If nouveau is still functional, you'll arrive at the login screen as usual. If X didn't start, cancel any attempt to trouble-shoot (we know why) and you should wind up at a command prompt. If you're at the login screen, type ALT+F1 to arrive at a command prompt. Login with your username and password.

If you arrived at a graphical login screen, you'll need to kill the xserver before proceeding with installing nvidia's proprietary driver.

Code: Select all

sudo /etc/init.d/mdm stop
Now let's install the nvidia driver!

Code: Select all

cd /home/username/nvidia
ls -l
sudo sh *302.17*.run
Accept the agreement, then follow the prompts. Make sure you install the 32 bit libs, don't let it modify your /etc/X11/xorg.conf file. If the nouveau module is still present, nvidia will attempt to disable it, which will require a reboot so you'll have to repeat the above steps to get back to this point.

Once the proprietary nvidia driver is installed, you can either reboot or simply issue this command:

Code: Select all

sudo /etc/init.d/mdm restart
You should arrive at your normal graphical login screen! :D Log into the system normally and you will have the latest and greatest kernel and nvidia drivers.

Now, if you want nvidia-settings, there are two ways to go about it. The quickest and easiest method is to simply install the older version from the package manager, but block any recommended packages. The older version works fine with the newer drivers. To do that, issue this command in a terminal

Code: Select all

sudo apt-get install nvidia-settings --no-install-recommends
To compile the latest version from the downloaded file, follow these steps:
Using the file manager, navigate to /home/username/nvidia
Right-click on the 'nvidia-settings-302.17.tar.bz2' and extract it.
Next, go into the new 'nvidia-settings-3.2.17' folder
Right-click somewhere and choose 'Open in Terminal' to open a command prompt in this location. (Alternately, open the Terminal from a shortcut and then simply cd to /home/username/nvidia/nvidia-settings-3.2.17 to get there.)
Before we can do anything, we need a few dependencies. Issue this command:

Code: Select all

sudo apt-get install libgtk2.0-dev libxv-dev libxxf86vm-dev m4
Now, there's one little fiddly thing we need to take care of on amd64 based systems before we build nvidia-settings.
In the terminal, type:

Code: Select all

cd src/libXNVCtrl
make
cd ..
cd ..
Now, we can type

Code: Select all

make
sudo make install
Note: the build will take some time - pay attention if it fails with any errors as you likely need a dependency. Once it builds successfully, type 'sudo make install' followed by your root password to install it.
Type the following to launch the utility

Code: Select all

nvidia-settings
Enjoy! :D
I did all as you instructed for changing the Kernel to latest, although the new kernel image shows up in image list, I am not able to make it 'run' or boot with the new kernel, please help me with the exact command to do so, I tried what I guess could be! I am attaching the output below please check and help me, so that than I can proceed with Nvidia driver!

ashfaq@faizaff ~ $ uname -r
3.2.0-2-amd64
ashfaq@faizaff ~ $ su
Password:
faizaff ashfaq # apt-cache search linux-image
alsa-base - ALSA driver configuration files
linux-headers-3.2.0-2-amd64 - Header files for Linux 3.2.0-2-amd64
linux-headers-3.2.0-2-rt-amd64 - Header files for Linux 3.2.0-2-rt-amd64
linux-image-3.2.0-2-amd64 - Linux 3.2 for 64-bit PCs
linux-image-3.2.0-2-amd64-dbg - Debugging infos for Linux 3.2.0-2-amd64
linux-image-3.2.0-2-rt-amd64 - Linux 3.2 for 64-bit PCs, PREEMPT_RT
linux-image-3.2.0-2-rt-amd64-dbg - Debugging infos for Linux 3.2.0-2-rt-amd64
linux-image-2.6-amd64 - Linux for 64-bit PCs (dummy package)
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), PREEMPT_RT
linux-headers-3.4.0-7.dmz.1-liquorix-amd64 - Header files for Linux 3.4.0-7.dmz.1-liquorix-amd64
linux-image-3.4.0-7.dmz.1-liquorix-amd64 - Linux 3.4.0 for 64-bit PCs
linux-image-liquorix-amd64 - Linux image for liquorix on 64-bit PCs
faizaff ashfaq # apt-get install linux-image 3.4.0-7.dmz.1-liquorix-amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'linux-headers-3.4.0-7.dmz.1-liquorix-amd64' for regex '3.4.0-7.dmz.1-liquorix-amd64'
Note, selecting 'linux-image-3.4.0-7.dmz.1-liquorix-amd64' for regex '3.4.0-7.dmz.1-liquorix-amd64'
Note, selecting 'linux-modules-3.4.0-7.dmz.1-liquorix-amd64' for regex '3.4.0-7.dmz.1-liquorix-amd64'
Note, selecting 'linux-image-3.4.0-7.dmz.1-liquorix-amd64' instead of 'linux-modules-3.4.0-7.dmz.1-liquorix-amd64'
Package linux-image is a virtual package provided by:
linux-image-3.4.0-7.dmz.1-liquorix-amd64 3.4.0-11
linux-image-3.2.0-2-rt-amd64 3.2.9-1
linux-image-3.2.0-2-amd64 3.2.9-1
You should explicitly select one to install.

E: Package 'linux-image' has no installation candidate
faizaff ashfaq # uname -r
3.2.0-2-amd64
faizaff ashfaq # apt-get install linux-image-3.4.0-7.dmz.1-liquorix-amd64 3.4.0-11
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package 3.4.0-11
E: Couldn't find any package by regex '3.4.0-11'
faizaff ashfaq # uname -r
3.2.0-2-amd64
faizaff ashfaq # apt-get install linux-image-3.4.0-7
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'linux-image-3.4.0-7.dmz.1-liquorix-amd64' for regex 'linux-image-3.4.0-7'
linux-image-3.4.0-7.dmz.1-liquorix-amd64 is already the newest version.
linux-image-3.4.0-7.dmz.1-liquorix-amd64 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
faizaff ashfaq # uname -r
3.2.0-2-amd64
faizaff ashfaq #

I want to use this new image as my Kernel "linux-image-3.4.0-7.dmz.1-liquorix-amd64 - Linux 3.4.0 for 64-bit PCs" But my system still boots with "3.2.0-2-amd64" I am a newbee yes, and need your help, thanks in advance.
Locked

Return to “LMDE Archive”