9

When using intel graphics:

Whenever I close the laptop lid or restart / shutdown using GUI or terminal commands, it goes into a black screen with a single "_" at the top left corner, and hangs. Only long-pressing the power button would shut down the computer.

However, when I use sudo prime-select nvidia to switch over to nvidia, everything works fine.

Is there a way to fix this problem? On NVIDIA my battery only lasts like ~2hrs max, and it's really annoying to use the power button to shutdown the laptop.

Specs:

Intel 7700HQ, NVIDIA 1060GTX, kernel 4.8

Thank you!!

Edit:

When i choose sudo prime-select intel on NVIDIA 375

i get :

Info: the current GL alternatives in use are: ['nvidia-375', 'nvidia-375']
Info: the current EGL alternatives in use are: ['nvidia-375', 'nvidia-375']
Info: selecting mesa for the intel profile
update-alternatives: using /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode
/sbin/ldconfig.real: /usr/lib/nvidia-375/libEGL.so.1 is not a symbolic link

/sbin/ldconfig.real: /usr/lib32/nvidia-375/libEGL.so.1 is not a symbolic link

update-alternatives: using /usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode
update-alternatives: using /usr/lib/i386-linux-gnu/mesa/ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode

Current Driver: 381.22

On 381.22 I get:

➜  ~ sudo prime-select intel
[sudo] password for wboy: 
Info: the current GL alternatives in use are: ['nvidia-381', 'nvidia-381']
Info: the current EGL alternatives in use are: ['nvidia-381', 'nvidia-381']
Info: selecting mesa for the intel profile
update-alternatives: using /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode
update-alternatives: using /usr/lib/i386-linux-gnu/mesa/ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode
➜  ~ sudo prime-select nvidia
Info: the current GL alternatives in use are: ['mesa', 'mesa']
Info: the current EGL alternatives in use are: ['mesa-egl', 'nvidia-381']
Info: selecting nvidia-381 for the nvidia profile
update-alternatives: using /usr/lib/nvidia-381/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-381/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-381/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode

EDIT2: Attempts so far:

1)Tried installing new intel drivers from Updated kernel to 4.8 now missing firmware warnings --> Did not work. Issue persists

2) Tried upgrading kernel from 4.8 to 4.10.15 --> Did not work. Problem got worse. Instead of the normal login screen, it gives a terminal login screen and hangs.

3) Tried the fix to nvidia-prime https://askubuntu.com/a/884506/547039, but both the poweron.sh and poweroff.sh script hangs my laptop instead.

4) Tried sudo swapoff -a && systemctl poweroff as a workaround, no avail.

5) Tried changing

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force"

Does not work either.

EDIT3 Further information:

Typing sudo lshw -C display:

When on intel driver: (sudo prime-select intel) --> outputs PCI (Sysfs) then hangs

When on nvidia driver (sudo prime-select nvidia):

  *-display               
       description: VGA compatible controller
       product: NVIDIA Corporation
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:131 memory:db000000-dbffffff memory:90000000-9fffffff memory:a0000000-a1ffffff ioport:e000(size=128) memory:dc000000-dc07ffff
  *-display
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 04
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: iomemory:2f0-2ef irq:127 memory:2ffe000000-2ffeffffff memory:80000000-8fffffff ioport:f000(size=64) memory:c0000-dffff

Typing modinfo i915 | grep filename:

➜  ~ modinfo i915 | grep filename
filename:       /lib/modules/4.8.0-51-generic/kernel/drivers/gpu/drm/i915/i915.ko

The following shows the logs after shutdown, hard reset (due to hang) and subsequent booting up again

  • /var/log/syslog

https://codeshare.io/5XOPwM

  • /var/log/kern.log

https://codeshare.io/aJp6nq

Wboy
  • 345
  • 1
    Can you please try this link https://askubuntu.com/questions/764568/ubuntu-16-04-hangs-on-shutdown-restart – Bidyut May 08 '17 at 18:12
  • 1
    Do you have the Kabylake drivers installed for Intel? https://askubuntu.com/questions/832524/updated-kernel-to-4-8-now-missing-firmware-warnings/832528#832528 – WinEunuuchs2Unix May 09 '17 at 00:02
  • Have you seen this related post? https://askubuntu.com/questions/879856/nvidia-prime-cant-switch-to-intel – Elder Geek May 09 '17 at 13:04
  • @ElderGeek just did. I tried the fix, and it doesn't work. the poweroff script hangs when i run it.. – Wboy May 10 '17 at 15:50
  • Please [edit] what you've tried and the results into your post. I'm sorry but "the fix" isn't very clear to me, even after revisiting the related post I mentioned. Thank you for helping us help you! :-) – Elder Geek May 10 '17 at 15:54
  • @ElderGeek Thank you for letting me know! I've updated the original post :) – Wboy May 11 '17 at 01:13
  • Thank you for updating your question. Trying only one of the answers in a given Q&A doesn't exhaust all possibilities. Personally, I try them all. On a related note, I don't see in your question that you've attempted any of the answers at the link provided above by Bidyut. You might find that useful as well. – Elder Geek May 11 '17 at 12:21
  • @ElderGeek There was only one answer to that question wasn't it? the other was an add on which was incorporated into the answer. I've tried that link by Bidyut as well – Wboy May 11 '17 at 13:42
  • I see an answer that's really 2, 2 step answers. So it's a bit unclear to me still what you've done. Did you see the section entitled "(probably) KDE Plasma specific errors:"? – Elder Geek May 11 '17 at 14:27

1 Answers1

0

There appears to be a number of problems here: The Intel 7700HQ is a Kaby Lake CPU. It seems that support for your CPU was included in kernel version 4.10

Based on this I would recommend installing a version 4.10 (or later) kernelas outlined below:

Issue the commands

apt-cache search linux-image | grep 4.10

sudo apt-get install linux-image-your_version_choice

sudo apt-get install linux-image-extra-your_version_choice

Edit: Based on the error "/usr/lib/nvidia-375/libEGL.so.1 is not a symbolic link" You also appear to be affected by this bug I recommend notifying the devs that it affects you too and subscribing to it so that you can be notified of progress.

A workaround has been reported here and confirmed here for that issue. The suggested driver is available here.

It would likely be prudent to completely purge existing nvidia drivers prior to installation (of 378.13) as described here.

As it seems there are some possible concerns I always recommend having a current backup so that you can easily revert to previous conditions.

For what is hopefully the final piece of the puzzle, I think we need to upgrade the entire Intel graphics stack as there is increased support for Kaby Lake CPU's and a number of related bug fixes

To accomplish this we need to download the Intel Graphics Update Tool which is available for both 32-bit and 64-bit versions of Ubuntu 16.04 here.

Install the deb package you downloaded with the Software Center (or your favorite package manager).

After installation launch the Intel graphics tool from the dash, and follow the prompts to install the latest graphics stack for your system. Assuming an error free installation, reboot the system to make the new driver take effect. (In the unlikely event something went wrong with this process we have our aforementioned current backup to restore and can try again armed with the knowledge gained from the previous attempt)

Note: If we want Ubuntu to trust future updates from the Intel repository, we have to issue the following command via the terminal.

wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg-4 -O - | sudo apt-key add - to install the key.

Sources:

http://www.pcworld.com/article/3173618/linux/kaby-lake-is-unleashed-with-kernel-410.html

How to update kernel to the latest mainline version without any Distro-upgrade?

How can I upgrade kernel to version 4.10 on Ubuntu 16.04?

https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-375/+bug/1662860

http://tipsonubuntu.com/2016/09/07/install-intel-graphics-driver-ubuntu-16-04/

Elder Geek
  • 36,023
  • 25
  • 98
  • 183
  • There is another thread on Intel drivers missing errors under 4.8 kernel here in AU – WinEunuuchs2Unix May 08 '17 at 19:49
  • @WinEunuuchs2Unix Regarding Kaby Lake CPU's? I seem to recall that being about Bay Trail. Am I misremembering? Would you be so kind as to provide a link? – Elder Geek May 08 '17 at 20:06
  • 1
    This is the link I was thinking about this afternoon but I'm sure there are others: https://askubuntu.com/questions/832524/updated-kernel-to-4-8-now-missing-firmware-warnings/832528#832528 – WinEunuuchs2Unix May 08 '17 at 23:56
  • This didn't work. I installed kernel 4.10.15 and after switching to intel drivers, i cant even get a proper login screen. It's the real terminal login upon bootup and it hangs there. Had to reload previous 4.8 kernel to login. – Wboy May 09 '17 at 05:14
  • Installing those drivers did not work either @WinEunuuchs2Unix – Wboy May 09 '17 at 05:15
  • @ElderGeek Thanks! I upgraded my drivers to 381.22, that line no longer appears, but I still am experiencing this issue – Wboy May 12 '17 at 07:16
  • Hey @ElderGeek, I just noticed your edit, I upgraded the intel graphics drivers and tried it excitedly, however, the same issue still persists :( on intel drivers, upon shutdown, a single '_' appears at the top left corner of a black screen and it hangs – Wboy May 12 '17 at 14:59
  • Please provide the content of /var/log/syslog and /var/log/kern.log for the period of time from initiating shutdown to subsequent restart. – Elder Geek May 12 '17 at 17:33
  • @ElderGeek Hey ElderGeek, just to let you know I really appreciate your help :) I've updated the logs at the bottom of my original post. Could you @ notify me next time? I would be able to respond quicker :) Thank you! :) – Wboy May 13 '17 at 06:06
  • @Wboy A review of the logs you provided (starting specifically line 624 of your syslog indicates that you are still booting kernel 4.8. Unless I'm missing something, my understanding that kernel v.4.10 is the supported kernel for your CPU and the aforementioned graphics stack. Unfortunately, I don't have your hardware available for testing. You may find this link useful. I'm starting a new job this week and my availability will be drastically curtailed. Hopefully another team member can jump in and resolve this completely. – Elder Geek May 14 '17 at 14:02
  • Hey @ElderGeek, as I mentioned previously, on kernel 4.10, I cant even login with intel graphics on. No worries, Thank you for your help! :) – Wboy May 14 '17 at 15:04
  • @ElderGeek Giving you the bounty before it expires :) – Wboy May 15 '17 at 09:45