Linux Mint Freezes with NVidia driver

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
isrx
Level 1
Level 1
Posts: 6
Joined: Mon May 10, 2021 3:20 pm

Linux Mint Freezes with NVidia driver

Post by isrx »

Hi
Im using Linux Mint 20.1 Ulyssa, with a NVIDIA GeForce MX150. Thing is, when i left the computer idle it freesez. If I keep using it, nothing happens and it can go for hours. But if I go, lets say, to make me a coffee when Im back its frozen and I have to "pillow shutdown" it (keep the power button pressed). So now, when i need to leave the computer, I just let a youtube video playing, so it doesnt freeze.
When Im using the intel driver, nothing happens.
Im using NVidia Driver 460 (I tried with 450, 390, nouveau, same issue)
I monitored the temperature, it was never high

Code: Select all

System:    Kernel: 5.4.0-72-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: MATE 1.24.0 
           Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine:   Type: Laptop System: ASUSTeK product: X510UNR v: 1.0 serial: <filter> 
           Mobo: ASUSTeK model: X510UNR v: 1.0 serial: <filter> UEFI: American Megatrends v: X510UNR.309 
           date: 05/14/2019 
Battery:   ID-1: BAT0 charge: 29.6 Wh condition: 29.9/43.0 Wh (69%) model: ASUSTeK ASUS Battery status: Not charging 
CPU:       Topology: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP arch: Kaby Lake rev: A 
           L2 cache: 8192 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 31999 
           Speed: 700 MHz min/max: 400/4000 MHz Core speeds (MHz): 1: 700 2: 700 3: 700 4: 700 5: 698 6: 700 7: 700 
           8: 700 
Graphics:  Device-1: Intel UHD Graphics 620 vendor: ASUSTeK driver: i915 v: kernel bus ID: 00:02.0 
           Device-2: NVIDIA GP108M [GeForce MX150] vendor: ASUSTeK driver: N/A bus ID: 01:00.0 
           Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.2.6 direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           Sound Server: ALSA v: k5.4.0-72-generic 
Network:   Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: e000 bus ID: 02:00.0 
           IF: wlp2s0 state: up mac: <filter> 
           IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Drives:    Local Storage: total: 1.38 TiB used: 432.92 GiB (30.7%) 
           ID-1: /dev/sda vendor: Toshiba model: MQ04ABF100 size: 931.51 GiB 
           ID-2: /dev/sdb vendor: LITE-ON model: CV3-8D512-11 SATA 512GB size: 476.94 GiB 
Partition: ID-1: / size: 117.29 GiB used: 19.35 GiB (16.5%) fs: ext4 dev: /dev/sdb5 
           ID-2: /home size: 915.89 GiB used: 413.54 GiB (45.2%) fs: ext4 dev: /dev/sda1 
Sensors:   System Temperatures: cpu: 41.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 0 
Info:      Processes: 262 Uptime: 5m Memory: 15.52 GiB used: 1.52 GiB (9.8%) Init: systemd runlevel: 5 Compilers: 
           gcc: 9.3.0 Shell: bash v: 5.0.17 inxi: 3.0.38
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
SMG
Level 25
Level 25
Posts: 31776
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Linux Mint Freezes with NVidia driver

Post by SMG »

Welcome to the forum, isrx.

Have you tried the 5.8 kernel yet? That may help with performance on your system. It is available in Update Manager.

If you would like to try it, open Update Manager. Select View > Linux Kernels and click Continue. Make sure 5.8 is selected on the left panel and then click the top-most option on the right panel. An "Install" button will appear. Install the kernel and then reboot for it to become active.

I also suggest checking to make sure you are using the most recent BIOS/UEFI.
isrx wrote: Mon May 10, 2021 3:30 pmWhen Im using the intel driver, nothing happens.
The data you posted shows the Intel driver rendering. What is the output of inxi -Gx when you are rendering with Nvidia?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
isrx
Level 1
Level 1
Posts: 6
Joined: Mon May 10, 2021 3:20 pm

Re: Linux Mint Freezes with NVidia driver

Post by isrx »

Hey, thanks a lot for aswering. Ive been trying to move to linux for a long time and sadly its these 'little' things that make it a little annoyin, but here we are!

Im installing the 5.8 kernel now

In the meantime, inxi -Gx returns:

Code: Select all

Graphics:  Device-1: Intel UHD Graphics 620 vendor: ASUSTeK driver: i915 v: kernel bus ID: 00:02.0 
           Device-2: NVIDIA GP108M [GeForce MX150] vendor: ASUSTeK driver: nvidia v: 460.73.01 bus ID: 01:00.0 
           Display: x11 server: X.Org 1.20.9 driver: modesetting,nvidia unloaded: fbdev,nouveau,vesa 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce MX150/PCIe/SSE2 v: 4.6.0 NVIDIA 460.73.01 direct render: Yes 
Thanks for the help!

How can I check my BIOS/UEFI ?
User avatar
SMG
Level 25
Level 25
Posts: 31776
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Linux Mint Freezes with NVidia driver

Post by SMG »

isrx wrote: Mon May 10, 2021 4:49 pmIn the meantime, inxi -Gx returns:
That output looks like everything is loaded properly.
isrx wrote: Mon May 10, 2021 4:49 pmHow can I check my BIOS/UEFI ?
I would expect you could find the information for the latest available version on ASUS support pages. Your inxi output indicates you are using version X510UNR.309.

Machine:
Type: Laptop System: ASUSTeK product: X510UNR v: 1.0 serial: <filter>
Mobo: ASUSTeK model: X510UNR v: 1.0 serial: <filter> UEFI: American Megatrends v: X510UNR.309
date: 05/14/2019
Image
A woman typing on a laptop with LM20.3 Cinnamon.
isrx
Level 1
Level 1
Posts: 6
Joined: Mon May 10, 2021 3:20 pm

Re: Linux Mint Freezes with NVidia driver

Post by isrx »

BIOS is up to date
User avatar
SMG
Level 25
Level 25
Posts: 31776
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Linux Mint Freezes with NVidia driver

Post by SMG »

Has the 5.8 kernel improved the situation?

If it is still doing the same thing, then checking the logs when it happens is probably the next step. When you would restart after "pillow" shutdown, run the following in a terminal:
journalctl -rb -1 | nc termbin.com 9999
That command prints the journal log information of the prior boot cycle (the one which you stopped with the power button) in reverse order (so the reason for the freeze should be near the top) and sends it to termbin. It will return with a url address that you should post for us to help you analyze the output.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
isrx
Level 1
Level 1
Posts: 6
Joined: Mon May 10, 2021 3:20 pm

Re: Linux Mint Freezes with NVidia driver

Post by isrx »

I restarted and first thing I run the command
The command returns

Code: Select all

https://termbin.com/py95
if i go there i get

Code: Select all

May 11 13:04:30 VivoBook kernel: BIOS-provided physical RAM map:
May 11 13:04:30 VivoBook kernel: x86/fpu: Enabled xstate features 0x1f, context size is 960 bytes, using 'compacted' format.
May 11 13:04:30 VivoBook kernel: x86/fpu: xstate_offset[4]:  896, xstate_sizes[4]:   64
May 11 13:04:30 VivoBook kernel: x86/fpu: xstate_offset[3]:  832, xstate_sizes[3]:   64
May 11 13:04:30 VivoBook kernel: x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
May 11 13:04:30 VivoBook kernel: x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
May 11 13:04:30 VivoBook kernel: x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
May 11 13:04:30 VivoBook kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
May 11 13:04:30 VivoBook kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
May 11 13:04:30 VivoBook kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
May 11 13:04:30 VivoBook kernel:   zhaoxin   Shanghai  
May 11 13:04:30 VivoBook kernel:   Centaur CentaurHauls
May 11 13:04:30 VivoBook kernel:   Hygon HygonGenuine
May 11 13:04:30 VivoBook kernel:   AMD AuthenticAMD
May 11 13:04:30 VivoBook kernel:   Intel GenuineIntel
May 11 13:04:30 VivoBook kernel: KERNEL supported cpus:
May 11 13:04:30 VivoBook kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-5.8.0-50-generic root=UUID=5ca23d64-d8e4-494b-9520-12ead4fab4c5 ro quiet splash
May 11 13:04:30 VivoBook kernel: Linux version 5.8.0-50-generic (buildd@lgw01-amd64-030) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 (Ubuntu 5.8.0-50.56~20.04.1-generic 5.8.18)
May 11 13:04:30 VivoBook kernel: microcode: microcode updated early to revision 0xe0, date = 2020-06-17
User avatar
SMG
Level 25
Level 25
Posts: 31776
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Linux Mint Freezes with NVidia driver

Post by SMG »

isrx wrote: Tue May 11, 2021 1:09 pm I restarted and first thing I run the command
The command returns
https://termbin.com/py95
This was a very quick boot cycle. Less than three minutes. How did you determine the system had frozen?
May 11 13:04:30 - start
May 11 13:07:20 - end

The journalctl actually gives the appearance to me that the system had not even fully started yet. The vpn seems to have really slowed down the system start.

I noticed a couple of items in the log. One is related to nvidia.

Code: Select all

May 11 13:04:44 VivoBook lightdm[958]: /usr/bin/prime-supported: 34: [: missing ]
There are currently some issues related to this file. Did you do the fix in the fourth post in this thread Disappearing Nvidia drivers :Prime the prime suspect?? The fix describes a one line code fix (editing line 34) for a know bug with some of the graphics files related to Nvidia. I'm not sure if you did it and that's why that line came up or you didn't do it and that is why that line is mentioned. Doing that fix relates to visibility of the nvidia-prime-applet and the ability to utilize Nvidia drivers.

The other items I noticed seemed to be related to partitions. Your inxi output indicates your system is running on sdb5 and sda1.

Code: Select all

Drives:    Local Storage: total: 1.38 TiB used: 432.92 GiB (30.7%) 
           ID-1: /dev/sda vendor: Toshiba model: MQ04ABF100 size: 931.51 GiB 
           ID-2: /dev/sdb vendor: LITE-ON model: CV3-8D512-11 SATA 512GB size: 476.94 GiB 
Partition: ID-1: / size: 117.29 GiB used: 19.35 GiB (16.5%) fs: ext4 dev: /dev/sdb5 
           ID-2: /home size: 915.89 GiB used: 413.54 GiB (45.2%) fs: ext4 dev: /dev/sda1
So I thought is seemed odd that fsck was running on sdb1.

Code: Select all

May 11 13:04:31 VivoBook systemd[1]: Finished File System Check on /dev/disk/by-uuid/0EFA-801A.
May 11 13:04:31 VivoBook systemd-fsck[588]: /dev/sdb1: 192 files, 33527/98304 clusters
May 11 13:04:31 VivoBook systemd-fsck[588]: Performing changes.
May 11 13:04:31 VivoBook systemd-fsck[588]:  Automatically removing dirty bit.
May 11 13:04:31 VivoBook systemd-fsck[588]: 0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
May 11 13:04:31 VivoBook systemd-fsck[588]: fsck.fat 4.1 (2017-01-24)
If you power off the computer using the power button instead of shutting down, it is possible some files can get corrupted, so it's not unusual to see fsck has run. But what is sdb1 that Mint sees it as part of the system? Does your output of cat /etc/fstab match what is in lsblk?

The below is something I would expect since that is the location of /home. However, the system is obviously getting messed up if there are orphaned inodes which need fixed upon system boot.

Code: Select all

May 11 13:04:31 VivoBook systemd-fsck[625]: /dev/sda1: recovering journal
May 11 13:04:31 VivoBook systemd[1]: Starting File System Check on /dev/disk/by-uuid/85abee4a-ba05-49f4-a0ee-27288c25b857...
May 11 13:04:31 VivoBook systemd[1]: Found device TOSHIBA_MQ04ABF100 1.
...
May 11 13:04:41 VivoBook systemd[1]: Finished File System Check on /dev/disk/by-uuid/85abee4a-ba05-49f4-a0ee-27288c25b857.
May 11 13:04:40 VivoBook systemd-fsck[625]: /dev/sda1: clean, 197295/61054976 files, 108300478/244190208 blocks
May 11 13:04:40 VivoBook systemd-fsck[625]: /dev/sda1: Clearing orphaned inode 19800654 (uid=1000, gid=1000, mode=0100664, size=69452)
May 11 13:04:40 VivoBook systemd-fsck[625]: /dev/sda1: Clearing orphaned inode 19800093 (uid=1000, gid=1000, mode=0100664, size=69452)
May 11 13:04:40 VivoBook systemd-fsck[625]: /dev/sda1: Clearing orphaned inode 19800705 (uid=1000, gid=1000, mode=0100664, size=69452)
May 11 13:04:40 VivoBook systemd-fsck[625]: /dev/sda1: Clearing orphaned inode 19800639 (uid=1000, gid=1000, mode=0100600, size=113432)
May 11 13:04:40 VivoBook systemd-fsck[625]: /dev/sda1: Clearing orphaned inode 19800663 (uid=1000, gid=1000, mode=0100664, size=32768)
Image
A woman typing on a laptop with LM20.3 Cinnamon.
isrx
Level 1
Level 1
Posts: 6
Joined: Mon May 10, 2021 3:20 pm

Re: Linux Mint Freezes with NVidia driver

Post by isrx »

How did I know it was frozen, well, keyboard doesn't respond, neither mouse or touchpad, screen is frozen. Tried ctrl + alt + f1 and no response etc.

I haven't tried yet the link (viewtopic.php?f=59&t=341289) but Ill check now. But the strange thing is, the computer works normally as long as I use it, or something is moving on the screen (sometimes I just leave a chronometer running so it doesn't freeze), but the moment I stop, give it like 5 min and it freezes. So, for me, either it works or don't, but why it freezes only when it's left idle?

The partition situation is as follows:
I have 2 hard drives, sdb for os and sda for files
on sdb i have windows and linux, I installed linux after install windows
home folder is on sdb

cat /etc/fstab

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb5 during installation
UUID=5ca23d64-d8e4-494b-9520-12ead4fab4c5 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sdb1 during installation
UUID=0EFA-801A  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0

#CUSTOM HOME
UUID=85abee4a-ba05-49f4-a0ee-27288c25b857	/home	ext4	rw,errors=remount-ro	0	2
lsblk

Code: Select all

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
└─sda1   8:1    0 931.5G  0 part /home
sdb      8:16   0   477G  0 disk 
├─sdb1   8:17   0   100M  0 part /boot/efi
├─sdb2   8:18   0    16M  0 part 
├─sdb3   8:19   0 356.7G  0 part 
├─sdb4   8:20   0   499M  0 part 
└─sdb5   8:21   0 119.7G  0 part /
isrx
Level 1
Level 1
Posts: 6
Joined: Mon May 10, 2021 3:20 pm

Re: Linux Mint Freezes with NVidia driver

Post by isrx »

I checked viewtopic.php?f=59&t=341289 and I checked the file /usr/bin/prime-supported
My file is as it should (according to that post)
User avatar
SMG
Level 25
Level 25
Posts: 31776
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Linux Mint Freezes with NVidia driver

Post by SMG »

isrx wrote: Wed May 12, 2021 4:39 pmHow did I know it was frozen, well, keyboard doesn't respond, neither mouse or touchpad, screen is frozen. Tried ctrl + alt + f1 and no response etc.
And you're sure the processor was not busy? I only ask that because of what I saw in the logs. It seemed the system was still working.
isrx wrote: Wed May 12, 2021 4:39 pmSo, for me, either it works or don't, but why it freezes only when it's left idle?
I've seen similar issues happen with Ryzen processors and AMD graphics, but have not seen it with Intel/Nvidia systems. This thread [Solved] AMD RX570 crashes in idling, amdgpu vs Kernel has a suggestion about adding some kernel parameters to adjust C-state settings starting with this post.

You might also want to check in your computer's UEFI to see if there are any settings related to C-states. Usually, those types of settings are more commonly seen in desktops, but might as well check your laptop's options.
isrx wrote: Wed May 12, 2021 4:39 pmThe partition situation is as follows:
I have 2 hard drives, sdb for os and sda for files
on sdb i have windows and linux, I installed linux after install windows
home folder is on sdb
Are you sure you have fast boot turned off in Windows before switching to Mint? Fast boot is known to cause issues because that means Windows is not fully shut down (and thus hibernating in the background).

I would have expected /boot/efi to have shown up in the inxi output, but maybe it does not all the time. That was the partition with the dirty bit that fsck cleared.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Locked

Return to “Graphics Cards & Monitors”