Two more findings: 1) This doesn't only happen when the external screen is connected and then disconnected. Random from-time-to-time system freezes happen systematically whenever no external monitor is connected (no matter whether it has been connected and disconnected, or it has never been connected at all). And most astonishingly: 2) According to an NVidia technician who replied to a ticket I sent to the Customer Care, this is a bug in NVidia's drivers which they won't fix because they don't giv a f*** about Linux. Apparently this happens with Optimus-based cards only, or that's what they say. I'll copy and paste the conversation with the Customer Care agent below. I'd like to emphasize these two sentences: **** "The reason for this is, during Optimus development little thought was put into compatibility with systems other than Windows Vista and 7. Even Windows XP is not supported by Optimus. " and: **** "I apologize on behalf of NVIDIA for our lack of proper Optimus Linux support and our Marketing decision makers are aware of the situation." So there's little to do, except that Ubuntu should take steps to discourage people from using NVidia products. Below goes the entire conversation. Customer via CSS Web 08/11/2014 05:37 AM I need a fix or workaround to this critical bug that freezes the whole system. All the information here: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1353620 I wonder how you can release drivers so much broken. ==== Response Mike via Email 08/11/2014 09:56 AM Hi, Your issue was just referred to me. Do you happen to know if your laptop is Optimus based (switches between integrated Intel and NVIDIA graphics) ? You can check by running lspci -nn. If that command returns two VGA devices, one Intel and one NVIDIA then the laptop is Optimus. Unfortunately, Optimus laptops don't work with the NVIDIA Linux display driver for normal display purposes unless there is a way, usually in BIOS, to disable Optimus or disable the onboard Intel GPU. Please let me know if your laptop is Optimus or not and if so, if you can disable either the onboard Intel GPU or disable Optimus Best regards, Mike NVIDIA Customer Care ==== Customer via CSS Web 08/11/2014 10:40 AM Yes the laptop is optimus based. But I don't think the switching mechanism is being used. I attach the output of lspci -nn I can't find anything in the BIOS setup related to optimus or to disabling a specific GPU Note that the driver does work except for this intermittent issue which is clearly a bug you need to fix. Please suggest me any command that can confirm that the nvidia gpu is actually being used. I'm pretty sure I checked this and confirmed the nvidia gpu is being used, not the onboard intel one, only I can't remember what kind of test i ran. === Response Mike via Email 08/11/2014 02:31 PM NVIDIA documents known issues with Optimus laptops at the driver download page under the 'Additional Information' tab here http://www.nvidia.com/download/driverResults.aspx/76884/en-us where we say: "Note that the list of supported GPU products is provided to indicate which GPUs are supported by a particular driver version. Some designs incorporating supported GPUs may not be compatible with the NVIDIA Linux driver: in particular, notebook and all-in-one desktop designs with switchable (hybrid) or Optimus graphics will not work if means to disable the integrated graphics in hardware are not available. Hardware designs will vary from manufacturer to manufacturer, so please consult with a system's manufacturer to determine whether that particular system is compatible." Unfortunately there is no workaround but I will help if I can. Please provide your laptop model and I will check our records if anybody has found a way to make it work with the Linux driver. Regarding a command to check if you use the NVIDIA GPU, the command nvidia-settings should show that (if the command works). Also, the command 'nvidia-smi' would provide that information. === Customer via CSS Web 08/11/2014 05:29 PM I attach a screenshot from nvidia-settings and the output of nvidia-smi (at the end of this message). The laptop is an Acer Aspire V3-571G There's one thing I don't quite understand. "Note that the list of supported GPU products is provided to indicate which GPUs are supported by a particular driver version. Some designs incorporating supported GPUs may not be compatible with the NVIDIA Linux driver: in particular, notebook and all-in-one desktop designs with switchable (hybrid) or Optimus graphics will not work" That seems to talk about Optimus designs as if they were something created by laptop manufacturers and out of NVidia's control. However, NVidia Optimus carries NVidia's name and is advertized on your site as something NVidia proudly boasts of. So I don't understand how you can simply decide not to support it in your drivers. $ nvidia-smi Tue Aug 12 02:21:29 2014 +------------------------------------------------------+ | NVIDIA-SMI 331.38 Driver Version: 331.38 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce 710M Off | 0000:01:00.0 N/A | N/A | | N/A 50C N/A N/A / N/A | 412MiB / 2047MiB | N/A Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Compute processes: GPU Memory | | GPU PID Process name Usage | |=============================================================================| | 0 Not Supported | +-----------------------------------------------------------------------------+ === Customer CSS Web 08/11/2014 05:46 PM P.S. I'd like to be sure that you understood the peculiar nature of the issue at hand: - the system completely freezes from time to time, becoming apparently unresponsive to mouse and keyboard input (except ctrl+alt+f1 followed by ctrl+alt+f7 which fix the issue restoring normal operation) - this only happens when I disconnect the external montor (and sometimes, at the very moment when I reconnect it, at which point the freeze is unrecoverable), but never while the external monitor is connected. Do those look anything like the symptoms of a driver not working because of unsupported hybrid design? === Response Mike via Email 08/12/2014 09:43 AM To answer your questions: 1. Regarding lack of optimus support in NVIDIA Linux drivers: The reason for this is, during Optimus development little thought was put into compatibility with systems other than Windows Vista and 7. Even Windows XP is not supported by Optimus. On an Optimus notebook, we would need to take over control of the Intel driver and GPU to actually do the display. This requires a totally different driver architecture which we don't have the resources to develop. 2. Regarding if your symptoms look like they happen due to unsupported hybrid design: Yes, those symptoms are happening due to unsupported hybrid design. When you connect or disconnect an external display, the NVIDIA driver cannot properly manage both the integrated Intel and NVIDIA GPUs Solutions other users have tried with varying success: 1. open source bumblebee, unfortunately not supported by NVIDIA 2. the experimental modesetting driver, documented here: http://us.download.nvidia.com/XFree86/Linux-x86_64/340.24/README/optimus.html (results vary a lot depending on laptop design and this requires some tinkering) 3. use only the Intel driver Let me know if I can help further, === Customer via CSS Web 08/12/2014 02:54 PM > When you connect or disconnect an external display, the NVIDIA driver cannot properly manage both the integrated Intel and NVIDIA GPUs But if it can work properly most of the time (I experience no issue at all if I never disconnect the external monitor, and I think also if I never connect it, though I tried it only once), how comes you can't fix a bug that only appears randomly and sporadically? > "during Optimus development little thought was put into compatibility with systems other than Windows Vista and 7. " Wow, great. Good job! I totally wasted my money buying a laptop with an NVidia card, then. I'll take that into account next time I buy a computer. Just one last question: > 3. use only the Intel driver That means also using only the Intel GPU, doesn't it? That is, as if there was no NVidia card at all, right? === Response Mike via Email 08/13/2014 09:20 AM We can't fix the bug because it requires a driver re-architecture to properly support optimus and unfortunately we don't have the resources. Regarding using the Intel driver, yes, you would only be able to use the Intel GPU and I realize that this is not a good solution. I apologize on behalf of NVIDIA for our lack of proper Optimus Linux support and our Marketing decision makers are aware of the situation. Let me know if I can help further.