Cannot login with Nvidia Optimus hardware installed(Ubuntu 15.04)

Bug #1449560 reported by Shkil
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)
Expired
Low
Unassigned

Bug Description

I have Nvidia Optimus GT415M hardware on my laptop.

I've upgraded my Ubuntu 14.10 where everything was working fine with Nvidia Optimus to Ubuntu 15.04 and now I cannot login. After I type the password login screen comes back again.

I did complete reinstall of NVidia packages and installed new nvidia-346 package from Ubuntu repo.

Looking at Xorg.0.log I see this message:
[ 120.353] (EE) intel(G1): [drm] failed to set drm interface version: Permission denied [13].
[ 120.353] (II) intel(G1): [drm] Contents of '/sys/kernel/debug/dri/0/clients':
[ 120.353] (II) intel(G1): [drm] a dev pid uid magic
[ 120.354] (II) intel(G1): [drm]
[ 120.354] (II) intel(G1): [drm] y 0 2996 0 0
[ 120.354] (II) intel(G1): [drm] y 0 2996 0 0
[ 120.354] (EE) intel(G1): Failed to claim DRM device.

And I have found thread regarding this problem on https://devtalk.nvidia.com/default/topic/816599/prime-switching-to-nvidia-creates-black-screen/. So looks like hardware similar to mine need a new version of xserver-xorg-video-intel.

Could you please help with this.
---
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 346.59 Tue Mar 31 14:10:31 PDT 2015
 GCC version: gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
ApportVersion: 2.17.2-0ubuntu1.5
Architecture: amd64
CurrentDesktop: KDE
DistUpgraded: Fresh install
DistroCodename: vivid
DistroRelease: Ubuntu 15.04
DistroVariant: kubuntu
GraphicsCard:
 Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] (rev 18) (prog-if 00 [VGA controller])
   Subsystem: ASUSTeK Computer Inc. Device [1043:15a2]
 NVIDIA Corporation GF108M [GeForce GT 415M] [10de:0dee] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: ASUSTeK Computer Inc. Device [1043:15a2]
InstallationDate: Installed on 2011-07-25 (1525 days ago)
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
MachineType: ASUSTeK Computer Inc. N53Jg
NonfreeKernelModules: nvidia
Package: xorg 1:7.7+7ubuntu4
PackageArchitecture: amd64
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.19.0-28-generic root=UUID=ba2dd780-4798-4649-9a3c-77ff94804d1d ro splash quiet i915.semaphores=1
ProcVersionSignature: Ubuntu 3.19.0-28.30-generic 3.19.8-ckt5
Tags: vivid possible-manual-nvidia-install kubuntu
Uname: Linux 3.19.0-28-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin netdev plugdev sambashare
_MarkForUpload: True
dmi.bios.date: 10/14/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: N53Jg.206
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: N53Jg
dmi.board.vendor: ASUSTeK Computer Inc.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK Computer Inc.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrN53Jg.206:bd10/14/2010:svnASUSTeKComputerInc.:pnN53Jg:pvr1.0:rvnASUSTeKComputerInc.:rnN53Jg:rvr1.0:cvnASUSTeKComputerInc.:ct10:cvr1.0:
dmi.product.name: N53Jg
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK Computer Inc.
version.compiz: compiz 1:0.9.12.1+15.04.20150410.1-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.60-2
version.libgl1-mesa-dri: libgl1-mesa-dri 10.5.9-2ubuntu1~vivid2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 10.5.9-2ubuntu1~vivid2
version.nvidia-graphics-drivers: nvidia-graphics-drivers N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.17.1-0ubuntu3.1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.9.0-1ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.5.0-1ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917-1~exp1ubuntu2.2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau N/A
xserver.bootTime: Mon Sep 28 10:27:30 2015
xserver.configfile: /etc/X11/xorg.conf
xserver.errors:
 intel(G1): [drm] failed to set drm interface version: Permission denied [13].
 intel(G1): Failed to claim DRM device.
xserver.logfile: /var/log/Xorg.0.log
xserver.outputs:
 product id 8940
 vendor AUO
xserver.version: 2:1.17.1-0ubuntu3.1

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Confirmed
Revision history for this message
Rene Greuel (renegreuel) wrote :

Same problem for me. Temporarily workaround is to only use intel card by selecting it through prime-select. This requires that you have installed nvidia-prime:

- Get tty1 by pressing CTRL-ALT+F1

- Login with user with sudo rights

- Switch to intel card: "sudo prime-select intel"

- Restart lightdm: "sudo systemctl restart lightdm.service"

Hope this helps until this bug gets fixed.

Revision history for this message
Matt C (playsilicon) wrote :

I have the same problem and I always thought it was the NVIDIA drivers themselves.

Tried all the newer versions from "xorg-edgers", as well as the latest upstream Linux kernels (4.x+) and none of it helped.

Finally came across the NVIDIA devtalk post linked in the description of this bug report and then found this bug report itself.

The workaround mentioned by Rene works for me.

I want to help fix this, but I have no idea where to start.
So I'm just going to start with the X.org dev patch that Aaron made and maybe get in contact with him.

Revision history for this message
Matt C (playsilicon) wrote :
Revision history for this message
Matt C (playsilicon) wrote :

I have tried Aaron's patches myself and they do make the "Failed to claim DRM device." error messages in /var/log/Xorg.0.log disappear and the log looks like the NVIDIA driver is working fine, but I still boot to a black screen.

So there is either another problem, or those patches don't quite fix this issue.

Revision history for this message
Rene Greuel (renegreuel) wrote :

It really seems to be related to drm for i915 driver when switching to nvidia via prime-select and login via lightdm. The Xorg.0.log shows an error like:

[ 25.199] (EE) intel(G1): [drm] failed to set drm interface version: Permission denied [13].
[ 25.199] (II) intel(G1): [drm] Contents of '/sys/kernel/debug/dri/0/clients':
[ 25.199] (II) intel(G1): [drm] command pid dev master a uid magic
[ 25.199] (II) intel(G1): [drm] Xorg 2173 0 y y 0 0
[ 25.199] (II) intel(G1): [drm] Xorg 2173 0 n y 0 0
[ 25.199] (EE) intel(G1): Failed to claim DRM device.

I found a thread with an alternative workaround:
http://vxlabs.com/2015/02/05/solving-the-ubuntu-14-04-nvidia-346-nvidia-prime-black-screen-issue/
by switching the intel driver to modesetting in xorg.conf and preventing the gpu-manager from reverting. But I'm not really interested in doing a manual hack every time I want to switch.
I hope this will be fixed soon, at the latest when switching to "wily".

Revision history for this message
Rene Greuel (renegreuel) wrote :

I reinstalled my laptop with wily (15.10) while hoping kernel 4.2.0.7 could fix the problem. I got a step forward. The drm related error is gone, but a seg fault rises up in Xorg.log and I ended up in a black screen when switching to nvidia:

[ 1704.596] (EE) intel(G0): failed to set mode: Permission denied [13]
[ 1704.612] (EE)
[ 1704.612] (EE) Backtrace:
[ 1704.616] (EE) 0: /usr/bin/X (xorg_backtrace+0x4e) [0x56276b19962e]
[ 1704.617] (EE) 1: /usr/bin/X (0x56276afe5000+0x1b8999) [0x56276b19d999]
[ 1704.617] (EE) 2: /lib/x86_64-linux-gnu/libc.so.6 (0x7fe372b08000+0x352f0) [0x7fe372b3d2f0]
[ 1704.617] (EE) 3: /usr/bin/X (RRTellChanged+0x35e) [0x56276b0fd08e]
[ 1704.617] (EE) 4: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7fe36ccbe000+0x7184d) [0x7fe36cd2f84d]
[ 1704.617] (EE) 5: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7fe36ccbe000+0x71bad) [0x7fe36cd2fbad]
[ 1704.617] (EE) 6: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7fe36ccbe000+0x7316d) [0x7fe36cd3116d]
[ 1704.617] (EE) 7: /usr/lib/xorg/modules/drivers/intel_drv.so (0x7fe36ccbe000+0x77af5) [0x7fe36cd35af5]
[ 1704.617] (EE) 8: /usr/bin/X (0x56276afe5000+0x966b6) [0x56276b07b6b6]
[ 1704.617] (EE) 9: /usr/bin/X (0x56276afe5000+0x136c92) [0x56276b11bc92]
[ 1704.617] (EE) 10: /usr/bin/X (0x56276afe5000+0x5c3ec) [0x56276b0413ec]
[ 1704.617] (EE) 11: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf0) [0x7fe372b28a40]
[ 1704.617] (EE) 12: /usr/bin/X (_start+0x29) [0x56276b02b6c9]
[ 1704.617] (EE)
[ 1704.617] (EE) Segmentation fault at address 0x3d0
[ 1704.617] (EE)
Fatal server error:
[ 1704.617] (EE) Caught signal 11 (Segmentation fault). Server aborting
[ 1704.617] (EE)
[ 1704.617] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.

Revision history for this message
Rene Greuel (renegreuel) wrote :

Additional info:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Wily Werewolf (development branch)
Release: 15.10
Codename: wily

$ uname -r
4.2.0-7-generic

$ sudo apt-cache policy nvidia-352
nvidia-352:
  Installiert: 352.30-0ubuntu1
  Installationskandidat: 352.30-0ubuntu1
  Versionstabelle:
 *** 352.30-0ubuntu1 0
        500 http://de.archive.ubuntu.com/ubuntu/ wily/restricted amd64 Packages
        100 /var/lib/dpkg/status

$ sudo apt-cache policy xserver-xorg-video-intel
xserver-xorg-video-intel:
  Installiert: 2:2.99.917+git20150808-0ubuntu2
  Installationskandidat: 2:2.99.917+git20150808-0ubuntu2
  Versionstabelle:
 *** 2:2.99.917+git20150808-0ubuntu2 0
        500 http://de.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
penalvch (penalvch) wrote :

Shkil, thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:
apport-collect -p xorg 1449560

Please ensure you have the package xdiagnose installed, and that you click the Yes button for attaching additional debugging information.

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

affects: xserver-xorg-video-intel (Ubuntu) → xorg (Ubuntu)
Changed in xorg (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Shkil (shkilav) wrote : .proc.driver.nvidia.params.txt

apport information

tags: added: apport-collected kubuntu possible-manual-nvidia-install vivid
description: updated
Revision history for this message
Shkil (shkilav) wrote : BootLog.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : Dependencies.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : DkmsStatus.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : DpkgLog.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : HookError_source_xorg.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : JournalErrors.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : LightdmDisplayLog.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : LightdmGreeterLog.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : LightdmGreeterLogOld.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : LightdmLog.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : Lspci.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : Lsusb.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : ProcEnviron.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : ProcModules.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : UdevDb.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : UdevLog.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : XorgConf.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : XorgLog.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : XorgLogOld.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : nvidia-installer.log.txt

apport information

Revision history for this message
Shkil (shkilav) wrote : xserver.devices.txt

apport information

Revision history for this message
penalvch (penalvch) wrote :

ShkilAs per https://www.asus.com/Notebooks/N53Jg/HelpDesk_Download/ an update to your computer's buggy and outdated BIOS is available (209). If you update to this following https://help.ubuntu.com/community/BIOSUpdate does it change anything?

If it doesn't, could you please both specify what happened, and provide the output of the following terminal command:
sudo dmidecode -s bios-version && sudo dmidecode -s bios-release-date

For more on BIOS updates and linux, please see https://help.ubuntu.com/community/ReportingBugs#Bug_reporting_etiquette .

Please note your current BIOS is already in the Bug Description, so posting this on the old BIOS would not be helpful. As well, you don't have to create a new bug report.

Once the BIOS is updated, if the problem is still reproducible, and the information above is provided, then please mark this report Status New. Otherwise, please mark this as Invalid.

Thank you for your understanding.

tags: added: bios-outdated-209
Revision history for this message
Rene Greuel (renegreuel) wrote :

In the case of the reported ASUS laptop it could be a problem related to the BIOS version, but not in my case. And truely not in the case of a lot of other users.
Simply make a google search with "nvidia prime ubuntu black screen" and filter by date "last month". You will find tenth of results with people discussing about this problem. E.g.:
- https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-331/+bug/1362848
It seems that one solution is to enforce "sleep and wake-up" of display after switching to nvidia. Other people are still mentioning the switch to modesetting and deactivation of gpu-manager. Another solution seems to point out switching to gdm, which ends up in avoiding the "sleep/wake-up" problem related to light-dm.
I'm very disappointed that this bug report is handled like an individual problem. A lot of people have this problem and the workarounds are really nasty. It's an important feature for every user owning a laptop with an discrete nvidia card, because on one hand it's reducing the power consumption drastically and on the other hand enabling the full potential of a discrete card.

Revision history for this message
penalvch (penalvch) wrote :

Rene Greuel, it will help immensely if you filed a new report via a terminal:
ubuntu-bug xorg

Please ensure you have the package xdiagnose installed, and that you click the Yes button for attaching additional debugging information.

Also, please feel free to subscribe me to it.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xorg (Ubuntu) because there has been no activity for 60 days.]

Changed in xorg (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.