Random crashes after changing laptop power settings

i have insane random crashes , it all started when i set laptop lid switch to switch off display and left the laptop running for the night , and i tried to open it , no response , no tty , nothing , just frozen
what i’ve tried :
i changed the kernel from grub i disabled the switch off option , nothing seems to be working
also this happened after the last update , but i don’t know if there is a relation

here is inxi -Fxzmi

System:
  Kernel: 5.11.22-2-MANJARO x86_64 
  bits: 64 compiler: gcc v: 11.1.0 
  Desktop: Xfce 4.16.0 
  Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Laptop System: Dell 
  product: Latitude E6420 v: 01 
  serial: <filter> 
  Mobo: Dell model: 0K0DNP v: A01 
  serial: <filter> BIOS: Dell v: A04 
  date: 05/11/2011 
Battery:
  ID-1: BAT0 charge: 2.5 Wh (19.2%) 
  condition: 13.0/62.2 Wh (20.9%) 
  volts: 12.1 min: 11.1 
  model: Samsung SDI DELL 5CGM417 
  status: Charging 
Memory:
  RAM: total: 3.72 GiB 
  used: 2.61 GiB (70.2%) 
  RAM Report: permissions: Unable to run 
  dmidecode. Root privileges required. 
CPU:
  Info: Dual Core 
  model: Intel Core i5-2520M bits: 64 
  type: MT MCP arch: Sandy Bridge rev: 7 
  cache: L2: 3 MiB 
  flags: avx lm nx pae sse sse2 sse3 
  sse4_1 sse4_2 ssse3 vmx 
  bogomips: 19962 
  Speed: 2411 MHz min/max: 800/3200 MHz 
  Core speeds (MHz): 1: 2411 2: 1898 
  3: 1825 4: 2928 
Graphics:
  Device-1: Intel 2nd Generation Core 
  Processor Family Integrated Graphics 
  vendor: Dell driver: i915 v: kernel 
  bus-ID: 00:02.0 
  Display: x11 server: X.Org 1.20.11 
  driver: loaded: intel 
  unloaded: modesetting 
  resolution: 1366x768~60Hz 
  OpenGL: renderer: Mesa DRI Intel HD 
  Graphics 3000 (SNB GT2) 
  v: 3.3 Mesa 21.1.2 direct render: Yes 
Audio:
  Device-1: Intel 6 Series/C200 Series 
  Family High Definition Audio 
  vendor: Dell driver: snd_hda_intel 
  v: kernel bus-ID: 00:1b.0 
  Sound Server-1: ALSA 
  v: k5.11.22-2-MANJARO running: yes 
  Sound Server-2: sndio v: N/A 
  running: no 
  Sound Server-3: JACK v: 0.125.0 
  running: no 
  Sound Server-4: PulseAudio v: 14.2 
  running: yes 
  Sound Server-5: PipeWire v: 0.3.30 
  running: no 
Network:
  Device-1: Intel 82579LM Gigabit Network 
  vendor: Dell driver: e1000e v: kernel 
  port: 4080 bus-ID: 00:19.0 
  IF: eno1 state: down mac: <filter> 
  Device-2: Intel Centrino Advanced-N 
  6205 [Taylor Peak] 
  driver: iwlwifi v: kernel port: 4040 
  bus-ID: 02:00.0 
  IF: wlp2s0 state: up mac: <filter> 
  IP v4: <filter> 
  type: dynamic noprefixroute 
  scope: global 
  IP v6: <filter> type: noprefixroute 
  scope: link 
  IF-ID-1: nl state: unknown speed: N/A 
  duplex: N/A mac: N/A 
  IP v4: <filter> scope: global 
  WAN IP: <filter> 
Bluetooth:
  Device-1: Cambridge Silicon Radio 
  Bluetooth Dongle (HCI mode) 
  type: USB driver: btusb v: 0.8 
  bus-ID: 2-1.3:5 
  Report: rfkill ID: hci0 rfk-id: 3 
  state: up address: see --recommends 
RAID:
  Hardware-1: Intel 82801 Mobile SATA 
  Controller [RAID mode] 
  driver: ahci v: 3.0 bus-ID: 00:1f.2 
Drives:
  Local Storage: total: 698.64 GiB 
  used: 446.58 GiB (63.9%) 
  ID-1: /dev/sda vendor: Seagate 
  model: ST9750420AS size: 698.64 GiB 
Partition:
  ID-1: / size: 42.04 GiB 
  used: 35.2 GiB (83.7%) fs: ext4 
  dev: /dev/sda5 
Swap:
  ID-1: swap-1 type: partition 
  size: 5.86 GiB used: 568.1 MiB (9.5%) 
  dev: /dev/sda6 
Sensors:
  System Temperatures: cpu: 73.0 C 
  mobo: 37.0 C sodimm: SODIMM C 
  Fan Speeds (RPM): cpu: 3318 
Info:
  Processes: 201 Uptime: 1h 20m 
  Init: systemd Compilers: gcc: 11.1.0 
  Packages: 1408 Shell: Bash v: 5.1.8 
  inxi: 3.3.04

Kernel 5.11 is EOL so please install both 5.4 and 5.10 LTS (Long Time Support) and see which one of the two troubles you least.

i tried with 5.4 , same issue

  1. :man_shrugging:

  2. Does this also happen if you create a new user and log in there? (E.G. k3rnelpanic2)

:thinking:

First the BIOS from 2018 should be installed on a Dell Latitude E6420 with Sandy Bridge and not the old one from 2011. The optimal hardware support for this Dell along with its sleep mode and Touchpad can then be found in Linux419, less so in Linux54 and even worse in Linux 510. That reflects mine Experience with that Dell …

1 Like

i’ve been using the 5.11 kernel for almost half a year , no problem since then
im starting to think that it all started since the last update

it happens before anything starts , not even the log screen
but anyway ill try that and report
btw , the frequency of these freezes are much less now , but it happens for some reason on random times

Next time is crashes:

  1. REISUB

  2. Provide the output of:

    journalctl --system --boot=-1 --priority=3 | tail --lines=35
    

:thinking:

--priority=3
1 Like

ill try that
but fyi , when i freezes , even the keyboard is not responsive , the caps lock lamp even can’t work
and sometimes it blinks
i think it’s not freeze , more like a crash , can i see the log of that crash in journalctl , or all the log data is gone ?
EDIT :
it just crashed and “journalctl -b -1” can’t get to crash time
it crashed at 17:15 , and the last record in journal was 17:06

here it is anyway

>un 25 16:59:22 mohamed-pc kernel: audit: type=1334 audit(1624633162.635:205): prog-id=20 op=LOAD
Jun 25 16:59:22 mohamed-pc kernel: audit: type=1334 audit(1624633162.635:206): prog-id=21 op=LOAD
Jun 25 16:59:22 mohamed-pc kernel: audit: type=1334 audit(1624633162.635:207): prog-id=22 op=LOAD
Jun 25 16:59:22 mohamed-pc audit: BPF prog-id=21 op=LOAD
Jun 25 16:59:22 mohamed-pc audit: BPF prog-id=22 op=LOAD
Jun 25 16:59:22 mohamed-pc systemd[1]: Starting Time & Date Service...
Jun 25 16:59:22 mohamed-pc dbus-daemon[591]: [system] Successfully activated service 'org.freedesktop.timedate1'
Jun 25 16:59:22 mohamed-pc audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-timedated comm="systemd" exe="/usr/lib/systemd/systemd" hostna>
Jun 25 16:59:22 mohamed-pc kernel: audit: type=1130 audit(1624633162.888:208): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-timedated comm="systemd" exe="/usr>
Jun 25 16:59:22 mohamed-pc systemd[1]: Started Time & Date Service.
Jun 25 16:59:52 mohamed-pc systemd[1]: systemd-timedated.service: Deactivated successfully.
Jun 25 16:59:53 mohamed-pc kernel: audit: type=1131 audit(1624633192.935:209): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-timedated comm="systemd" exe="/usr>
Jun 25 16:59:53 mohamed-pc kernel: audit: type=1334 audit(1624633192.955:210): prog-id=22 op=UNLOAD
Jun 25 16:59:53 mohamed-pc kernel: audit: type=1334 audit(1624633192.955:211): prog-id=21 op=UNLOAD
Jun 25 16:59:53 mohamed-pc kernel: audit: type=1334 audit(1624633192.955:212): prog-id=20 op=UNLOAD
Jun 25 16:59:52 mohamed-pc audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-timedated comm="systemd" exe="/usr/lib/systemd/systemd" hostnam>
Jun 25 16:59:52 mohamed-pc audit: BPF prog-id=22 op=UNLOAD
Jun 25 16:59:52 mohamed-pc audit: BPF prog-id=21 op=UNLOAD
Jun 25 16:59:52 mohamed-pc audit: BPF prog-id=20 op=UNLOAD
Jun 25 17:01:01 mohamed-pc CROND[13400]: (root) CMD (run-parts /etc/cron.hourly)
Jun 25 17:01:01 mohamed-pc CROND[13399]: (root) CMDEND (run-parts /etc/cron.hourly)
Jun 25 17:06:05 mohamed-pc audit[13681]: USER_ACCT pid=13681 uid=1000 auid=1000 ses=1 subj==unconfined msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_time acct="mohamed" exe="/usr/bi>
Jun 25 17:06:05 mohamed-pc kernel: audit: type=1101 audit(1624633565.761:213): pid=13681 uid=1000 auid=1000 ses=1 subj==unconfined msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_time>
Jun 25 17:06:05 mohamed-pc kernel: audit: type=1103 audit(1624633565.765:214): pid=13681 uid=1000 auid=1000 ses=1 subj==unconfined msg='op=PAM:setcred grantors=pam_unix,pam_env acct="mohamed">
Jun 25 17:06:05 mohamed-pc audit[13681]: CRED_ACQ pid=13681 uid=1000 auid=1000 ses=1 subj==unconfined msg='op=PAM:setcred grantors=pam_unix,pam_env acct="mohamed" exe="/usr/bin/crontab" hostn>
Jun 25 17:06:05 mohamed-pc crontab[13681]: (mohamed) LIST (mohamed)

You need someone smarter than me then…

Sorry!

:sob:

Today it crashed but i could enter tty before it totally crash
here is the output of journalctl

Jun 29 19:14:50 mohamed-pc bamfdaemon[902]: Got an X error: BadWindow (invalid Window parameter)
Jun 29 19:14:50 mohamed-pc bamfdaemon[902]: Got an X error: BadWindow (invalid Window parameter)
Jun 29 19:14:50 mohamed-pc bamfdaemon[902]: Got an X error: BadWindow (invalid Window parameter)
Jun 29 19:20:25 mohamed-pc kernel: i915 0000:00:02.0: [drm] *ERROR* Atomic update failure on pipe A (start=1089281 end=1089282) time 1768 us, min 763, max 767, scanline start 744, end 26
Jun 29 19:24:05 mohamed-pc bamfdaemon[902]: Got an X error: BadWindow (invalid Window parameter)
Jun 29 19:24:05 mohamed-pc bamfdaemon[902]: Got an X error: BadWindow (invalid Window parameter)
Jun 29 19:24:05 mohamed-pc bamfdaemon[902]: Got an X error: BadWindow (invalid Window parameter)
Jun 29 19:24:09 mohamed-pc vlc[43526]: QObject::~QObject: Timers cannot be stopped from another thread
Jun 29 19:24:20 mohamed-pc audit[43462]: ANOM_ABEND auid=1000 uid=1000 gid=1001 ses=1 subj==unconfined pid=43462 comm=53575420546872656164 exe="/usr/lib/jvm/java-11-openjdk/bin/java" sig=6 res=1
Jun 29 19:24:20 mohamed-pc kernel: audit: type=1701 audit(1624987460.109:198): auid=1000 uid=1000 gid=1001 ses=1 subj==unconfined pid=43462 comm=53575420546872656164 exe="/usr/lib/jvm/java-11-openjdk/bin/java" sig=6 res=1
Jun 29 19:24:20 mohamed-pc audit: BPF prog-id=42 op=LOAD
Jun 29 19:24:20 mohamed-pc audit: BPF prog-id=43 op=LOAD
Jun 29 19:24:20 mohamed-pc audit: BPF prog-id=44 op=LOAD
Jun 29 19:24:20 mohamed-pc kernel: audit: type=1334 audit(1624987460.203:199): prog-id=42 op=LOAD
Jun 29 19:24:20 mohamed-pc kernel: audit: type=1334 audit(1624987460.203:200): prog-id=43 op=LOAD
Jun 29 19:24:20 mohamed-pc kernel: audit: type=1334 audit(1624987460.203:201): prog-id=44 op=LOAD
Jun 29 19:24:20 mohamed-pc systemd[1]: Started Process Core Dump (PID 45278/UID 0).
Jun 29 19:24:20 mohamed-pc audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-coredump@3-45278-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 29 19:24:20 mohamed-pc kernel: audit: type=1130 audit(1624987460.206:202): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-coredump@3-45278-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 29 19:25:12 mohamed-pc systemd-coredump[45279]: Process 43462 (java) of user 1000 dumped core.
                                                    
                                                    Stack trace of thread 43480:
                                                    #0  0x00007f24a0ca0d22 raise (libc.so.6 + 0x3cd22)
                                                    #1  0x00007f24a0c8a862 abort (libc.so.6 + 0x26862)
                                                    #2  0x00007f24a0c8a747 __assert_fail_base.cold (libc.so.6 + 0x26747)
                                                    #3  0x00007f24a0c99616 __assert_fail (libc.so.6 + 0x35616)
                                                    #4  0x00007f2403b1ad2d n/a (libX11.so.6 + 0x40d2d)
                                                    #5  0x00007f2403b1adc8 n/a (libX11.so.6 + 0x40dc8)
                                                    #6  0x00007f2403b1b182 _XEventsQueued (libX11.so.6 + 0x41182)
                                                    #7  0x00007f2403b0c8f2 XPending (libX11.so.6 + 0x328f2)
                                                    #8  0x00007f2468567272 n/a (libgdk-3.so.0 + 0x8d272)
                                                    #9  0x00007f24682d9bc0 g_main_context_prepare (libglib-2.0.so.0 + 0x53bc0)
                                                    #10 0x00007f246832da06 n/a (libglib-2.0.so.0 + 0xa7a06)
                                                    #11 0x00007f24682d7781 g_main_context_iteration (libglib-2.0.so.0 + 0x51781)
                                                    #12 0x00007f2468dd1aca Java_org_eclipse_swt_internal_gtk_OS_g_1main_1context_1iteration (/home/mohamed/.swt/lib/linux/x86_64/libswt-pi3-gtk-4942r22.so + 0x51aca)
                                                    #13 0x00007f24883f38f9 n/a (n/a + 0x0)
                                                    #14 0x00007f2488c396f0 n/a (n/a + 0x0)
>Jun 29 19:25:12 mohamed-pc systemd[1]: systemd-coredump@3-45278-0.service: Deactivated successfully.
Jun 29 19:25:12 mohamed-pc kernel: audit: type=1131 audit(1624987512.379:203): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-coredump@3-45278-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 29 19:25:12 mohamed-pc kernel: audit: type=1334 audit(1624987512.466:204): prog-id=44 op=UNLOAD
Jun 29 19:25:12 mohamed-pc kernel: audit: type=1334 audit(1624987512.466:205): prog-id=43 op=UNLOAD
Jun 29 19:25:12 mohamed-pc kernel: audit: type=1334 audit(1624987512.466:206): prog-id=42 op=UNLOAD
Jun 29 19:25:12 mohamed-pc audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-coredump@3-45278-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 29 19:25:12 mohamed-pc audit: BPF prog-id=44 op=UNLOAD
Jun 29 19:25:12 mohamed-pc audit: BPF prog-id=43 op=UNLOAD
Jun 29 19:25:12 mohamed-pc audit: BPF prog-id=42 op=UNLOAD
Jun 29 19:25:12 mohamed-pc systemd[1]: systemd-coredump@3-45278-0.service: Consumed 11.442s CPU time.
Jun 29 19:25:54 mohamed-pc wpa_supplicant[579]: wlp2s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-23 noise=9999 txrate=54000
Jun 29 19:30:44 mohamed-pc bamfdaemon[902]: Got an X error: BadWindow (invalid Window parameter)
Jun 29 19:30:44 mohamed-pc bamfdaemon[902]: Got an X error: BadWindow (invalid Window parameter)
Jun 29 19:30:44 mohamed-pc bamfdaemon[902]: Got an X error: BadWindow (invalid Window parameter)
Jun 29 19:30:44 mohamed-pc bamfdaemon[902]: Got an X error: BadWindow (invalid Window parameter)
Jun 29 19:30:44 mohamed-pc bamfdaemon[902]: Got an X error: BadWindow (invalid Window parameter)
Jun 29 19:30:44 mohamed-pc bamfdaemon[902]: Got an X error: BadWindow (invalid Window parameter)

it crashed at exactly 19:30:44

I’m not as smart as fabby, and not sure if this will help you but there is a error in the log that is referenced in this thread on the arch forum with the same symptoms as you descibe, I refer to this error: kernel: i915 0000:00:02.0: [drm] ERROR Atomic update failure on pipe A. There are more people with this error.

There are some possible solutions, the user in the arch thread added a option in their grub config as described in post 5 in that thread. You could try it, it is not a difficult procedure. Make sure you take precautions

Summary
$ sudo nano /etc/default/grub

Find the line

GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3 sysrq_always_enabled=1 loglevel=3"

Add the variable:

GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3 sysrq_always_enabled=1 loglevel=3 intel_idle.max_cstate=1"

save (ctrl+X Y enter)

$ sudo update-grub    

Reboot

If this does not stop the crashes there are more options to pursue, post your results, maybe there is a user who can help you further :slight_smile:

1 Like

i’ll try that , btw , the post you mention says that it has something to do with thermal monitoring widget he had
did the last update has something like that updated / installed ? because it started happening since the last update , i’ve installed manjaro for the past three years , nothing happened , not a single freeze

Checking out the #announcements:stable-updates posts for clues might help, there are detailed package lists that are updated. I’m not familiar with your DE so a more experienced user might chime in here to help out.

1 Like

Feedback, please?

If still happening: Does this also happen if you log into another user? (E.G. k3rnelpanic2)

:thinking:

i found out a workaround , i created a new user and the problem is solved , so im 100% sure that it was the power settings that i edited , but i don’t know exactly what happened to cause all these crashes , it was just changing the lid switch , could this lead to crashes , or is it a bug in the last update ?

1 Like

So you have an issue in your user profile and finding out which exact setting you changed is going to take weeks if not months, therefore, we’re going to do the following:

  • Verify that the new user has access to the same groups as your old one by executing groups and comparing the output of both users.

    groups k3rnelpanic
    groups k3rnelpanic2
    

    (Where obviously, k3rnelpanic is your old user and k3rnelpanic2 is your new one.)
    E.G. if k3rnelpanic is a member of operator and k3rnelpanic2 isn’t, execute:

    usermod --append --groups operator k3rnelpanic2
    
  • Copy all data files from your old profile into your new one

    cp --verbose --recursive --preserve=time-stamps /home/k3rnelpanic/Documents/* /home/k3rnelpanic2/Documents/
    

    If that worked and you had no errors, remove the documents from your old user:

    rm --recursive /home/k3rnelpanic/Documents/*
    

    repeat for:

    • Pictures
    • Videos
    • Music
    • .thunderbird
    • .mozilla/firefox/
    • Templates, and everything else that is important to you.
    • Linux games like Battle of Wesnoth have their game data stored under ~/.local/share/ E.G. ~/.local/share/wesnoth/

    After everything has been copied over, disable the old user so you cannot accidentally log on:

    usermod --lock k3rnelpanic
    

    If you would have theming going on, don’t do everything in one day but do this at the rate of 1 application / theme / whatever per day and if the same issue crops up again, roll back your last change and thus you’ve now pinpointed the exact setting that made your old user misbehave. :thinking:

  • in 1 month delete the entire home directory of your old user, but don’t delete the user itself so that in 6 months time files still owned by that user will still show up under its username.

  • If you ever migrate to a new machine, just don’t migrate the old user: only the new one.

  • From now on, start making backups so you can roll back and never have to do this again:

Probably not, or it would have been mentioned in the issues underneath the last release notes

2 Likes

I’ve marked this answer as the solution to your question as it is by far the best answer you’ll get.

However, if you disagree with my choice, please feel free to take any other answer as the solution to your question or even remove the solution altogether: You are in control! (If you disagree with my choice, just send me a personal message and explain why I shouldn’t have done this or :heart: or :+1: if you agree)

:innocent:
P.S. In the future, please don’t forget to come back and click the 3 dots below the answer to mark a solution like this below the answer that helped you most:
Solution
so that the next person that has the exact same problem you just had will benefit from your post as well as your question will now be in the “solved” status.

thanks for this post man , this what i like about manjaro , the great community

3 Likes