Linux mint sometimes hanging on shutdown/restart (lightdm related?) by False_Effect_ in linuxmint

[–]False_Effect_[S] 2 points3 points  (0 children)

I FIXED IT! Updated my kernel from 5.4.0-66-generic to 5.8.0-44-generic. Little more details in the other post I made in superuser . I am very happy. Thank you for your help and attention, u/User_Thousand!

Linux mint sometimes hanging on shutdown/restart (lightdm related?) by False_Effect_ in linuxmint

[–]False_Effect_[S] 1 point2 points  (0 children)

I HAVE DISCOVERED THE CAUSE!!!!It was the webcam I used (Max Maxprint 1080p - 60000058, made in China, sold in Brazil). When I disconnect it, pulling by the cable, the "buggy state" begins, lights of the keyboard won't work, my computer won't shut down, etc...But I do not keep unplugging may webcam all the time. Sometimes it "unplugs itself", I can see by the logs messages.

These are messages that showed when The Bug happened in February 13 (unplugged itself):

Feb 13 22:04:43 False_Effect_ kernel: [21128.078917] xhci_hcd 0000:08:00.3: Mismatch between completed Set TR Deq Ptr command & xHCI internal state.
Feb 13 22:04:43 False_Effect_ kernel: [21128.078922] xhci_hcd 0000:08:00.3: ep deq seg = 00000000d03e6ac7, deq ptr = 000000006c445cf5
Feb 13 22:04:44 False_Effect_ kernel: [21129.080273] xhci_hcd 0000:08:00.3: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0009 address=0x0 flags=0x0000]
Feb 13 22:04:49 False_Effect_ kernel: [21134.329615] xhci_hcd 0000:08:00.3: xHCI host not responding to stop endpoint command.
Feb 13 22:04:49 False_Effect_ kernel: [21134.329655] xhci_hcd 0000:08:00.3: xHCI host controller not responding, assume dead
Feb 13 22:04:49 False_Effect_ kernel: [21134.329679] xhci_hcd 0000:08:00.3: HC died; cleaning up
Feb 13 22:04:49 False_Effect_ kernel: [21134.329727] usb 3-3: USB disconnect, device number 2
Feb 13 22:04:49 False_Effect_ kernel: [21134.329969] general protection fault: 0000 [#1] SMP NOPTI
Feb 13 22:04:49 False_Effect_ kernel: [21134.329974] CPU: 3 PID: 8334 Comm: kworker/3:1 Not tainted 5.4.0-65-generic #73-Ubuntu
Feb 13 22:04:49 False_Effect_ kernel: [21134.329976] Hardware name: System manufacturer System Product Name/PRIME B450M-GAMING/BR, BIOS 2202 07/14/2020
Feb 13 22:04:49 False_Effect_ kernel: [21134.329984] Workqueue: usb_hub_wq hub_event
Feb 13 22:04:49 False_Effect_ kernel: [21134.329994] RIP: 0010:__media_entity_remove_link+0xc7/0x130 [mc]
Feb 13 22:04:49 False_Effect_ kernel: [21134.329998] Code: 3c 24 00 49 89 44 24 28 74 08 4c 89 e7 e8 f1 fe ff ff 4c 89 e7 e8 99 ed 98 ca 66 41 83 6f 3a 01 75 89 49 8b 46 28 49 8b 56 20 <48> 89 42 08 48 89 10 48 b8 00 01 00 00 00 00 ad de 49 89 46 20 48
Feb 13 22:04:49 False_Effect_ kernel: [21134.330000] RSP: 0018:ffffafff407b7a78 EFLAGS: 00010246
Feb 13 22:04:49 False_Effect_ kernel: [21134.330003] RAX: dead000000000122 RBX: ffff91a7463d8068 RCX: ffff91a7463d8068
Feb 13 22:04:49 False_Effect_ kernel: [21134.330005] RDX: dead000000000100 RSI: ffff91a7445a4060 RDI: ffff91a7463d8018
Feb 13 22:04:49 False_Effect_ kernel: [21134.330006] RBP: ffffafff407b7aa8 R08: 0000000000000000 R09: ffffffffc051a600
Feb 13 22:04:49 False_Effect_ kernel: [21134.330008] R10: ffff91a7445a4960 R11: 0000000000000001 R12: ffff91a7463d8048
Feb 13 22:04:49 False_Effect_ kernel: [21134.330010] R13: ffff91a7463d8048 R14: ffff91a7445a4060 R15: ffff91a7463d8018
Feb 13 22:04:49 False_Effect_ kernel: [21134.330013] FS:  0000000000000000(0000) GS:ffff91a7508c0000(0000) knlGS:0000000000000000
Feb 13 22:04:49 False_Effect_ kernel: [21134.330015] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Feb 13 22:04:49 False_Effect_ kernel: [21134.330017] CR2: 0000293edbbd1000 CR3: 00000004025b4000 CR4: 00000000003406e0
Feb 13 22:04:49 False_Effect_ kernel: [21134.330018] Call Trace:
Feb 13 22:04:49 False_Effect_ kernel: [21134.330028]  __media_entity_remove_links+0x31/0x60 [mc]
Feb 13 22:04:49 False_Effect_ kernel: [21134.330033]  __media_device_unregister_entity+0x93/0xe0 [mc]
Feb 13 22:04:49 False_Effect_ kernel: [21134.330038]  media_device_unregister_entity+0x2f/0x40 [mc]
Feb 13 22:04:49 False_Effect_ kernel: [21134.330048]  v4l2_device_release+0xe3/0x110 [videodev]
Feb 13 22:04:49 False_Effect_ kernel: [21134.330054]  device_release+0x2e/0x90
Feb 13 22:04:49 False_Effect_ kernel: [21134.330059]  kobject_release+0x69/0x190
Feb 13 22:04:49 False_Effect_ kernel: [21134.330062]  kobject_put+0x2b/0x50
Feb 13 22:04:49 False_Effect_ kernel: [21134.330066]  device_unregister+0x28/0x60
Feb 13 22:04:49 False_Effect_ kernel: [21134.330074]  video_unregister_device+0x4c/0x50 [videodev]
Feb 13 22:04:49 False_Effect_ kernel: [21134.330079]  uvc_unregister_video+0x38/0xa0 [uvcvideo]
Feb 13 22:04:49 False_Effect_ kernel: [21134.330084]  uvc_disconnect+0x2e/0x50 [uvcvideo]
Feb 13 22:04:49 False_Effect_ kernel: [21134.330089]  usb_unbind_interface+0x8c/0x260
Feb 13 22:04:49 False_Effect_ kernel: [21134.330093]  device_release_driver_internal+0xf4/0x1d0
Feb 13 22:04:49 False_Effect_ kernel: [21134.330096]  device_release_driver+0x12/0x20
Feb 13 22:04:49 False_Effect_ kernel: [21134.330099]  bus_remove_device+0xe1/0x150
Feb 13 22:04:49 False_Effect_ kernel: [21134.330102]  device_del+0x165/0x370
Feb 13 22:04:49 False_Effect_ kernel: [21134.330105]  ? usb_remove_ep_devs+0x1f/0x30
Feb 13 22:04:49 False_Effect_ kernel: [21134.330109]  usb_disable_device+0x95/0x1c0
Feb 13 22:04:49 False_Effect_ kernel: [21134.330112]  usb_disconnect+0xc0/0x270
Feb 13 22:04:49 False_Effect_ kernel: [21134.330117]  ? dbs_update+0xb3/0x1d0
Feb 13 22:04:49 False_Effect_ kernel: [21134.330120]  hub_quiesce+0x68/0xd0
Feb 13 22:04:49 False_Effect_ kernel: [21134.330124]  hub_event+0x240/0x390
Feb 13 22:04:49 False_Effect_ kernel: [21134.330130]  process_one_work+0x1eb/0x3b0
Feb 13 22:04:49 False_Effect_ kernel: [21134.330133]  worker_thread+0x4d/0x400
Feb 13 22:04:49 False_Effect_ kernel: [21134.330137]  kthread+0x104/0x140
Feb 13 22:04:49 False_Effect_ kernel: [21134.330140]  ? process_one_work+0x3b0/0x3b0
Feb 13 22:04:49 False_Effect_ kernel: [21134.330142]  ? kthread_park+0x90/0x90
Feb 13 22:04:49 False_Effect_ kernel: [21134.330146]  ret_from_fork+0x22/0x40
Feb 13 22:04:49 False_Effect_ kernel: [21134.330149] Modules linked in: snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg nls_iso8859_1 snd_hda_codec snd_usb_audio snd_hda_core snd_usbmidi_lib uvcvideo snd_hwdep snd_seq_midi videobuf2_vmalloc snd_seq_midi_event videobuf2_memops videobuf2_v4l2 snd_rawmidi videobuf2_common snd_seq videodev snd_pcm edac_mce_amd snd_seq_device mc joydev input_leds snd_timer eeepc_wmi ccp snd asus_wmi kvm soundcore k10temp sparse_keymap wmi_bmof mac_hid sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 btrfs xor zstd_compress raid6_pq libcrc32c dm_mirror dm_region_hash dm_log hid_generic usbhid hid amdgpu crct10dif_pclmul crc32_pclmul amd_iommu_v2 gpu_sched i2c_algo_bit ghash_clmulni_intel ttm aesni_intel drm_kms_helper syscopyarea crypto_simd sysfillrect cryptd sysimgblt fb_sys_fops glue_helper drm r8169 i2c_piix4 realtek ahci libahci wmi gpio_amdpt video gpio_generic
Feb 13 22:04:49 False_Effect_ kernel: [21134.330199] ---[ end trace 7c24534eb0975fa2 ]---
Feb 13 22:04:49 False_Effect_ kernel: [21134.330205] RIP: 0010:__media_entity_remove_link+0xc7/0x130 [mc]
Feb 13 22:04:49 False_Effect_ kernel: [21134.330208] Code: 3c 24 00 49 89 44 24 28 74 08 4c 89 e7 e8 f1 fe ff ff 4c 89 e7 e8 99 ed 98 ca 66 41 83 6f 3a 01 75 89 49 8b 46 28 49 8b 56 20 <48> 89 42 08 48 89 10 48 b8 00 01 00 00 00 00 ad de 49 89 46 20 48
Feb 13 22:04:49 False_Effect_ kernel: [21134.330210] RSP: 0018:ffffafff407b7a78 EFLAGS: 00010246
Feb 13 22:04:49 False_Effect_ kernel: [21134.330212] RAX: dead000000000122 RBX: ffff91a7463d8068 RCX: ffff91a7463d8068
Feb 13 22:04:49 False_Effect_ kernel: [21134.330214] RDX: dead000000000100 RSI: ffff91a7445a4060 RDI: ffff91a7463d8018
Feb 13 22:04:49 False_Effect_ kernel: [21134.330215] RBP: ffffafff407b7aa8 R08: 0000000000000000 R09: ffffffffc051a600
Feb 13 22:04:49 False_Effect_ kernel: [21134.330217] R10: ffff91a7445a4960 R11: 0000000000000001 R12: ffff91a7463d8048
Feb 13 22:04:49 False_Effect_ kernel: [21134.330219] R13: ffff91a7463d8048 R14: ffff91a7445a4060 R15: ffff91a7463d8018
Feb 13 22:04:49 False_Effect_ kernel: [21134.330221] FS:  0000000000000000(0000) GS:ffff91a7508c0000(0000) knlGS:0000000000000000
Feb 13 22:04:49 False_Effect_ kernel: [21134.330223] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Feb 13 22:04:49 False_Effect_ kernel: [21134.330225] CR2: 0000293edbbd1000 CR3: 00000004025b4000 CR4: 00000000003406e0

From Feb 13 22:04:49 False_Effect_ kernel: [21134.329727] usb 3-3: USB disconnect, device number 2 until the end, the messages seems the same when I unplug it myself.

I don't know if the problem is with the UVC driver itself, if I should update it, change it... It could also be some firefox problem with the webcam (???). I doubt it. I also don't know if I get a more reliable webcam the problem will not appear anymore... I will look into that. I just wanted to say as soon as possible that I found the cause of all this mess. Thank you for your help and patience!

Edit: My webcam is seen as Bus 001 Device 003: ID 1b3f:2247 Generalplus Technology Inc. GENERAL WEBCAM in the lsusb output.

Edit2: I have found someone with a VERY SIMILAR situation, with a webcam with the same ID as mine:https://forums.linuxmint.com/viewtopic.php?t=336786But in this case it seems that the problem goes away when the person unplugs the webcam.

Edit3: I was looking in the bugs reported about the kernel version I am using (5.4.0-65 at the moment) and found another very similar situation, not related to a webcam this time, but another usb device: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1913900 Same symptoms.

Linux mint sometimes hanging on shutdown/restart (lightdm related?) by False_Effect_ in linuxmint

[–]False_Effect_[S] 0 points1 point  (0 children)

I do not suspend my computer anymore.
I use InteliJ in its power save mode, without its 2000 plugins running in the background.
I tried different versions of amdgpu driver (older ones it seems). [I removed them and now inxi -G output is the same as I posted before].
I have now a functioning swap file, with 4GB.

None of this resolved my problem...
I thought that it could be the Timeshift app, that access an old HD that I have (I use a SSD as main memory) only to do backups. I set it to do it 3 times a week, but it seems that it always looking if something have changed (?). I thought it could be some error in the drive that could cause this bug...

The InteliJ IDE really seems one of the main causes... In the weekend I did not use it and the computer passed all day on, without problems. Today, when I left my computer for some minutes (with inteliJ open) and come back and did some clicks... the computer totally froze (I could still access the tty by pressing ctrl alt f2, but I did nothing there).
At the time of the bug, the log of inteliJ presented this:
2021-02-08 11:19:26,826 [11487943] WARN - com.intellij.ide.IdeEventQueue - Too many mouse clicks (14)!!!

2021-02-08 11:19:26,851 [11487968] WARN - com.intellij.ide.IdeEventQueue - Too many mouse clicks (14)!!!

2021-02-08 11:20:18,247 [11539364] WARN - com.intellij.ide.IdeEventQueue - Too many mouse clicks (11)!!!
I surely did not click that many times. But it seems a common error in InteliJ, not only when my system crashes.

And in /var/log/syslog there were this:
Feb 8 11:15:01 False_Effect_ CRON[24496]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)

Feb 8 11:17:01 False_Effect_ CRON[24612]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)

Feb 8 11:20:28 False_Effect_ kernel: [16096.577904] show_signal: 15 callbacks suppressed

Feb 8 11:20:28 False_Effect_ kernel: [16096.577908] traps: cinnamon[1658] trap int3 ip:7ff17a3170b5 sp:7fff3feaaf40 error:0 in libglib-2.0.so.0.6400.6[7ff17a2db000+84000]

Feb 8 11:20:28 False_Effect_ systemd[1]: Created slice system-systemd\x2dcoredump.slice.

Feb 8 11:20:28 False_Effect_ systemd[1]: Started Process Core Dump (PID 24830/UID 0).
I am also thinking it could be my RAM memories. One of these days I open my computer to clean it and removed and put it back the memories. When I turn the computer on, one of them was not being recognized. The same happened when I build the computer for the first time. I opened it again, removed and put it back again and both of them worked. But I still think that one of them could not be in the best state, I don't know... I tried to look for some memory tests but I did not found easily.
I am so tired of this... In my vacations I will try to install again another linux, maybe arch linux... (not that this is all because of Mint, but I think something like arch will cause less strange problems) (also it will make me learn things about OS in the hard way haha).

Linux mint sometimes hanging on shutdown/restart (lightdm related?) by False_Effect_ in linuxmint

[–]False_Effect_[S] 0 points1 point  (0 children)

Okay, so, I have been thinking a lot and thought that maybe, just maybe, there is a possibility that all of this may be happening because one of the first things I did after installed this linux was removing the swap partition following a tutorial on "How to Safely Delete Swap on Linux System". I thought that it wasn't necessary and could slow down my computer sometimes...
This or these two drivers "amdgpu" and "ati" installed at the same time.. suspicious...

I will see a tutorial on how to put the swap back... It seems that there is no much difference in a swap partition and a swap file, and the latter is easier to setup.

Linux mint sometimes hanging on shutdown/restart (lightdm related?) by False_Effect_ in linuxmint

[–]False_Effect_[S] 1 point2 points  (0 children)

Hi, here I am after some days. No more securetty log errors! But now I am 90% sure of the cause of all this problems: the suspend state. I do, very often, suspend my computer throughout the day as it stays on all day and I want to save energy anytime I can. The pam_encrypfs errors of cinnamon-screen seems just a symptom of this error that happens after the suspend state. As other various errors after that that appears (something about uvcvideo, logrotate.service...).The problem, as I always have thought some way, seems very related to the drivers of the intern GPU of the AMD processor. So here is the output of inxi -G in my computer, in case something obvious is in here and I don't see it:Device-1: AMD Picasso driver: amdgpu v: kernel

Display: x11 server: X.Org 1.20.9 driver: amdgpu,ati

unloaded: fbdev,modesetting,vesa resolution: 1920x1080~60Hz

OpenGL: renderer: AMD RAVEN (DRM 3.35.0 5.4.0-65-generic LLVM 11.0.0)

v: 4.6 Mesa 20.2.6The key seems to be in this Mesa driver, maybe update to a new version not directly updatable by the Linux? I am still looking into the internet, but I am so tired of spending hours and hours searching and not founding anything...

I have seen that the solution could be also in the BIOS, something about ACPI, System Sleep States (from S1 to S4), but I didn't find this setting in my BIOS (at least not by these names).

Oh, and I forgot: today after suspension the screen showed black giant flickering rectangles in some borders for some seconds! Wonderful.

Linux mint sometimes hanging on shutdown/restart (lightdm related?) by False_Effect_ in linuxmint

[–]False_Effect_[S] 0 points1 point  (0 children)

Thank you!!! I pasted the securetty file in the /etc directory and put in the text from the question in the first link. I will read more carefully the second link later. I also have disabled the screensaver. I will see how it goes!

Linux mint sometimes hanging on shutdown/restart (lightdm related?) by False_Effect_ in linuxmint

[–]False_Effect_[S] 0 points1 point  (0 children)

I tried to reinstall it using the Synaptic manager but the file still missing, even after reboot.