Nvidia Drivers Crashing Cinnamon

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
groverj3

Nvidia Drivers Crashing Cinnamon

Post by groverj3 »

I'm sure this is the millionth time someone's posted about this, but I can't seem to find a thread anywhere that actually has a working solution.

I did a clean install of Mint 18 on a newer Asus K-series laptop and am having issues with the proprietary Nvidia drivers. Big surprise, right? I used the driver manager to install the recommended driver version for the geforce 940m that's in the laptop, but after a restart this crashed Cinnamon. I later switched back to the open source drivers and added the graphics-drivers ppa that's been suggested elsewhere and after trying each version that I could I found that Cinnamon wouldn't crash if I used 358, but any other version, including the recommended 367, would crash it. I also tried updating the Kernel but this had no effect either. Curious.

Additionally, if I use 358 I usually experience a reboot after a seemingly random amount of time. After that it seems stable.

Any potential solutions to use the newer drivers and avoid the Cinnamon crashes/reboots would be appreciated.

Code: Select all

inxi -Fxz
System:    Host: jeff-laptop Kernel: 4.5.3-040503-generic x86_64 (64 bit gcc: 5.2.1)
           Desktop: Cinnamon 3.0.7 (Gtk 3.18.9-1ubuntu3.1)
           Distro: Linux Mint 18 Sarah
Machine:   System: ASUSTeK (portable) product: K401LB v: 1.0
           Mobo: ASUSTeK model: K401LB v: 1.0
           Bios: American Megatrends v: K401LB.204 date: 08/26/2015
CPU:       Dual core Intel Core i7-5500U (-HT-MCP-) cache: 4096 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9577
           clock speeds: max: 3000 MHz 1: 2408 MHz 2: 1552 MHz 3: 2400 MHz
           4: 803 MHz
Graphics:  Card-1: Intel Broadwell-U Integrated Graphics bus-ID: 00:02.0
           Card-2: NVIDIA GM108M [GeForce 940M] bus-ID: 04:00.0
           Display Server: X.Org 1.18.3 driver: nvidia
           Resolution: 1920x1080@60.00hz
           GLX Renderer: GeForce 940M/PCIe/SSE2
           GLX Version: 4.5.0 NVIDIA 358.16 Direct Rendering: Yes
Audio:     Card-1 Intel Wildcat Point-LP High Definition Audio Controller
           driver: snd_hda_intel bus-ID: 00:1b.0
           Card-2 Intel Broadwell-U Audio Controller
           driver: snd_hda_intel bus-ID: 00:03.0
           Sound: Advanced Linux Sound Architecture v: k4.5.3-040503-generic
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: 4000 bus-ID: 02:00.0
           IF: enp2s0 state: down mac: <filter>
           Card-2: Intel Wireless 7260 driver: iwlwifi bus-ID: 03:00.0
           IF: wlp3s0 state: up mac: <filter>
Drives:    HDD Total Size: 120.0GB (23.2% used)
           ID-1: /dev/sda model: SanDisk_SDSSDA12 size: 120.0GB
Partition: ID-1: / size: 102G used: 19G (20%) fs: ext4 dev: /dev/sda2
           ID-2: swap-1 size: 8.49GB used: 0.00GB (0%) fs: swap dev: /dev/sda3
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 45.0C mobo: N/A gpu: 0.0:41C
           Fan Speeds (in rpm): cpu: 25500
Info:      Processes: 228 Uptime: 5 min Memory: 1633.3/7886.3MB
           Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (bash 4.3.421) inxi: 2.2.35 
groverj3

Re: Nvidia Drivers Crashing Cinnamon

Post by groverj3 »

Update:

It seems I was getting lucky before? I don't think I was having reboots, Cinnamon was crashing and restarting. However, as of today I'm no longer able to get Cinnamon restarted even with the 358 version drivers that were sort of working before. Now I'm getting an error saying that the x server isn't set up properly after the Cinnamon crash, however, before it crashes glxinfo tells me that I am indeed using the nvidia driver so that seems impossible. Why would it work for 10 or so mins when I first start the computer? It also seems that every time the computer restarts the xorg.conf is overwritten because much of the information in it is gone when I view it after a crash.

I've switched to the open source driver for now to avoid crashes, but this is obviously not the preferred solution. Very odd I'd have these issues since my previous experience with Nvidia and Linux has been good. My desktop works flawlessly (though on Mint 17.3 and it obviously has a desktop card).

Any ideas?

Edit: Apparently my intel processor has integrated video and when I switch to the nvidia open source drivers I actually don't even use them glxinfo tells me that I'm using intel video drivers. Perhaps they'll work better than the open source nvidia ones, but I'm obviously not getting full performance out of the machine.
groverj3

Re: Nvidia Drivers Crashing Cinnamon

Post by groverj3 »

Probably better suited for the graphics drivers section, but I'm kind of surprised there seem to be no solutions out there.
juj

Re: Nvidia Drivers Crashing Cinnamon

Post by juj »

I am also having issues with this. On a SuperMicro X10DAX motherboard with ASUS GTX 980 TI DC 3 OC card, the setup works ok when booting to Windows with NVidia's latest drivers there.

A clean install of Linux Mint 18 Cinnamon boots up to desktop in software rendering mode in a 800x600 resolution (even when I'm on a 1080p display). Installing the proposed nvidia-361 drivers crashes Cinnamon. Reported that at https://bugs.launchpad.net/linuxmint/+bug/1611544

Tried out adding the graphics PPA via instructions from https://sites.google.com/site/easylinuxtipsproject/12, but none of nvidia-361+ newer work, they all crash to desktop. Like groverj3 mentions, nvidia-358 does not crash, and it actually works with GPU acceleration enabled. However, after that my system is no longer able to boot up to desktop when performing a cold boot, but hangs. I have to jump start the boot via a live USB stick and reboot from there. (Odd I know..)

I don't really care about software acceleration that much, I'd just like to have 1920x1080 support, but looks like the software driver does not support this (reported as bug https://bugs.launchpad.net/linuxmint/+bug/1611539)

If someone knows of a nvidia driver that installs and works on top of a clean installation of Linux Mint 18 on a GTX 900 series, would be interesting to hear about your success stories. Probably going to try out the xorg-edgers PPAs next.
groverj3

Re: Nvidia Drivers Crashing Cinnamon

Post by groverj3 »

Let me know if you have any success with that.
ottobonn

Re: Nvidia Drivers Crashing Cinnamon

Post by ottobonn »

Hi groverj3, does your laptop happen to use Optimus? If so, do you have "discrete graphics" selected in the BIOS?
groverj3

Re: Nvidia Drivers Crashing Cinnamon

Post by groverj3 »

ottobonn wrote:Hi groverj3, does your laptop happen to use Optimus? If so, do you have "discrete graphics" selected in the BIOS?
I don't believe so. There are no bios options for graphics besides allocating video memory.

I also tried the nvidia-370 drivers, since they've been released since this thread was started and I had no luck. Even less than earlier, actually. Instead of crashing cinnamon, but otherwise booting normally, I got no video output.
User avatar
Pjotr
Level 24
Level 24
Posts: 20117
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Nvidia Drivers Crashing Cinnamon

Post by Pjotr »

Why are you running Mint 18 on an unsupported kernel (4.5.x)? This may have something to do with your problem.

I advise to install the latest kernel from the 4.4 series (currently -34), boot from that and do some testing with the *recommended* Nvidia driver (so not the 358).

Note that installing kernels is done best by means of Update Manager (panel: View - Linux kernels).
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
groverj3

Re: Nvidia Drivers Crashing Cinnamon

Post by groverj3 »

Pjotr wrote:Why are you running Mint 18 on an unsupported kernel (4.5.x)? This may have something to do with your problem.

I advise to install the latest kernel from the 4.4 series (currently -34), boot from that and do some testing with the *recommended* Nvidia driver (so not the 358).

Note that installing kernels is done best by means of Update Manager (panel: View - Linux kernels).
I installed the newer kernel and updated driver when I had these crashes, to see if it had been fixed in a later kernel/driver update. As indicated in the original post. I can, however, try it again.
ottobonn

Re: Nvidia Drivers Crashing Cinnamon

Post by ottobonn »

Now we have to determine why Cinnamon is crashing. When you log in and it crashes, open a terminal and run

Code: Select all

glxinfo
to see if you have a graphics context set up. Also, try running

Code: Select all

cinnamon --replace
from that terminal and see what errors you get.
groverj3

Re: Nvidia Drivers Crashing Cinnamon

Post by groverj3 »

Going back to the 4.4 kernel and nvidia-367 drivers cause Cinnamon crashes, exactly as I mentioned earlier.

As Requested:

Code: Select all

glxinfo
name of display: :0
Error: couldn't find RGB GLX visual or fbconfig
Without installing the Nvidia driver it uses Intel and it will not error.

Code: Select all

cinnamon --replace

(cinnamon:5790): Clutter-CRITICAL **: Unable to initialize Clutter: Unable to initialize the Clutter backend
Window manager error: Unable to initialize Clutter.
Again, only happens when I try to use nvidia drivers.

I'm wondering if this is a new problem inherent to Mint 18, as well. Since my desktop is still running 17.3 with an Nvidia GTX 1060, which boots into Cinnamon flawlessly (but it required the 370 drivers). Although there are obviously quite a few differences between the systems.
groverj3

Re: Nvidia Drivers Crashing Cinnamon

Post by groverj3 »

Perhaps I could try installing Bumblebee? I didn't think this laptop uses Optimus but the more I think about it, it would make sense. I have no idea if these kinds of errors are the sort of thing one might expect in my situation though.
Ascaris

Re: Nvidia Drivers Crashing Cinnamon

Post by Ascaris »

I have not had good luck with any Nvidia drivers past 358 (Mint 18 x64 with GTX 760). I started a thread a while back where I thought WINE was causing periodic hangups (it would spontaneously reboot after a minute or so after it hung), but it eventually happened a few times out of WINE too, so I knew it wasn't that. At that point, 358 was the newest in the Mint repo; I had installed 367 from the graphics-drivers PPA. When I went back to 358, the hanging went away.

Now the 358 driver has been removed from the repo, and the 361 has replaced it. I don't remember when it upgraded; I just found the 361 one installed in the driver manager. Now the crashing has come back! It happens periodically as it did with the 367, and also immediately (every time) when I unplug my external HDD from my USB 3.0 hub/card reader (whether or not I dismount it before unplugging). I may not have connected the USB freeze with the graphics driver if the behavior was not so suspiciously identical to the freezes I had before (and which have come back now).

I rolled back to the 340 driver (the 358 was no longer shown as an option in the driver manager), and sure enough... no hang when I unplug the external HDD! I will have to wait and see if the periodic ones disappear as well, but it looks promising. Additionally, installing that driver has made the 358 reappear in the list of options (not sure if it is coming from the graphics-drivers PPA or not). I've just selected that and am about to reboot it.

Edit: Nope, it hangs when I unplug the USB drive with the 358 too. Went back to 340 and now it works again.
uberdorf

Re: Nvidia Drivers Crashing Cinnamon

Post by uberdorf »

Sorry, didn't notice this earlier. I had this problem with the GT 730 and Cinnamon, and there is a fix. It involves changing a setting in the splash screen because the animations in booting linux mint cinnamon apparently break the NVIDIA drivers sometimes; but I can't retrace my steps until my wife wakes up in the morning because that computer is in the bedroom where she is sleeping and I don't want to wake her up.

I remember that I started with the release notes. Scroll down to "Solving freezes" and change the setting in the splash screen to "nomodeset" https://www.linuxmint.com/rel_sarah_cinnamon.php If that doesn't work then change it to "nouveau.noaccel=1"
Also look at https://community.linuxmint.com/tutorial/view/842

In a few hours I will try to remember to turn that computer on and try to find the exact change I made to the splash screen to get this to work.

EDIT-- This has only happened in Cinnamon for me. LM 18 Mate, which I installed on my other computers, had no issue with the NVIDIA drivers for my NVIDIA cards (GT 710 IIRC for those).
uberdorf

Re: Nvidia Drivers Crashing Cinnamon

Post by uberdorf »

I was trying to find out what I did to fix this, then noticed at the launchpad site linked earlier the bug has been marked as fixed. Steps are given there in response #5...
https://bugs.launchpad.net/linuxmint/+bug/1611544
User avatar
dentex
Level 1
Level 1
Posts: 42
Joined: Thu Sep 23, 2010 3:45 am
Location: Italy
Contact:

Re: Nvidia Drivers Crashing Cinnamon

Post by dentex »

Hello, just my experience: latest supported driver for my GTX 850M (367.44) didn't work (in the sense that Cinnamon was starting always in fallback mode) until I updated also the Kernel to 4.4.0-34-generic. Since I upgraded Mint from 17.3 to 18 with the mintupgrade tool, the kernel remained the old one, in the new Mint 18 environment.
groverj3

Re: Nvidia Drivers Crashing Cinnamon

Post by groverj3 »

Hey guys, it's been a while but I thought I'd report an update.

I messed around with this for a long time to no avail. I ended up switching my laptop to Mate, which seems to play nicely with nvidia drivers on my laptop. For some reason my desktop computer is just fine with the same version of the drivers. Odd.

Anyway, I guess Mate works well enough, but it doesn't like it when I try to assign the windows key to other keyboard shortcuts (windows plus t to open terminal, etc.). I suppose that's a small price to pay for correctly functioning video drivers. Perhaps I'll play around with this some more in the future.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Nvidia Drivers Crashing Cinnamon

Post by catweazel »

For some reason my desktop computer is just fine with the same version of the drivers. Odd.
It's only odd if your desktop computer is also an ASUS K401LB. The laptop will have a completely different chipset, along with its own set of quirks and incompatibilities, which I dare say is probably the root cause of your original crashing issue. Nevertheless I'm glad to see you're happy with MATE.

Cheers.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
hellguy

Re: Nvidia Drivers Crashing Cinnamon

Post by hellguy »

Many people are having problems after updating their dist to Linux MInt 18 or their kernel, which includes:
  • Cinnamon won't load/ Crashes/ goes into fallback mode
  • Monitor will be listed as unkown device or you can't get output to external monitors
  • WHen you open Nvidia Server X the options will be empty
  • etc
If you are having any of the following issues please follow this instructions:
hellguy wrote:I might be a little late, but I've found some fixes and a temporary one if the others don't work.
OBS: Log out of cinnamon session anytime by pressing CTRL+ALT+BACKSPACE
-1 Recompile Nvidia drivers
Updated kernel requires Nvidia drivers to be recompiled and installed with the new kernel headers, to do that follow these instructions:
-Download and install latest Nvidia driver trough driver manager
-Type this in terminal to get your nvidia's package name:

Code: Select all

dpkg --get-selections | grep nvidia
Example output:
nvidia-361 install
nvidia-opencl-icd-361 install
nvidia-prime install
nvidia-settings install
Our packge in my example is nvidia-361, please use the first one that is followed by the word "ïnstall" in your output.
Then type this in terminal, replacing nvidia-361 by the name showed in your output(This will take some time):

Code: Select all

sudo dpkg-reconfigure nvidia-361
Then do the same for mdm package(display manager)

Code: Select all

sudo dpkg-reconfigure mdm
Then try this (this works straight away if your cinnamon isn't in fallback mode anymore but will only load wallpaper and mouse):

Code: Select all

gsettings reset-recursively org.cinnamon
Reboot, if cinnamon still crashes type the following in terminal(if you can't open terminal try pressing ctrl+alt+f2), this will delete and reinstall cinnamon:

Code: Select all

sudo apt-get remove --purge cinnamon*;sudo apt-get autoclean; sudo apt-get update; sudo apt-get install mint-meta-cinnamon
Then :

Code: Select all

sudo dpkg-reconfigure cinnamon; gsettings reset-recursively org.cinnamon
Reboot and you are done!
If that didn't work keep reading..
-2 Recompile driver from apt get
Run this in terminal:

Code: Select all

sudo apt-get purge nvidia*; sudo apt-get install nvidia-current; sudo dpkg-reconfigure nvidia-current
-3 Select the older Nvidia driver available(240 for me), this fixed all issues for me, also avoid using graphic drivers from any repository than the default ones. If this fail proceed to the last option.
-4 If 1,2 and 3 didn't work you can use Mate to make your cinnamon interface work again(until you find a compatible driver).
Install one of the proprietary Nvidia graphic driver available at Driver Manager
Install mate if you havn't yet by running this in terminal:

Code: Select all

apt-get update && apt-get install mint-meta-mate
Login using Mate session(there's a button in login screen to change that), open terminal and type:

Code: Select all

cinnamon --replace
This will replace your current session with cinnamon (and it will be working) but that's not everything. Go over to settings > Nvidia X Server Settings and under Nvidia Optimus select Intel HD as your primary graphic device and save settings, now you should be able to login and use cinnamon's session normally.

I hope this helps, cheers.

Follow up the discussion here: viewtopic.php?f=59&t=232151&p=1244466#p1244466
Gerlex

Re: Nvidia Drivers Crashing Cinnamon

Post by Gerlex »

As I'm a newbie with Linux, I'm not sure if what I've done is a real solution for this problem of Mint 18.1 Cinnamon crashing when Nvidia drivers are chosen.

I'll describe what I tried (and DIDN'T work):
1)Tried the available versions of Nvidia drivers; the one included with the fresh installation of Mint 18.1 Cinnamon and those available from the PPA (370, 375).
2)The complete method described on this post about compile again the installed driver.
3)As part of number 2, I installed Mate, having no problem with the drivers, even the newest 375. It just worked. But as I feel more comfortable with the customization of Cinnamon then tried with a fresh install of Mint 18 Sarah (I've used it before without any driver related problem in other laptop). The Nvidia drivers worked too but had problems with Wi-Fi and the Update Manager, saying I had to fix first some broken packages, which I did by upgrading everything from terminal.

With all this, my observation would be that the problem is specifically related with Mint version 18.1; no with the kernels, Nvidia drivers or Cinnamon in general, but as have said, I'm not really sure about it.

Not happy with these issues, my last try was to upgrade to Mint 18.1 Cinnamon Serena from Sarah. At this moment the drivers nvidia-367 and intel-microcode are activated without error codes or crashes on Mint 18.1 Cinnamon Serena, kernel 4.4.0-53 (the one included with the installation and marked as recommended by its stability). This is a dual-boot installation with Windows 10 on a laptop of 1 week of use where everything works correctly until now.

I hope this information can help other experienced users to find the solution for this issue. Any reply is welcomed. Thanks for reading.

Code: Select all

System:    Host: gerlex-X556UV Kernel: 4.4.0-53-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: Cinnamon 3.2.6 (Gtk 3.18.9-1ubuntu3.1) dm: mdm Distro: Linux Mint 18.1 Serena
Machine:   System: ASUSTeK (portable) product: X556UV v: 1.0
           Mobo: ASUSTeK model: X556UV v: 1.0 Bios: American Megatrends v: X556UV.305 date: 07/06/2016
CPU:       Dual core Intel Core i5-6200U (-HT-MCP-) cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9599
           clock speeds: min/max: 400/2800 MHz 1: 2706 MHz 2: 2706 MHz 3: 2699 MHz 4: 2727 MHz
Graphics:  Card-1: Intel Sky Lake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:1916
           Card-2: NVIDIA Device 134f bus-ID: 01:00.0 chip-ID: 10de:134f
           Display Server: X.Org 1.18.4 driver: nvidia Resolution: 1366x768@59.97hz
           GLX Renderer: GeForce 920MX/PCIe/SSE2 GLX Version: 4.5.0 NVIDIA 367.57 Direct Rendering: Yes
Audio:     Card Intel Sunrise Point-LP HD Audio driver: snd_hda_intel bus-ID: 00:1f.3 chip-ID: 8086:9d70
           Sound: Advanced Linux Sound Architecture v: k4.4.0-53-generic
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: d000 bus-ID: 02:00.0 chip-ID: 10ec:8168
           IF: enp2s0 state: down mac: <filter>
           Card-2: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter
           driver: ath9k bus-ID: 03:00.0 chip-ID: 168c:0036
           IF: wlp3s0 state: up mac: <filter>
Drives:    HDD Total Size: 1000.2GB (1.9% used)
           ID-1: /dev/sda model: ST1000LM024_HN size: 1000.2GB serial: S32XJ9GH311320
Partition: ID-1: / size: 50G used: 5.7G (13%) fs: ext4 dev: /dev/sda4
           ID-2: /home size: 172G used: 171M (1%) fs: ext4 dev: /dev/sda6
           ID-3: swap-1 size: 12.88GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
RAID:      System: supported: N/A
           No RAID devices: /proc/mdstat, md_mod kernel module present
           Unused Devices: none
Sensors:   System Temperatures: cpu: 40.0C mobo: N/A gpu: 0.0:40C
           Fan Speeds (in rpm): cpu: 2300
Repos:     Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
           deb http: //packages.linuxmint.com serena main upstream import backport #id:linuxmint_main
           deb http: //archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
           deb http: //archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
           deb http: //archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
           deb http: //security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
           deb http: //archive.canonical.com/ubuntu/ xenial partner
Info:      Processes: 206 Uptime: 3 min Memory: 697.2/7848.1MB
           Init: systemd v: 229 runlevel: 5 default: 2 Gcc sys: 5.4.0
Client: Unknown python2.7 client inxi: 2.2.35
Locked

Return to “Graphics Cards & Monitors”