7

Update 01/05/2019 :
Switching to Intel and removing Nvidia caused the computer to not freeze for more than 3 days, but unfortunately it again froze two times today. I used @jackw11111 advice, and managed to take a picture of the memory usage through the Terminal when it froze the second time. enter image description here

What I find strange is that not all the RAM was used when it froze.

Update 23/04/2019 :
Upgrading to 18.10 did not solve the issue. The freezing happened again several times in both Firefox and Google Chrome, as well as in Opera. The last time it happened, I was on the Google Maps website. Strangely, the freezing seems to occur even more than before. It became so disturbing that I only use Ubuntu for offline work, and OS X for the rest.

Any suggestion would be appreciated.

Update 31/03/2019 :
Unfortunately it happened again yesterday and today, even after I disabled hardware acceleration and installed the Nvidia graphic driver. For now, it happened only in Firefox, but that is maybe because I mostly used Firefox. And I cannot open the terminal through the shortcut (Alt+Ctrl+T) during the freezing, even though it otherwise works.

I made a video showing the problem: https://www.youtube.com/watch?v=YZrK1bsnHCo
Yesterday, the freezing in Firefox even happened while I was not watching a video at all, but simply scrolling through the browser search results.



I installed Ubuntu 18.04.2 LTS on my MacBookPro two weeks ago. From time to time (at least once a day generally), while watching a YouTube video, the entire screen freezes, except the audio which keeps looping the sound being played at the time of the crash (like "shshshshshshshsh" or "stustustu" or "vidvidvidvid" I hope you see what I mean). The only thing I can do is force shut down the computer by pressing and holding down the power button for a few seconds.

I have absolutely no idea where this comes from. It happens both on Firefox and Chrome.

Do you have any idea what it could be, how I could prevent that or if there is at least another way to simply force quit YouTube/ Firefox / Chrome (without shutting down the entire computer by pressing the power button a few seconds) and simply restart the browser even though all shortcuts I tried as well as mouse movements did not respond during the crash?

Thanks for your help !


For Aravind:

$ hwinfo --gfxcard
14: PCI 100.0: 0300 VGA compatible controller (VGA)         
  [Created at pci.378]
  Unique ID: VCu0.9RMFrOT84MB
  Parent ID: vSkL.jPq0IMUQb1A
  SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.0
  SysFS BusID: 0000:01:00.0
  Hardware Class: graphics card
  Model: "nVidia GK107M [GeForce GT 650M Mac Edition]"
  Vendor: pci 0x10de "nVidia Corporation"
  Device: pci 0x0fd5 "GK107M [GeForce GT 650M Mac Edition]"
  SubVendor: pci 0x106b "Apple Inc."
  SubDevice: pci 0x00fc 
  Revision: 0xa1
  Driver: "nouveau"
  Driver Modules: "nouveau"
  Memory Range: 0xc0000000-0xc0ffffff (rw,non-prefetchable)
  Memory Range: 0x90000000-0x9fffffff (ro,non-prefetchable)
  Memory Range: 0xa0000000-0xa1ffffff (ro,non-prefetchable)
  I/O Ports: 0x2000-0x207f (rw)
  Memory Range: 0xc1000000-0xc107ffff (ro,non-prefetchable,disabled)
  IRQ: 47 (557954 events)
  Module Alias: "pci:v000010DEd00000FD5sv0000106Bsd000000FCbc03sc00i00"
  Driver Info #0:
    Driver Status: nvidiafb is not active
    Driver Activation Cmd: "modprobe nvidiafb"
  Driver Info #1:
    Driver Status: nouveau is active
    Driver Activation Cmd: "modprobe nouveau"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #12 (PCI bridge)

31: PCI 02.0: 0300 VGA compatible controller (VGA)
  [Created at pci.378]
  Unique ID: _Znp.RpDAoKcUWbF
  SysFS ID: /devices/pci0000:00/0000:00:02.0
  SysFS BusID: 0000:00:02.0
  Hardware Class: graphics card
  Model: "Intel 3rd Gen Core processor Graphics Controller"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x0166 "3rd Gen Core processor Graphics Controller"
  SubVendor: pci 0x106b "Apple Inc."
  SubDevice: pci 0x00fb
  Revision: 0x09
  Driver: "i915"
  Driver Modules: "i915"
  Memory Range: 0xc1400000-0xc17fffff (rw,non-prefetchable)
  Memory Range: 0xb0000000-0xbfffffff (ro,non-prefetchable)
  I/O Ports: 0x3000-0x303f (rw)
  IRQ: 46 (243 events)
  Module Alias: "pci:v00008086d00000166sv0000106Bsd000000FBbc03sc00i00"
  Driver Info #0:
    Driver Status: i915 is active
    Driver Activation Cmd: "modprobe i915"
  Config Status: cfg=new, avail=yes, need=no, active=unknown

Primary display adapter: #14

$ sudo journalctl -r -p err
-- Logs begin at Fri 2019-03-15 00:04:59 CET, end at Fri 2019-03-29 15:09:01 CET
Mär 29 13:19:35 frieder-MacBookPro kernel: nouveau 0000:01:00.0: msvld: init fai
Mär 29 13:19:35 frieder-MacBookPro kernel: nouveau 0000:01:00.0: msvld: unable t
Mär 29 13:18:17 frieder-MacBookPro bluetoothd[885]: Failed to set mode: Blocked 
Mär 29 13:18:17 frieder-MacBookPro spice-vdagent[1650]: Cannot access vdagent vi
Mär 29 13:18:16 frieder-MacBookPro pulseaudio[1502]: [pulseaudio] backend-ofono.
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
Mär 29 13:18:10 frieder-MacBookPro kernel: nouveau 0000:01:00.0: gr: DATA_ERROR 
lines 1-23


dmesg gives really a lot of text. Much of it is DATA_ERROR but it's way too much to copy-paste it here.
  • If anything is unclear, feel free to ask in the comments. –  Mar 29 '19 at 12:43
  • 1
    hi, you are using firefox and chrome as in "google-chrome" or chromium? I think I had the same thing at one point. don't remember what fixed it but we can get to the bottom of this. You know there's this common addage amongst the linux community that in the same way that a cat has 9 lives, linux has 7. those are your 7 environements started at boot. I forget if the order change was between ubuntu 18.04 and ubuntu 18.10 but the seventh is (for me) the one where the graphical session is started but if that session becomes inoperable at any time you may Ctrl-Alt-Fn°, like Ctrl-Alt-F2 for example. – tatsu Mar 29 '19 at 13:33
  • 1
    ...you're brought to a terminal prompt (commonly called busybox) that you can log into and once you're logged in, you have every command for the regular terminal available to you, including top or (if you want to install it then with sudo apt install htop) htop. and using one of these task managers you can kill the offending process. then with Ctrl-Alt-F7 you can return to your (hopefully fixed) desktop. this avoids having to force reboot. – tatsu Mar 29 '19 at 13:38
  • @tatsu Thanks for trying to help. Good idea, but do you know where I can find the equivalent shortcut for a MacBookPro keyboard. I'm currently searching it on the web but for now have not found it. –  Mar 29 '19 at 13:43
  • @tatsu I installed htop thanks for the advise –  Mar 29 '19 at 13:45
  • ah... the mac keyboard... that is a genuinely good question. I'm googling. – tatsu Mar 29 '19 at 13:48
  • 1
    It sounds like driver issue to me. 1) Check for error "sudo journalctl -r -p err" & dmesg.2) Try to disable hardware acceleration. 3) Check for driver possible driver update. – Aravind Mar 29 '19 at 13:48
  • 1
    Plz try to paste the output of this command in your question "hwinfo --gfxcard" – Aravind Mar 29 '19 at 13:50
  • @Ryukyu, Aravind's got the right idea about driver issue. I'd wager it's a graphics driver issue specifically... for the busybox/tty sessions on mac I found a solution : you can change the shortcut : https://askubuntu.com/questions/147128/change-default-tty-shortcut – tatsu Mar 29 '19 at 13:52
  • @Aravind When I use your commands I get a lot of DATA_ERROR in the terminal –  Mar 29 '19 at 14:02
  • @tatsu I found the shortcut for the terminal which is ctrl+alt+T. What exactly do you mean with "busybox/tty sessions" ? –  Mar 29 '19 at 14:04
  • what error you got? – Aravind Mar 29 '19 at 14:04
  • Are you using the Nvidia proprietary graphics driver, and if so, are you running with the Intel GPU or the Nvidia GPU? – You'reAGitForNotUsingGit Mar 29 '19 at 14:05
  • @Ryukyu https://www.ostechnix.com/how-to-switch-between-ttys-without-using-function-keys-in-linux/ tty/busybox are your ubuntu's 7 lives. they make it so that you can fix almost any dire situation short of a kernel panic. at least that what I use them for. – tatsu Mar 29 '19 at 14:09
  • 2
    Same sine of nVidia here too. Plz disable hardware accelartion in browser this should solve 90% problem. If you still have same issue. You need to install Nvidia proprietary graphics driver. https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux – Aravind Mar 29 '19 at 14:09
  • @AndroidDev As "graphics" I have NVE7 and as "processor" Intel® Core™ i7-3615QM CPU @ 2.30GHz × 8 –  Mar 29 '19 at 14:17
  • @Aravind ok I will try to disable it –  Mar 29 '19 at 14:19
  • Sure, I use graphics-drivers ppa. It works perfect for me. But making it work is big challenge. – Aravind Mar 29 '19 at 14:21
  • @Aravind Ok I disabled it. If I get another freezing I will say it. –  Mar 29 '19 at 14:27
  • 2
    @tatsu, Aravind, AndroidDev Thanks for your support ! –  Mar 29 '19 at 14:32

2 Answers2

2

I'm not really into MacBooks honestly, but once I had very similar problem to yours. After a week of investigation it turned out to be a problem with CPU (it was intel i5 Haswell series, can't remember its number). The solution was to disable turbo boost in BIOS. This might not be the problem in your case, but what I am saying is that you should not stick to GPU-related investigation. Sometimes such issues turns out to lies somewhere else, like CPU or even audio/motherboard's chipset firmware. You see GPU driver's errors, but their origin may result from something completely different.

Comar
  • 1,485
1

Just to give something else to try if it doesn't turn out to be a driver issue...

Perhaps try monitoring your real-time memory usage with the command : watch -n 5 free -m

(You could try right click Terminal window and select Always on Top so that you can see how much free memory you have when it crashes).

Also with the same command, have a look at how large the swap file is. This is slower (hard drive space) memory that is used to free up RAM, only necessary on systems with <3GB RAM, but if your swap memory is 0, and you are getting drops down into <100 MB (possible if you have lots of tabs in browser, IDE open, etc...) then you might need to look into creating a swap file.