Score:0

Ubuntu (budgie) 21.10 random freeze

cn flag
 Ubuntu (**Budgie**) 21.10 freezes at a random time.
 PC info:
 Host: 81TD Lenovo Yoga C740-15IML
 Kernel: 5.13.0-20-generic 
 CPU: Intel i7-10510U
 GPU: Intel CometLake-U GT2 [UHD Graphics]
 (Mesa Intel® UHD Graphics (CML GT2)



 free -h
               total        used        free      shared  buff/cache   available
Mem:            15Gi       2,7Gi       4,8Gi       631Mi       7,8Gi        11Gi
Swap:          979Mi       2,0Mi       977Mi

As far as my knowledge goes, Intel GPU drivers are updated VIA kernel releases and so. I was googling around for similar errors, which occur to people using dual GPU or just Intel GPU. And so far, the best solution is to downgrade to the kernel version that was released on Ubuntu 20.01 ( not sure what version it was ). But, so far, I didn't try that.

I'm thinking of upgrading kernel 5.14.xx. ( using ukuu app ) If so, what version is stable?

Or do I downgrade to some kernel version? And again, what is one to go so?

At first, I thought my GPU would be a happy place and needed to replace MBO. PIC of freeze: https://ibb.co/ZVybnt6 When it freeze, the only thing that helps is force power-off. I'm not good at log files, so not sure how to provide them. ( if they get recorded at all )

This issue was reported as a kernel bug and so far was not fixed. If any have some words of wisdom, please share it or how to deal with it...

❯ swapon -s
Filename                Type        Size    Used    Priority
/dev/dm-2                               partition   1003516 0   -2
❯ grep -i swap /etc/fstab~
grep: /etc/fstab~: No such file or directory
❯ grep -i swap /etc/fstab
/dev/mapper/vgubuntu--budgie-swap_1 none            swap    sw              0       0
❯ swapon -s
Filename                Type        Size    Used    Priority
/dev/dm-2                               partition   1003516 0   -2
❯ grep -i swap /etc/fstab
/dev/mapper/vgubuntu--budgie-swap_1 none            swap    sw              0       0
❯ sudo dmidecode -s bios-version
BNCN43WW
heynnema avatar
ru flag
When I first looked at your question, I thought swap problem, with only 1G swap, but then I looked at your screenshot. That's not a swap problem. The Intel video uses shared memory. So, first things first. Go to https://www.memtest86.com/ and download/run their free `memtest` to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take a few hours to complete. Report back. Start comments to me with @heynnema or I'll miss them.
dMatija avatar
cn flag
@heynnema Will try that. Is there any other opinion on possible problems ? Increase swap size ? Note. I'm using ubuntu LUKS encryption for SSD. Is there any possible issue that I might run to it ?
heynnema avatar
ru flag
We'll discuss the possible swap problem after you run memtest.
dMatija avatar
cn flag
@heynnema All PASS ok: https://ibb.co/4d3H8FW Also got some read: https://www.omgubuntu.co.uk/2021/08/linux-kernel-5-14-new-features for kernel 5.14. So far I didn't try it
heynnema avatar
ru flag
Edit your question and show me `swapon -s` and `grep -i swap /etc/fstab`.
heynnema avatar
ru flag
Show me the output of `sudo dmidecode -s bios-version`.
dMatija avatar
cn flag
@heynnema ```❯ swapon -s Filename Type Size Used Priority /dev/dm-2 ``` ```❯ grep -i swap /etc/fstab /dev/mapper/vgubuntu--budgie-swap_1 none swap sw 0 0``` ```❯ sudo dmidecode -s bios-version BNCN43WW``` Before i run followed the answer to edit swap. In GPARTED/Disk I find that swap location says is: /dev/vgubuntu-budgie/swap_1
heynnema avatar
ru flag
Yes, that swap partition complicates things a bit. Normally I'd create a /swapfile and delete the swap partition. Or just enlarge the current swap partition, but that's a bit more complicated (unless you have enough experience to do this). I'll modify my answer in such a way that you can try two swaps, and you'll still be able to go back if it proves not to help.
heynnema avatar
ru flag
Your BIOS is current.
heynnema avatar
ru flag
I modified my answer. You'll end up with two swap areas... /swapfile and /dev/dm-2. If it doesn't fix the problem, we can still easily go back to the prior setup. Report back.
Score:0
ru flag

As promised, here's the info about adding a 4G /swapfile to your system.

It's a bit more complicated as you already have a LVM swap partition, but this will create an additional /swapfile, and will allow you to go back to the prior setup if this doesn't help with the problem.

Note: Incorrect use of the rm and dd commands can cause data loss. Suggest copy/paste.

In the terminal...

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile

Edit /etc/fstab, using sudo -H gedit /etc/fstab or sudo pico /etc/fstab.

Leave this line alone...

/dev/mapper/vgubuntu--budgie-swap_1 none            swap    sw              0       0

Add this additional /swapfile line to the bottom of /etc/fstab... use SPACES in this line... confirm NO TABS...

/swapfile  none  swap  sw  0  0

swapon -a # start all swap locations

swapon -s # confirm two swap locations, /swapfile and /dev/dm-2

reboot # reboot and verify operation

dMatija avatar
cn flag
all pass without any errors.
heynnema avatar
ru flag
@dMatija What does `free -h` and `swapon -s` show now?
dMatija avatar
cn flag
free -h ```total used free shared buff/cache available Mem: 15Gi 2,5Gi 10Gi 533Mi 2,8Gi 12Gi Swap: 5,0Gi 0B 5,0Gi''' Filename Type Size Used Priority /swapfile file 4194300 0 -2 /dev/dm-2 partition 1003516 0 -3```
dMatija avatar
cn flag
Sry for extra edit. will leave it for a while to check it will all be ok.
dMatija avatar
cn flag
I didn't help. So far from extra swap happened 2x time. I thought to upgrade the 5.14 kernel or downgrading to kernel version for 20.01
dMatija avatar
cn flag
I try to install 5.14.14 and I was left with freeze-in when choosing a new kernel to load.
heynnema avatar
ru flag
@dMatija Choosing the 5.14 kernel at GRUB time, or some other time?
heynnema avatar
ru flag
@dMatija Show me `sysctl vm.swappiness`.
dMatija avatar
cn flag
```vm.swappiness = 60``` Yes, when I got promoted advance options I get 5.14.14, and it freezes.
dMatija avatar
cn flag
On my 2nd laptop, I put swappiness to 20. Since this is a fresh install I can play with things around. I was thinking to turn off swap memory. Not sure will any of that help =/
heynnema avatar
ru flag
Go to BIOS, review your settings, and select "Reset to default" or "Reset to factory", then retest. On the 2nd laptop, vm.swappiness=20 may not be optimal... show me `free -h`.
dMatija avatar
cn flag
```❯ free -h total used free shared buff/cache available Mem: 15Gi 1,9Gi 11Gi 293Mi 1,8Gi 12Gi Swap: 5,0Gi 0B 5,0Gi``` I try before to reset do default. no help. i tryed one more time now.
heynnema avatar
ru flag
@dMatija I'm out of ideas. Sorry.
dMatija avatar
cn flag
The only thing i notice after we added extra swap is that there is no visual freeze. Just freeze. Ill try to reinstall without swap or turn it off. Or might try without LUSK encryption. no idea rly =/
heynnema avatar
ru flag
@dMatija Every machine needs some swap. Too small and it may freeze. Keep me posted if you get it fixed.
dMatija avatar
cn flag
Will try to downgrade to kernel 5.8 and 5.4 and will check if any changes. There is few links I check with same issue that was resolved with downgrading. Will keep it posted
heynnema avatar
ru flag
@dMatija Status please...
dMatija avatar
cn flag
ATM im not home and using that laptop. Will post some info in Monday or soon as I get home...
dMatija avatar
cn flag
Nothing changes. Laptop with Kali/Ubuntu ( dual boot. No LUSK encryption ), and things are the same after some minor dist-upgrade.For kali, I got a 1x random freeze in time around 4-5 hours of idle. For ubuntu is far way worse. Bad is when I got 4-5 freeze in an hour of middle working. At best, I got 4-5 in 3-4 hours. For laptops with Nvidia, all work without any issue at all. That laptop, I can switch to intel chip, and things happen like on the first laptop. I try some things to change things and stuff, not sure anymore what. ATM, I'm exhausted. Lack of idea at all and will
heynnema avatar
ru flag
@dMatija What kernel versions do you have in /boot? Which one are you running? `uname -r`
dMatija avatar
cn flag
5.13.0-21-generic - is ubuntu 5,14,0-kali2-amd64 - is kali For the last 10ish days, I'm a bit busy with work. So I didn't have lots of time to test for some things. I just holding to kernel bug for sure as the main problem.
dMatija avatar
cn flag
To say that nothing changed. I tried some extra stuff that I found online, and as for the most people, it didn't work for me also. So far, I know it is a bug due to some null pointer or something that makes an issue when the laptop needs to start fan to cool CPU/GPU in inlet chip and bugs out. I'm slightly disappointed in the development of this issue just there are lots of people with this issue.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.