0

I have a laptop with EndeavourOS on it. It has a Core i3-4405U (4) 1,6Ghz, and it's sometimes lagging, e.g. if I start a program like Firefox or a game like Minecraft. It just starts lagging so much that even the mouse is lagging, and nothing works anymore. The fan is speeding up, and my HDD is starting to spin like crazy. Is there anything I can do to fix it?

[zuna@zuna-80hw ~]$ LC_ALL=C free -g
               total        used        free      shared  buff/cache   available
Mem:               3           2           0           0           0           0
Swap:              0           0           0
Kusalananda
  • 320,670
  • 36
  • 633
  • 936
zuna
  • 1
  • 1
  • 1
    Edit your question and post `free -m` output please when the issue occurs. How much RAM do you have? – Artem S. Tashkinov Jun 06 '22 at 11:01
  • 1
    That is a ~7 year old processor, so probably a very old laptop and you are trying to run very heavy, new programs on it. The bottleneck will probably be RAM as Artem suggested, so please answer his question, and we might help you optimize a little, but modern browsers are _heavy_ and require both significant CPU and RAM so don't expect a perfect solution. Have you tried cleaning the machine? Are you open to using more lightweight tools instead? – terdon Jun 06 '22 at 11:26
  • @terdon is a fully clean install of EndeavourOS, so nothing is installed or anything. – zuna Jun 06 '22 at 12:16
  • @ArtemS.Tashkinov is edited, sorry i don't know how to use it proably so i pasted a screenshot of it. Hope this is better. – zuna Jun 06 '22 at 12:17
  • 1
    Thanks, but please [don't post images of text](https://unix.meta.stackexchange.com/q/4086/). You can just copy/paste the text directly into your question and use the [formatting tools](https://unix.stackexchange.com/help/formatting) to format it as code. Also, if you run `LC_ALL=C free -g` that will output in English so everyone can read. In any case, as you can see you only have 3G of RAM and apparently no swap at all, so I am not surprised a heavy program like firefox is doing this. Adding swap might help a little. – terdon Jun 06 '22 at 12:21
  • 1
    Please post `free -m`, not `-g` as it is too coarse and doesn't allow to understand anything. – Artem S. Tashkinov Jun 06 '22 at 13:03
  • By the way, when I suggested cleaning the machine, I mean it literally: open the laptop and clean it, remove dust. Ideally also replace the CPU thermal paste. Part of the issue might be that the machine is overheating, and cleaning it and replacing the old thermal paste with new paste would help. But anything you do will just be a band aid, you can't expect modern browsers to work well on such an old machine. – terdon Jun 08 '22 at 20:34
  • One more thing: it looks like you may have created multiple accounts. Please see [here](https://unix.stackexchange.com/help/merging-accounts) for how to merge them. – terdon Jun 08 '22 at 20:35

2 Answers2

1

You've got too little RAM:

  • Please considering upgrading RAM to at least 6 or better yet 8GB - this is the best solution. Not all laptops however allow this. Please look your laptop up on the internet or tell your model using this answer.

  • Please do install and enable earlyoom (this is necessary regardless of adding RAM or swap):

    sudo pacman -Syu
    sudo pacman -S earlyoom
    sudo systemctl enable --now earlyoom
    
  • Please add a SWAP file if upgrading RAM is not an option. Considering you've got just 4GB of RAM, I'd add at least 4GB of SWAP as well.

Kusalananda
  • 320,670
  • 36
  • 633
  • 936
Artem S. Tashkinov
  • 26,392
  • 4
  • 33
  • 64
1

Endevour is a nice distro but if you're on an old machine with limited resources (and want to run Arch) you are better running stock Arch Linux and really vetting your software rather than "kitchen sinking" everything. Things like no greeter, start your X session with .xinitrc, basic WM and least resource intensive software for your needs. Really dig in and set up everything you need and nothing you don't. Then make sure all the bells and whistles you can do without are disabled, no thumbnails in the filemanager, tab discarding in your browser, no compositor or flashy bling in your UI.

You can add/increase swap but with the machine being old that will still hurt performance as things swap out to a drive whose focus is power efficiency (assumption being paired with an i3) not performance. Vetting everything you run so swapping only happens in rare occasions is best.

Also as Artem says earlyoom is also a good idea.

g0Brrrr
  • 17
  • 8