Nvidia driver does not work in Ubuntu GNOME trusty "14.04" (Optimus laptop)

Bug #1288572 reported by sgon00
78
This bug affects 15 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Fix Released
Medium
Ubuntu GNOME
Confirmed
Undecided
Unassigned
gnome-shell (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Environment:
  Asus Laptop U36JC
  Ubuntu GNOME 14.04, the Trusty Tahr, (AMD64)

I realized there were bugs "Bug #1262068" and "Bug #1283439". I am not sure if they are the same to my problem or not.

In Bug #1283439, it's about using lightdm. but I am running Ubuntu Gnome. The problem happens in gdm rather than lightdm.
In Bug #1262068, it says the bug is fixed. I tried "sudo apt-get update and then upgrade", the problem exists.

I installed nvidia driver by "sudo apt-get install nvidia-331".

Before installing nvidia driver, everything works fine under intel driver. After installing nvidia driver, I can only see a black screen. gdm can not be loaded. I tried to switch to lightdm. lightdm can be loaded, but I can not enter gnome with lightdm.
---
ApportVersion: 2.13.2-0ubuntu5
Architecture: amd64
CurrentDesktop: GNOME
DistroRelease: Ubuntu 14.04
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-03-04 (1 days ago)
InstallationMedia: Ubuntu-GNOME 14.04 "Trusty Tahr" - Alpha amd64 (20140226)
Package: nvidia-prime 0.5.7
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 3.13.0-12.32-generic 3.13.4
Tags: trusty third-party-packages
Uname: Linux 3.13.0-12-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True

Revision history for this message
Tim Lunn (darkxst) wrote :

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 1288572

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.

Changed in nvidia-prime (Ubuntu):
status: New → Incomplete
Revision history for this message
sgon00 (sgon00) wrote : Dependencies.txt

apport information

tags: added: apport-collected third-party-packages
description: updated
Revision history for this message
sgon00 (sgon00) wrote : ProcEnviron.txt

apport information

Revision history for this message
sgon00 (sgon00) wrote :
Revision history for this message
sgon00 (sgon00) wrote :
Revision history for this message
sgon00 (sgon00) wrote :
Revision history for this message
sgon00 (sgon00) wrote :
Changed in nvidia-prime (Ubuntu):
status: Incomplete → New
Revision history for this message
sgon00 (sgon00) wrote :

Resubmit :0-slave.log with debug enabled.

Tim Lunn (darkxst)
affects: nvidia-prime (Ubuntu) → gnome-shell (Ubuntu)
Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Tim Lunn (darkxst)
Changed in gnome-shell (Ubuntu):
status: Incomplete → Triaged
Changed in gnome-shell:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Tim Lunn (darkxst) wrote :

sgon00, can you grab xrandr logs as well (for the broken configuration, prime-select nvidia).

running something like the following from ssh should do.

export DISPLAY=:0
xrandr -q
xrandr --listproviders

Revision history for this message
sgon00 (sgon00) wrote :

$ startx metacity

$ export DISPLAY=:1

$ xrandr -q
Screen 0: minimum 8 x 8, current 640 x 480, maximum 8192 x 8192

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x28b cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 0 name:NVIDIA-0
Provider 1: id: 0x45 cap: 0x2, Sink Output crtcs: 2 outputs: 4 associated providers: 0 name:modesetting

Revision history for this message
Tim Lunn (darkxst) wrote :

xrandr is not seeing any outputs

run

xrandr --setprovideroutputsource modesettings NVIDIA-0

then try xrandr -q again

Revision history for this message
Tim Lunn (darkxst) wrote :

xrandr --setprovideroutputsource modesetting NVIDIA-0

Revision history for this message
sgon00 (sgon00) wrote :

the command "xrandr --setprovideroutputsource modesetting NVIDIA-0" will kill the X server run by "startx metacity".
please check the attachment file for "startx metacity" output.

Revision history for this message
sgon00 (sgon00) wrote :
Revision history for this message
Tim Lunn (darkxst) wrote : Re: [Bug 1288572] Re: Nvidia driver does not work in Ubuntu GNOME trusty "14.04" (Optimus laptop)

try putting it in ~/.xinitrc then
On 07/03/14 15:01, sgon00 wrote:
> the command "xrandr --setprovideroutputsource modesetting NVIDIA-0" will kill the X server run by "startx metacity".
> please check the attachment file for "startx metacity" output.
>
> ** Attachment added: "startx_metacity_output.txt"
> https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1288572/+attachment/4010753/+files/startx_metacity_output.txt
>

Revision history for this message
Tim Lunn (darkxst) wrote :

try putting it in ~/.xinitrc then
so it gets run when you run startx metacity

On 07/03/14 15:01, sgon00 wrote:
> the command "xrandr --setprovideroutputsource modesetting NVIDIA-0" will kill the X server run by "startx metacity".
> please check the attachment file for "startx metacity" output.
>
> ** Attachment added: "startx_metacity_output.txt"
> https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1288572/+attachment/4010753/+files/startx_metacity_output.txt
>

Revision history for this message
sgon00 (sgon00) wrote :

I am not sure if I do it correctly. the xrandr -q gives the same result:

$ cat ~/.xinitrc
xrandr --setprovideroutputsource modesetting NVIDIA-0

$ startx metacity

$ xrandr -q
Screen 0: minimum 8 x 8, current 640 x 480, maximum 8192 x 8192

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x28b cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 0 name:NVIDIA-0
Provider 1: id: 0x45 cap: 0x2, Sink Output crtcs: 2 outputs: 4 associated providers: 0 name:modesetting

Revision history for this message
Tim Lunn (darkxst) wrote :

according to the nvidia docs you want

~/.xinitrc
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

once that actually works, xrandr -q should list the outputs on your intel card.

Revision history for this message
sgon00 (sgon00) wrote :

Hi Tim, I am sorry to say that, everything is still the same after adding "xrandr --auto". Anything else I can try? thanks.

Revision history for this message
Tim Lunn (darkxst) wrote :

OK First, we really need to know if this is a general problem, or specific to your hardware.

Can you try under a Lightdm/Unity (on nvidia) session and get the 'xrandr -q' output from there. Does that correctly show the output devices (and modes)?

If it does I will try and prepare a gdm patch to mimic what lightdm does currently.

Revision history for this message
sgon00 (sgon00) wrote :

Before switching to ubuntu-gnome 14.04, I was using Lubuntu 14.04. Nvidia driver works fine with Lubuntu 14.04 64bit. The reason why I switched from Lubuntu is because Bug #1278062
I will try to install unity then.

Revision history for this message
sgon00 (sgon00) wrote :

Hi Tim,

1, I think unity is too big, I installed lxde. Hopefully that is the same to what you want. I know lxde will work because I used Lubuntu 14.04 trusty amd64.

2, lightdm with unity greeter can not enter lxde somehow. I don't know why. maybe failed to select LXDE? To workaround this issue, I installed "lightdm-gtk-greeter" and use gtk greeter instead of unity greeter by creating a file "/etc/lightdm/lightdm.conf"

3, Now, I can enter LXDE with lightdm with lightdm-gtk-greeter. I can confirm that I am running nvidia driver by running "nvidia-settings". The following hopefully is what you want (in LXDE):

 $ xrandr -q
Screen 0: minimum 8 x 8, current 1366 x 768, maximum 8192 x 8192
LVDS-1-0 connected 1366x768+0+0 (normal left inverted right x axis y axis) 293mm x 165mm
   1366x768 60.0*+
   1360x768 59.8 60.0
   1024x768 60.0 60.0
   960x720 60.0
   928x696 60.1
   896x672 60.0
   960x600 60.0
   960x540 60.0
   800x600 60.0 60.3 56.2
   840x525 60.0 59.9
   800x512 60.2
   700x525 60.0
   640x512 60.0
   720x450 59.9
   640x480 60.0 59.9
   680x384 59.8 60.0
   576x432 60.1
   512x384 60.0
   400x300 60.3 56.3
   320x240 60.1
VGA-1-0 disconnected (normal left inverted right x axis y axis)
HDMI-1-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1-0 disconnected (normal left inverted right x axis y axis)

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x28b cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x45 cap: 0x2, Sink Output crtcs: 2 outputs: 4 associated providers: 1 name:modesetting

Revision history for this message
Tim Lunn (darkxst) wrote :

yeh that looks good,
can you try 'gnome-shell --replace' from within the lxde session. If that works, then my gdm patches may have a chance of succeeding.

Revision history for this message
sgon00 (sgon00) wrote :

Sorry, that crashes. I will attach the file /var/crash/_usr_bin_gnome-shell.1000.crash.

The following is stdout:

$ gnome-shell --replace
Window manager warning: Log level 6: The program 'gnome-shell' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 345 error_code 8 request_code 140 minor_code 30)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Trace/breakpoint trap (core dumped)

Changed in gnome-shell:
status: New → Incomplete
Revision history for this message
Tim Lunn (darkxst) wrote :
Revision history for this message
sgon00 (sgon00) wrote :

What is the status of this bug? What else I can provide to fix it? Nvidia driver doesn't work at all in ubuntu-gnome release. This should be critical. Thanks.

Revision history for this message
Tim Lunn (darkxst) wrote :

sgon00, if you launch gnome-shell from lightdm, do you get any logs or crashes?

Revision history for this message
sgon00 (sgon00) wrote :

Hi Tim, I have already uploaded the crash file in comment #24. Is that what you want? Thanks a lot.

Revision history for this message
Tim Lunn (darkxst) wrote :

the crash was from running "gnome-shell --replace" under lxde was it not?

can you try login directly to gnome-shell session from lightdm.

logs should be in
~/.cache/upstart/gnome-session.log

Revision history for this message
sgon00 (sgon00) wrote :

Hi Tim, you are right, the comment #24 file is from "gnome-shell --replace" under lxde. I tried to login directly to gnome-shell session from lightdm. That is unsuccessful. I can only see my mouse cursor. nothing else. everything is black screen except my mouse cursor.

First, the log file here is "gnome-session-gnome.log" instead of "gnome-session.log"

Second, I am not sure how "gnome-session-gnome.log" works. Will every login create a new log file? or simply append to that log file? I did "cp gnome-session-gnome.log /somedir/" at the session I can not login gnome with nvidia driver by using VT. Then I login to gnome with intel driver successfully, when I check the updated log file, the first part of the file is the same. I am attaching both log files.

One is at the time I failed to login gnome-shell with lightdm+nvidia. Another one is at the time I login gnome-shell successfully with gdm+intel.

Thanks.

Revision history for this message
sgon00 (sgon00) wrote :

This one is at the time I login gnome-shell successfully with gdm+intel.

Revision history for this message
Tim Lunn (darkxst) wrote :

gnome-shell is crashing in both those cases (although for the gdm+intel, gnome-shell respawns), does apport not pick up any crashes?

Revision history for this message
sgon00 (sgon00) wrote :

Tim,

apport does not pick up any crahses.

If my memory is not wrong, I remember the first time after fresh installing ubuntu-gnome 14.04 beta1, apport picked up a crash report at the first time I login gnome-shell. That is the only time. There is no crash report now in /var/crash/. I have already removed them.

Revision history for this message
sgon00 (sgon00) wrote :

Refer to #1290792, this apport pupup after I do "apt-get purge nvidia-331 nvidia-prime" and then "apt-get autoremove".

Revision history for this message
sgon00 (sgon00) wrote :

Sorry , I mean Bug #1290792

Revision history for this message
sgon00 (sgon00) wrote :

I tried purge nvidia-331 and nvidia-prime. Then install "nvidia-current" without nvidia-prime package. I still can NOT see login screen. (GDM).
Regardless which nvidia driver I use, it does NOT work.
I am very confused. No develoepr really cares about this bug. Will ubuntu-gnome 14.04 LTS release without nvidia-driver support?

Revision history for this message
Tim Lunn (darkxst) wrote :

sgon00,

we do care, however
1. we don't have any hardware to test on
2. we are volunteers who also have real life stuff that takes priority

also I still have no idea if this is some specific bug with your hardware or a general issue with nvidia-prime. lightdm+gnome-shell should in theory work fine right now.

Revision history for this message
sgon00 (sgon00) wrote :

0, thank you very much for your concern and time.
1, I can do whatever you ask me to do. To debug this issue, I have installed many packages including lightdm and lxde etc... but there is no progress made here. You are the only developer (if you are) who subscribes to this bug.
2, I don't think this issue is specific to my hardware. I just have a very normal laptop. I tried "nvidia-331 with nvidia-prime" and "nvidia-current without nvidia-prime". Both don't work in ubuntu gnome 14.04 latest build. I don't care of my intel graphic card at all. I just want to use nvidia driver in ubuntu gnome. What else do you need from me? Please let me know. I will provide anything you want.
Thank you very much again.

Revision history for this message
Tim Lunn (darkxst) wrote :

sgon00, ping me on IRC tomorrow

Revision history for this message
Tim Lunn (darkxst) wrote :

sgon00, can you generate another stacktrace under lxde nvidia session using

`GDK_SYNCHRONIZE=1 gnome-shell --replace`

Revision history for this message
sgon00 (sgon00) wrote :
Changed in gnome-shell:
status: Incomplete → New
Revision history for this message
Tim Lunn (darkxst) wrote :

sgon00,
  Can you please test with mutter_3.10.4-0ubuntu2

1. gnome-shell --replace under lxde session
2. login to gnome-shell from lightdm

If both those work, then we can close this bug and look at fixing gdm as per bug #1262068

Changed in gnome-shell:
status: New → Confirmed
Revision history for this message
Eric Goulet (eric-m-goulet) wrote :

I am running 331.38, logging in with lightdm, using the gnome-shell right now.

home@home-XPS-L501X:~$ xrandr -q
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
LVDS-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080 60.0*+
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)

I do experience a brief oddity though: The first time I logged in with lightdm, my screen was black for about 5 seconds before the gnome-shell loaded. I restarted the computer just to try it again and instead of a black screen, there was a mess of screen tearing and some of what I could see in the tears was residual from before I restarted. The 5 seconds ended and everything is normal in the gnome-shell.

Revision history for this message
Eric Goulet (eric-m-goulet) wrote :

Also, the gnome-shell loses the lock button, however this may be an expected behavior.

Revision history for this message
Andrew Gee (ahg-e) wrote :

I have observed exactly the same behaviour as Eric Goulet. nvidia 331.38, lightdm, gnome-shell slow to start after login, with a residual mess from the last gnome session displaying for around 5 seconds.

Revision history for this message
Tim Lunn (darkxst) wrote :

Eric, can you also paste 'xrandr --listproviders' output, that may still be running on the Intel card

Revision history for this message
Eric Goulet (eric-m-goulet) wrote :

home@home-XPS-L501X:~$ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x279 cap: 0x1, Source Output crtcs: 2 outputs: 4 associated providers: 0 name:NVIDIA-0
home@home-XPS-L501X:~$

Revision history for this message
Tim Lunn (darkxst) wrote :

Eric, that does not look like an Optimus laptop with hybrid graphics (i.e. Intel and Nvidia)

Revision history for this message
Tim Lunn (darkxst) wrote :

sgon00, have you had a chance to test this yet? I would like to get the gdm changes done + tested over the weekend if possible. Beta freeze is on Monday.

Revision history for this message
sgon00 (sgon00) wrote :
Download full text (3.3 KiB)

Hi Tim,

Sorry about the late reply. I was sick. I tested with the following packages:

$ dpkg -l | grep -i mutter
ii gir1.2-mutter-3.0 3.10.4-0ubuntu2 amd64 GObject introspection data for Mutter
ii libmutter0c 3.10.4-0ubuntu2 amd64 window manager library from the Mutter window manager
ii mutter 3.10.4-0ubuntu2 amd64 lightweight GTK+ window manager
ii mutter-common 3.10.4-0ubuntu2 all shared files for the Mutter window manager

$ dpkg -l | grep -i nvidia
ii bbswitch-dkms 0.7-2ubuntu1 amd64 Interface for toggling the power on nVidia Optimus video cards
ii libcuda1-331 331.38-0ubuntu6 amd64 NVIDIA CUDA runtime library
ii nvidia-331 331.38-0ubuntu6 amd64 NVIDIA binary driver - version 331.38
ii nvidia-331-uvm 331.38-0ubuntu6 amd64 NVIDIA Unified Memory kernel module
ii nvidia-libopencl1-331 331.38-0ubuntu6 amd64 NVIDIA OpenCL Driver and ICD Loader library
ii nvidia-opencl-icd-331 331.38-0ubuntu6 amd64 NVIDIA OpenCL ICD
ii nvidia-prime 0.6.1 amd64 Tools to enable NVIDIA's Prime
ii nvidia-settings 331.20-0ubuntu8 amd64 Tool for configuring the NVIDIA graphics driver

Case 1: lightdm, gnome-shell --replace in lxde
    First attempt: the user is forced to logout. I am not sure what exactly happens. maybe the X server gets killed and restarted?
    Second attempt: it kinda works. I don't really see the top bar of gnome-shell. But when I click "shutdown" button, I can see the top bar of gnome-shell with weird layouts. I think this might because nvidia driver does not detect and setup my monitor correctly somehow. Please check the screenshot files: gnome-shell-replace-lxde.png and gnome-shell-replace-lxde-shutdown.png.

Case 2: login to gnome-shell directly from lightdm
    This kinda works. The layout of the monitor is still crazy. Again, nvidia driver does not setup my monitor correctly. Please check the screenshot files: lightdm_gnome-shell.png and lightdm_gnome-shell2.png

$ xrandr --listproviders
Providers: number : 3
Provider 0: id: 0x28b cap: 0x1, Source Output crtcs: 2 outputs: 2 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x45 cap: 0x2, Sink Output crtcs: 2 outputs: 4 associated providers: 1 name:modesetting
Provider 2: id: 0x45 cap: 0x2, Sink Output crtcs: 2 outputs: 4 associated providers: 1 name:modesetting

Case 3: switch to gdm
    gdm can not be started. black screen.

N...

Read more...

Revision history for this message
sgon00 (sgon00) wrote :
Revision history for this message
sgon00 (sgon00) wrote :

Attachment: gnome-shell-replace-lxde-shutdown.png

Revision history for this message
sgon00 (sgon00) wrote :

Attachment: lightdm_gnome-shell.png

Revision history for this message
sgon00 (sgon00) wrote :

Attachment: lightdm_gnome-shell2.png

Revision history for this message
Eric Goulet (eric-m-goulet) wrote :

Apologies, Tim. I dug into it a little further, and it seems because I have an i7 with the GT435M (which does support Optimus), there is no integrated chip/Optimus. If I had the i5 this would be a different story. I can hide my comments, if needed.

Revision history for this message
sgon00 (sgon00) wrote :

The correct resolution should be 1366x768.
nvidia-settings shows two displays 1, X screen 0 (no idea what it is) 2, CRT-0 (which is using configuration X screen 0) with 680x384 resolution (you can see this from the screenshot image).
I tried to set CRT-0 to 1366x768 in nvidia-settings. But it failed. It said there were errors in the configurations. something like that.
I have purged all nvidia-* packages so that I can use my intel driver properly now.

Revision history for this message
Tim Lunn (darkxst) wrote :

re #50, that is showing 2 modesetting providers but there should only be one. something odd is going on there (unrelated to the mutter update), also gdm is not expected to work until I patch it.

CRT-0 is usually an external monitor, LVDS are generally the builtin LCD panels. This part of the story sounds like a nvidia bug, but would be interesting to see what xrandr -q says

Revision history for this message
Tim Lunn (darkxst) wrote :

@Eric, maybe the integrated intel chip is just disabled in the BIOS? i7 do have integrated GPU.

Revision history for this message
sgon00 (sgon00) wrote :

Hi Tim,

Just FYI, even with intel driver, there is a very small problem. When I login to gnome-shell with gdm, the layout looks good. But it actually has a hidden unknown display. Everytime my mouse moves to the right edge, the mouse cursor can exceed the edge. When I check with system settings --> Displays, it shows a "Unknown Display" with 1024x768 resolution. This is weird. It's not a big problem. I can leave as what it is. I can not see the "Unknown Display" from my eyes. It does not screw my layout. If I want, I can simply turn it off in "System Settings --> Displays". This might not be related to this bug, since it's a intel driver problem. just FYI. I am attaching a screenshot image in this comment. (captured by clicking 'Prt Sc' button).

Revision history for this message
sgon00 (sgon00) wrote :

Hi Tim,

I installed nvidia-331 and nvidia-331-uvm again.

Forgot to mention that lightdm screen resolution is not correct either. It has a smaller resolution at the left top corner of the screen. lightdm occupies about 2/3 of the monitor. Please check the xrandr -q output from "lightdm + gnome-shell":

$ xrandr -q
Screen 0: minimum 8 x 8, current 1366 x 768, maximum 8192 x 8192
VGA-0 connected primary 680x384+0+0 (normal left inverted right x axis y axis) 0mm x 0mm panning 1366x768+0+0
   680x384 60.0*+
   1366x768 60.0
   1360x768 60.0
HDMI-0 disconnected (normal left inverted right x axis y axis)
LVDS-1-0 connected 1366x768+0+0 (normal left inverted right x axis y axis) 293mm x 165mm
   1366x768 60.0*+
   1360x768 59.8 60.0
   1024x768 60.0 60.0
   960x720 60.0
   928x696 60.1
   896x672 60.0
   960x600 60.0
   960x540 60.0
   800x600 60.0 60.3 56.2
   840x525 60.0 59.9
   800x512 60.2
   700x525 60.0
   640x512 60.0
   720x450 59.9
   640x480 60.0 59.9
   680x384 59.8 60.0
   576x432 60.1
   512x384 60.0
   400x300 60.3 56.3
   320x240 60.1
VGA-1-0 disconnected (normal left inverted right x axis y axis)
HDMI-1-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1-0 disconnected (normal left inverted right x axis y axis)
  1366x768 (0x46) 69.3MHz
        h: width 1366 start 1425 end 1464 total 1472 skew 0 clock 47.1KHz
        v: height 768 start 773 end 782 total 785 clock 60.0Hz
  1360x768 (0x48) 72.0MHz
        h: width 1360 start 1408 end 1440 total 1520 skew 0 clock 47.4KHz
        v: height 768 start 771 end 781 total 790 clock 60.0Hz
  680x384 (0x5c) 36.0MHz
        h: width 680 start 704 end 720 total 760 skew 0 clock 47.4KHz
        v: height 384 start 385 end 390 total 395 clock 60.0Hz

Revision history for this message
sgon00 (sgon00) wrote :

I am attaching the current state screenshot again. You can see nvidia-settings window inside this image. Not sure if this is useful or not.
In X Server Configuration Options, it has two selections. "X Screen 0" and "CRT-0". I do NOT have any external monitors connected. I am using the built-in monitor only.

Revision history for this message
sgon00 (sgon00) wrote :

Sorry, forgot the screenshot image in last comment. Please let me know what else do you need before I purged all nvidia-* packages. I can not use my laptop like this (shown in the screenshot image).

Revision history for this message
sgon00 (sgon00) wrote :
Download full text (3.6 KiB)

Hi Tim,

I found a workaround to use nvidia driver with lightdm + gnome-shell.
WIth nvidia-331 driver, lightdm and gnome-shell, in "System Settings" (gnome-control-center) --> "Displays", I can still see two displays "Built-in DIsplay" and "Unknown Display". This is the same to "Intel driver" situation. All the layout problems I met so far can be fixed by turning off "Unknown Display" in gnome-control-center. After turning off the "Unknown Display", gnome-shell works perfectly. And then I tried to launch "nvidia-settings", it shows "CRT-0 Off". I am thinking the "Unknown Display" might be refer to CRT-0 (VGA-0) ?

Note: I tried to configure "nvidia-settings" layout, it does not work. In "nvidia-settings", It only has CRT-0. (CRT-0 is using "X Screen 0" configuration. and in "X Screen 0" --> "X Server XVideo Settings", it shows CRT-0 is the same as VGA-0. Hopefully, this paragraph is not confusing you.)

PS: I am not sure how to upload multiple files at once or even if that is possible in launchpad. I will upload three screenshots to make my words more clear.

nvidia-builtin-display.png is a screenshot which shows built-in display setup in gnome-control-center before turning off "Unknown Display".
nvidia-unknown-display.png is a screenshot which shows unknown display setup in gnome-control-center before turning off "Unknown Display".
nvidia-turnoff-unknown.png is a screenshot after turning off "Unkown Display". You can see that the layout looks perfectly by turning it off.

I have no idea why both intel driver and nvidia driver think I have an extra "Unknown Display" VGA-0 or CRT-0.
In the end, I will show the final "xrandx -q" output after turning off "Unknown Dispaly":

$ xrandr -q
Screen 0: minimum 8 x 8, current 1366 x 768, maximum 8192 x 8192
VGA-0 connected primary (normal left inverted right x axis y axis)
   680x384 60.0 +
   1366x768 60.0
   1360x768 60.0
HDMI-0 disconnected (normal left inverted right x axis y axis)
LVDS-1-0 connected 1366x768+0+0 (normal left inverted right x axis y axis) 293mm x 165mm
   1366x768 60.0*+
   1360x768 59.8 60.0
   1024x768 60.0 60.0
   960x720 60.0
   928x696 60.1
   896x672 60.0
   960x600 60.0
   960x540 60.0
   800x600 60.0 60.3 56.2
   840x525 60.0 59.9
   800x512 60.2
   700x525 60.0
   640x512 60.0
   720x450 59.9
   640x480 60.0 59.9
   680x384 59.8 60.0
   576x432 60.1
   512x384 60.0
   400x300 60.3 56.3
   320x240 60.1
VGA-1-0 disconnected (normal left inverted right x axis y axis)
HDMI-1-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1-0 disconnected (normal left inverted right x axis y axis)
  1366x768 (0x46) 69.3MHz
        h: width 1366 start 1425 end 1464 total 1472 skew 0 clock 47.1KHz
        v: height 768 start 773 end 782 total 785 clock 60.0Hz
  1360x768 (0x48) 72.0MHz
        h: width 1360 start 1408 end 1440 total 1520 skew 0 clock 47.4KHz
        v: height 768 start 771 end 781 total 790...

Read more...

Revision history for this message
sgon00 (sgon00) wrote :

Screenshot: nvidia-unknown-display.png

Revision history for this message
sgon00 (sgon00) wrote :

Screenshot: nvidia-turnoff-unknown.png

Revision history for this message
sgon00 (sgon00) wrote :

One more weird problem. After I reload gnome-shell by using Alt+F2 -- r, and then reboot the system. Login to gnome-shell becomes black screen. Even if with black screen, gnome-shell is actually working, this is because if I do "ctrl+alt+T" blindly to open a terminal and then press "Backspace" button, I can hear the beep sound even if I can only see a black screen. And then I tried to switch to "Ctrl+Alt+F1" virtual console. and switch back to "Ctrl+Alt+F7". The screen display is not updated. (I am not sure how to express this clearly in English. VT7 shows VT1 screen capture. The screen display is not updated. something like this). And then I keep switching btw VT1 and VT7. Suddently, gnome-shell appears after many switches. I can reproduce this behavior many times after rebooting the machine. Hopefully, my words make sense.

Revision history for this message
Tim Lunn (darkxst) wrote :

sgon00, the layout issues with gnome-shell is not a bug really, gnome-shell will put the panel on the primary display which according to the xrandr output above is the non-existant VGA-0 display.

The xrandr output in #22 was correct, so something must have changed since then. This will be unrelated to GNOME, so you should file a new bug for this issue (against nvidia-prime I guess) with xrand -q and xrandr --listoutputproviders output and Xorg logs

Not sure about #66, are you saying this only happens if you reload gnome-shell and then reboot? or does it always happen on every reboot?

Revision history for this message
Tim Lunn (darkxst) wrote :

please test with ppa:darkxst/gdm-prime, that should get gdm working with nvidia-prime!

Revision history for this message
sgon00 (sgon00) wrote :

Hi Tim,

Regarding my comment #66, it always happens on every reboot now. I have no idea what causes this. Please check the following exact steps that I did:
1, Install https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet extension manually by git clone
2, Alt+F2, then "r", Enter, to reload gnome-shell. Monitor becomes black.
3, Switch to VT1 and sudo reboot
4, Login to gnome-shell becomes black from now on at every reboot.
5, I removed the extension by "rm -rf ~/.local/share/gnome-shell/extensions/".
6, even if with the extension removed, Login to gnome-shell becomes black screen at every/all reboots.
Since this happens without that extension, I don't think the extension is the cause. I don't know much about gnome-shell and I have no idea what's going on. The workaround I found in comment #66 is not always working. Swiching btw VT1 and VT7 may not bring the screen back. I tried many times today, it does not come back this time. But I can confirm that gnome-shell is actually runing, because I can hear the beep sound if I launch terminal by "Ctrl+Alt+T" and then press "Backspace" button.

Reply to your comment #68, I added your ppa and installed gdm.
$ dpkg -l | grep gdm
ii gdm 3.10.0.1-0ubuntu4~trusty2 amd64 Next generation GNOME Display Manager
ii gir1.2-gdm-1.0 3.10.0.1-0ubuntu4~trusty2 amd64 GObject introspection data for the GNOME Display Manager
ii libgdm1 3.10.0.1-0ubuntu4~trusty2 amd64 Next generation GNOME Display Manager (shared libraries)

It does not really work. The current behavior is different from the old behavior though. I am not sure if this is caused by my layout problem or not. What I see is a twinkling/flickering screen in gdm. (sorry about my english word, not sure which word is correct). The gdm screen is twinkling/flickering between black (off) and gray background forever. I tried to switch to VT1 and then back to VT7, first time, I saw error popup message "Could not switch the monitor configuration, could not set the configuration for CRTC 652". and then I close this popup. and swtich to VT1 again and back to VT7, I saw another similar popup error window "Could not switch the monitor configuration, could not set the configuration for CRTC 63". and then I closed the window again and switch to VT1 and back to VT7. The gdm screen becomes gray background with a "X" mouse cursor forever. This is what happens. Again, hopefully, my words make sense. PS: I am getting sick/crazy with this issue. LXDE works fine, but nvidia-settings in LXDE shows "CRT-0 (VGA-0)" only. This is wrong too even if lxde actually works fine with 1366x768 resolution from my eyes.

Revision history for this message
Tim Lunn (darkxst) wrote :

I think the non-existent primary display (VGA-0) is still causing troubles. I suspect once that is fixed things will work properly, so you should file a bug for that one.

Also the settings you applied when in a gnome-shell user session, won't apply for gdm.

I occasionally see that flickering on my second monitor, this is also possibly a bug in the Nvidia driver.

Revision history for this message
Tim Lunn (darkxst) wrote :

sgon00, btw does your Xorg.conf show the non-existent display?

Revision history for this message
sgon00 (sgon00) wrote :

Tim, I don't really understand xorg.conf syntax. I am attaching my xorg.conf file in this comment. You can have a look. I never touch this file manually. This file must be auto-generated by some programs. The last modification date of this file is at yesterday.

Revision history for this message
Tim Lunn (darkxst) wrote :

It is now (as of recently) generated by gpu-manager (which is part of ubuntu-drivers-common). Actually quite a few changes have landed to various components related to nvidia prime since you posted the correct results.

I am marking this bug as fix released since I'm fairly confident the gnome-shell issues are resolved. I also believe that gdm will work properly once the case of non-existent display is fixed. If there are further gdm issues after that please follow up that issue on Bug 1262068.

Please file a new bug for the non-existent display issue with xrandr outputs and Xorg logs, hopefully the Ubuntu devs will have more of an idea to figure that out!

Changed in gnome-shell (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
sgon00 (sgon00) wrote :

Tim, thank you very much for your time, help and work. I have fired a new bug #1296020 for non-existent display issue.

Revision history for this message
Tim Lunn (darkxst) wrote :

sgon00, as a possible workaround you could probably turn of VGA-0 using xrandr in /sbin/prime-offload

xrandr --output VGA-0 --off

or

you could try making LVDS primary, by adding "--primary" option to the very last line in /sbin/prime-offload

Revision history for this message
sgon00 (sgon00) wrote :

Tim, I added "xrandr --output VGA-0 --off" to /sbin/prime-offload. lightdm resolution issue is fixed. but gdm and gnome-shell still have the same problems. gdm is flickering and fails to start. gnome-shell is a black (off) screen when login with lightdm. Maybe these problems are not related to my non-existent display?
PS: I tried the command "xrandr --output LVDS-1-0 --primary", it returns "X Error of failed request: BadMatch (invalid parameter attributes)" in terminal. Thus, I haven't tried to put it in the prime-offload yet.

Revision history for this message
sgon00 (sgon00) wrote :

Tim,

I removed all changes in /sbin/prime-offload. (removed the two xrandr lines I added manually)
I installed ubuntu-drivers-common 1:0.2.91.2~trusty3 as you asked in IRC.
This new package does not solve gdm and gnome-shell problems.
I found a workaround to solve gdm and gnome-shell issue by adding the following to /etc/X11/xorg.conf:

Section "Monitor"
    Identifier "VGA-0"
    Option "Ignore" "True"
EndSection

After the above modification/addition of xorg.conf, gdm and gnome-shell can be loaded successfully with nvidia-driver.

Revision history for this message
sgon00 (sgon00) wrote :

Tim, one more question, today, when I'm trying to connect an external monitor, the gdm meets the flickering issue again. Does this mean the current gdm can not use multiple displays? if so, is this a bug? thanks.

Changed in gnome-shell:
status: Confirmed → Fix Released
Revision history for this message
Pedro I. Sanchez (pirivan) wrote :

What does "Fix Released" mean?

I just finished a fresh clean install of ubuntu-gnome, and I hit this bug.
If I install the nvidia-331 drivers, then I cannot login to my laptop any more.

The fix in #77 didn't work for me :(

So, what exactly has been released? which new packages?

Thanks

Revision history for this message
Tim Lunn (darkxst) wrote :
Revision history for this message
claudio (c-caccia) wrote :

HI,
I also have finished a fresh install of ubuntu gnome 14-04 on a xps L501X laptop.
Without Nvidia drivers the system is working (even with the ghost display that can be turned off), but as soon as I try to install Nvidia drivers (319 or 331, from synaptic, form Additional Drivers, from command line) I cannot login any longer.
I have got the update 1:0.2.91.6 installed.
The only thing that I can do is to boot in recovery mode, remove invidia drivers and so I can login again.

Is there a specific sequence, or am I missing something?

Thanks

Revision history for this message
Cristian Tala (naito-neko) wrote :

I am having the same issue.

Hybrid card Nvidia 9300M and a Notebook Vaio VGN-Z570FN.

I am also having a "Ghost" Screen and a Black background when I log in.

Revision history for this message
Shalki Agarwal (agarwalshalki) wrote :

I am having the same issue. I recently installed nvidia drivers and cuda on my ubuntu and it is working with lightdm but as soon as i log in to gnome it shows me a black screen.

Is this issue resolved? Did anyone find a solution to this?

Revision history for this message
cyberalex4life (cyberalex4life) wrote :

Please, take a look at this bug also:
https://bugs.launchpad.net/ubuntu-gnome/+bug/1354142

Revision history for this message
Stefan (boldos) wrote :

I still have the issue as descripbed above.
Running on freshly installed ubuntu gnome 14.04.1.
Having notebook with intel HD4000 and GTX660M.

After installing nvidia proprietary with
apt-get install nvidia-331 nvidia-settings nvidia-prime
and rebooting my system does not even show gdm.

I tested that these drivers work under ubuntu fresh with Unity and under Mint 17 with Cinnamon.

Revision history for this message
Giraffe (dodger-forum) wrote :

I'm using a Dell Latitude E6430 with Intel HD 4000 and Nvidia NVS 5200M (optimus) GPU's and i unfortunatly experiencing this bug when running Ubuntu Gnome 14.10.

When i use the Intel HD 4000 GPU all is fine but when i use nvidia-prime to switch to the dedicated nvidia GPU it won't load the Gnome interface after logging in.

Revision history for this message
Nytrilik (nytrilik) wrote :

yep, confirm the problem

latest kernel install killed the switch (I think). I tried many things and nothing.... (black screen)

- update to nvidia346
- change alternatives manually (without prime)
- desactivate an eventual "ghost display"
- ....

All changes I made & my config >> http://goo.gl/QIimU0

The nvidia card does not work, the black screen is not due to an unknown display >> can not log in background.

I didn't try with lightdm to confirm last hypothesis. I will asap.

Revision history for this message
Premysl (andreas-neubauer1) wrote :

For me the following solution worked:

1. Install the kernel

linux-image-3.15.0-031500rc2-generic_3.15.0-031500rc2.201404201435_amd64.deb

and the headers

linux-headers-3.15.0-031500rc2_3.15.0-031500rc2.201404201435_all.deb
linux-headers-3.15.0-031500rc2-generic_3.15.0-031500rc2.201404201435_amd64.deb

then reboot.

2. Install nvidia-331, bumblebee and primus

sudo apt-get install nvidia-331 bumblebee bumblebee-nvidia primus

3. Edit the bumblebee.conf file

sudo gedit /etc/bumblebee/bumblebee.conf

line 22: Driver=nvidia
line 55: KernelDriver=nvidia-331
line 58: LibraryPath=/usr/lib/nvidia-331:/usr/lib32/nvidia-331
line 61: XorgModulePath=/usr/lib/nvidia-331/xorg,/usr/lib/xorg/modules

save and reboot

Check if your nvidia card is working with

optirun glxgears -info

Revision history for this message
HeRmAyNe MuNsTeR (htorres85) wrote :

I can confirm that @Premysl's solution has worked for me on a Dell Inspiron 7720 laptop. Thank you for your solution!

Tim Lunn (darkxst)
Changed in ubuntu-gnome:
milestone: none → trusty.3
Revision history for this message
QkiZ (qkiz) wrote :
Download full text (3.2 KiB)

Same problem here but I'm using LightDM. Everything works when I'm using Intel driver. When I'm switch to NVidia via nvidia-settings or prime-select then restart LightDM, LCD in my laptop is turning off.
Here is syslog messages:
Apr 1 07:24:55 drag0n kernel: [ 350.538587] bbswitch: enabling discrete graphics
Apr 1 07:24:55 drag0n kernel: [ 350.884185] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:01:00.0 on minor 1
Apr 1 07:24:55 drag0n kernel: [ 350.884189] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 346.47 Thu Feb 19 18:56:03 PST 2015
Apr 1 07:24:56 drag0n kernel: [ 351.643158] vgaarb: this pci device is not a vga device
Apr 1 07:24:56 drag0n kernel: [ 351.643440] nvidia 0000:01:00.0: irq 56 for MSI/MSI-X
Apr 1 07:24:56 drag0n kernel: [ 351.645534] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
Apr 1 07:24:56 drag0n kernel: [ 351.645578] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
Apr 1 07:24:56 drag0n kernel: [ 351.645600] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
Apr 1 07:24:56 drag0n kernel: [ 351.645621] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
Apr 1 07:24:56 drag0n kernel: [ 351.645640] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
Apr 1 07:24:56 drag0n kernel: [ 351.645659] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
Apr 1 07:24:56 drag0n kernel: [ 351.645691] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
Apr 1 07:24:56 drag0n kernel: [ 351.645712] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
Apr 1 07:24:56 drag0n kernel: [ 352.248312] ACPI Error: Field [TMPB] at 290816 exceeds Buffer [ROM1] size 262144 (bits) (20140424/dsopcode-236)
Apr 1 07:24:56 drag0n kernel: [ 352.248317] ACPI Error: Method parse/execution failed [\_SB_.PCI0.PEG0.PEGP._ROM] (Node ffff880227076190), AE_AML_BUFFER_LIMIT (20140424/psparse-536)
Apr 1 07:24:56 drag0n kernel: [ 352.258318] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20140424/nsarguments-95)
Apr 1 07:24:57 drag0n kernel: [ 352.370932] vgaarb: this pci device is not a vga device
Apr 1 07:24:57 drag0n acpid: client connected from 5558[0:999]
Apr 1 07:24:57 drag0n acpid: 1 client rule loaded
Apr 1 07:24:57 drag0n bumblebeed[2991]: [XORG] (WW) "glamoregl" will not be loaded unless you've specified it to be loaded elsewhere.
Apr 1 07:24:57 drag0n bumblebeed[2991]: [XORG] (WW) "xmir" is not to be loaded by default. Skipping.
Apr 1 07:24:57 drag0n bumblebeed[2991]: [XORG] (WW) NVIDIA(...

Read more...

Changed in ubuntu-gnome:
status: New → Confirmed
To post a comment you must log in.