nvidia-prime doesn't work with Gnome 3.16

Bug #1460045 reported by Xosé Duncan
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Confirmed
Critical
Ubuntu GNOME
Confirmed
Undecided
Unassigned

Bug Description

I've got an ASUS laptop i5 with Nvidia G820M Optimus (hybrid video card that uses nvidia for high graphical performace and Intel Haswell integrated for saving energy mode).

I made a fresh install of Ubuntu Gnome 15.04 and, after finished, I installed nvidia drivers by typing:

'sudo apt-get install nvidia-346 nvidia-prime nvidia-settings'

Once rebooted, my system was working propertly and, using nvidia settings app, I can switch from nvidia mode to intel mode and reverse. In that scenary (with Gnome 3.14.4) my only issue was when I plugged an HDMI conector to watch PopCorn Time on my TV. In nvidia mode there was no image on TV and laptop screen turned to black. Despite that, everything was fine.

I updated Gnome to 3.16 version and, after rebooted, the screen "frezzes" in the Gnome logo and doesn't go ahead. If I press Ctrl-Alt-F1 I can login on terminal and type 'sudo prime-select intel' and 'sudo reboot'. If I do this, my laptop starts up ok in 'intel' mode. I tried several versions of nvidia driver (340, 346, 349) and nouveau (that only recognise my intel graphic card). I also tried the xorg-edgers drivers with the same bad result. I made an attempt with bumblebee but was even worse.

I reported this bug to Gnome also, this is the link https://bugzilla.gnome.org/show_bug.cgi?id=750060

If you need further information or you want that I make some specific testing, please, let me know.

Thanks

Xosé Duncan (jrcoruna)
description: updated
description: updated
description: updated
Revision history for this message
Tim Lunn (darkxst) wrote :

Xose,
   Does it freeze while the GNOME logo is still displayed or after that disappears?

One thing you could try is to uncomment the WaylandEnable line in /etc/gdm/custom.conf

Can you please attach logs from /var/log/gdm and also the output from `journalctl -b` taken after the system freezes

Changed in ubuntu-gnome:
milestone: none → wily
Changed in gnome-shell:
importance: Unknown → Critical
status: Unknown → Confirmed
Revision history for this message
Xosé Duncan (jrcoruna) wrote :

Tim,

It freezes after "dot" countdown and change the GNOME logo screen to another one with the startup log and with a last line with text: "A start job is running for wait for Plymouth Boot Screen to quit (45 s / no limit)" and the 45 s counter is stopped. I can press Ctrl-Alt-F1 and take control of the laptop. I typed "journalctl -b" and it returned a one thousand printscreen log with red lines about nvidia-persistenced user having no permissions (I don't know how put that log file here or if I can redirect that printscreen to a text file). I typed "sudo prime-select intel" and "sudo reboot". After having my laptop running, I went to user account to change the autologin and see how it starts (if it shows the login screen or still is freezed in Gnome logo screen). The curious thing here is that the autologin check was unselected (but my system had the autologin working).

I modified the /etc/gdm/custom.conf file and uncomment the WaylandEnable line. After that I got the same as the previous paragraf but the line of "A start job is running for wait for Plymouth...." is counting the seconds and I waited until it was in 3 mins and 10 seconds. I tried to press Ctrl-Alt-F1 and nothing happened, I had no control of my laptop. I reboot with the usb image of Ubuntu Gnome and edited the custom.con file to comment again the WaylandEnable line. And here I am, writing you here.

I attached the files from my /var/log/gdm folder.

Hope it helps. Anything else you need, let me know.

Revision history for this message
Tim Lunn (darkxst) wrote : Re: [Bug 1460045] Re: nvidia-prime doesn't work with Gnome 3.16

Do 'journalctl -b > journal.log'

> On 30 May 2015, at 7:17 pm, Xosé Duncan <email address hidden> wrote:
>
> Tim,
>
> It freezes after "dot" countdown and change the GNOME logo screen to
> another one with the startup log and with a last line with text: "A
> start job is running for wait for Plymouth Boot Screen to quit (45 s /
> no limit)" and the 45 s counter is stopped. I can press Ctrl-Alt-F1 and
> take control of the laptop. I typed "journalctl -b" and it returned a
> one thousand printscreen log with red lines about nvidia-persistenced
> user having no permissions (I don't know how put that log file here or
> if I can redirect that printscreen to a text file). I typed "sudo prime-
> select intel" and "sudo reboot". After having my laptop running, I went
> to user account to change the autologin and see how it starts (if it
> shows the login screen or still is freezed in Gnome logo screen). The
> curious thing here is that the autologin check was unselected (but my
> system had the autologin working).
>
> I modified the /etc/gdm/custom.conf file and uncomment the WaylandEnable
> line. After that I got the same as the previous paragraf but the line of
> "A start job is running for wait for Plymouth...." is counting the
> seconds and I waited until it was in 3 mins and 10 seconds. I tried to
> press Ctrl-Alt-F1 and nothing happened, I had no control of my laptop.
> I reboot with the usb image of Ubuntu Gnome and edited the custom.con
> file to comment again the WaylandEnable line. And here I am, writing you
> here.
>
> I attached the files from my /var/log/gdm folder.
>
> Hope it helps. Anything else you need, let me know.
>
>
> ** Attachment added: "Var_Log_Gdm.tar.gz"
> https://bugs.launchpad.net/ubuntu-gnome/+bug/1460045/+attachment/4406922/+files/Var_Log_Gdm.tar.gz
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1460045
>
> Title:
> nvidia-prime doesn't work with Gnome 3.16
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gnome-shell/+bug/1460045/+subscriptions

Revision history for this message
Xosé Duncan (jrcoruna) wrote :

Ok, thanks for the explanation. Here's the journal.log file.

Changed in ubuntu-gnome:
status: New → Confirmed
Revision history for this message
Tim Lunn (darkxst) wrote :

mutter crashed with seg fault
Mai 30 14:10:05 Decembro kernel: gnome-shell[1062]: segfault at 14 ip 00007f7a26bd2ab2 sp 00007fff1acf05d0 error 4 in libmutter.so.0.0.0[7f7a26b9c000+e5000]

do you not get a core dump (in /var/crash/) when this happens? Really would need to see the backtrace for the crash!

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

assuming there is, see https://wiki.ubuntu.com/DebuggingProgramCrash#Using_apport-retrace for details of how to get a backtrace

Revision history for this message
Xosé Duncan (jrcoruna) wrote :

I have some files in /var/crash. Do you want me to repeat the freezing at startup and send you the generated files? Is it necessary to gather a backtrace manually? I've read at wiki.ubuntu how to disable the automated backtrace and about the instructions to start it manually before reproduce the crash but... If I do this, I have to reboot may laptop and I suppose that the manually started backtrace will have no effect, does it?

Revision history for this message
Xosé Duncan (jrcoruna) wrote :

Well, if I leave the backtrace activated as automatic and reboot (selecting nvidia mode and freezing the screen), there is no files in /var/crash despite a .lock file that is empty.

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

I believe the .crash files in /var/crash should be generated regardless of the automated settings however it may require setting "enabled=1" in /etc/default/apport.

once you have .crash file in /var/crash (it will likely be called _usr_bin_gnome-shell*.crash, you can just run ubuntu-bug <that crash file>

Revision history for this message
Xosé Duncan (jrcoruna) wrote :

But the folder /var/crash is empty and I repeat the issue. It seems that the issue doesn't generate any .crash file... sorry. Is there any way I can force the generation of the .crash file?

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

ping me on #ubuntu-gnome IRC channel

Revision history for this message
Xosé Duncan (jrcoruna) wrote :

I think it'll sound stupid enough but I never used IRC... If you don't mind, could you tell me how should I start a conversation?

Revision history for this message
Xosé Duncan (jrcoruna) wrote :

I'm already at #ubuntu-gnome channel with XoseDuncan nick

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

The easiest way to connect is the following link:
http://webchat.freenode.net/?channels=ubuntu-gnome

On 31/05/15 19:17, Xosé Duncan wrote:
> I think it'll sound stupid enough but I never used IRC... If you don't
> mind, could you tell me how should I start a conversation?
>

Revision history for this message
Xosé Duncan (jrcoruna) wrote :

Partially solved installing lightdm. It shows some distortioned image in login screen and the lock option doesn't appear in the top bar but the change mode in nvidia-settings is working fine and laptop starts in nvidia and in intel mode. Nvidia mode is still not working with external TV plugged through Hdmi connector (it must be changed to intel mode to show image in both laptop screen and TV). I'll test later with 349 nvidia driver.

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

I see the following in your logs:
Mai 30 14:09:48 Decembro whoopsie[636]: [14:09:48] Uploading /var/crash/_usr_bin_gnome-shell.121.crash.

Does that file not exist?, probably its deleted after uploading, so try again with this config change:
https://wiki.ubuntu.com/Apport#Ubuntu_12.04_and_later

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

also worth trying with gdm after it freezes, from a VT:
sudo service gdm restart

If that works is maybe related to bug 1426533

Revision history for this message
Xosé Duncan (jrcoruna) wrote :

About the file in /var/crash, I deleted the files in that folder before trying to repeat the issue so it would be easier to find the files generated by the issue. The file you mentioned is one of the files that I back up before deleting. I attached the full content of the folder /var/crash in a compressed file here.?field.comment=About the file in /var/crash, I deleted the files in that folder before trying to repeat the issue so it would be easier to find the files generated by the issue. The file you mentioned is one of the files that I back up before deleting. I attached the full content of the folder /var/crash in a compressed file here.

Revision history for this message
Xosé Duncan (jrcoruna) wrote :

About typing 'sudo service gdm restart', I did it after the screen get freezed and it only shows a blank screen for a second. After that It returned to the screen where I typed the command. I typed 'sudo prime-select intel' 'sudo reboot' and my laptop started up ok. After reboot I had lost my extensions configuration and I had to activate them again.

Revision history for this message
Nidhin Mohammad (nidhinm96) wrote :

I also use a Asus laptop with 4th gen i5 and nvidia gt 820m graphics card.
Recently I came across this same problem in Ubuntu 15.10 with GNOME 3.18.2.
I followed the methods you guys discussed and did something extra from other threads.
Now it is working fine.

First I logged on to recovery and opened the root command shell, then I ran the command:

sudo mount -o remount,rw /

After that I uninstalled nvidia graphic drivers using,

sudo apt-get remove --purge nvidia-*

And at the end, like you said, I opened /etc/gdm/custom.conf and uncommented it.

That's it. Thanks for helping out guys!

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.