#arch does not use swap and just gives up

334 messages ยท Page 1 of 1 (latest)

faint leaf
#

hi so like this has been a problem since the day i got arch and its gotten to the point where i need to REISUB nearly daily because of this problem.

I have 6gb of swap space but the system does not use it, if the system runs out of ram it gives up freezes and doesn't think twice.. unfortunately even running apps like VSCode cause a REISUB streak even multiple times a day, and to be fair my system is more than capable, i can run genshin impact fine with sm fps but then it just gives up on me

what the hell do i do im completely out of choices

#

i just captured system monitor as soon as it just froze

#

here are the results

#

and also it didnt stall at the loading screen like this last time

#

i actually got ingame

#

and i was running around

#

then it fucked itself when i opened the settings gui ๐Ÿ’€

stuck elm
#

Depending on you filesystem, the way to make a swap@faint leaf

stuck elm
#

But you should prefer a swap file and zram

#

.aw swap

little pawnBOT
stuck elm
#

.aw zram

little pawnBOT
stuck elm
#

.aw performance

little pawnBOT
faint leaf
#

yeah so what should i do first

#

should i nuke my old swap?

#

and make a new one

stuck elm
#

The swap article teaches how to make a swap file enable it then make your system boot with it

faint leaf
#

its just unused

#

like it doesn't use it enough

stuck elm
#

.s litany

little pawnBOT
# stuck elm .s litany

Please follow the Standard Litany when asking a question:
โ€ข What was your environment? What was your operating system, configuration?
โ€ข What did you do? What did you run or test? Where?
โ€ข What actually happened? What were the exact results, complete log contents, exact error messages?
โ€ข What did you expect? What were you aiming to achieve? What result were you looking for?

Vague or superficial questions will yield vague or superficial answers. False information leads to false solutions.

Also see this similar guide on how to ask smart questions.

stuck elm
#

I always recommend a swap file over partition

faint leaf
faint leaf
#

im autistic so dont judge

#

i wanted to make a bunch of stats i found go green ๐Ÿ’€

#

blame me im fucking stupid

stuck elm
stuck elm
#

So be sure about this

#

The more info you provide the better

faint leaf
#

encrypted swap mount

#

look like i said before i wanna start with a fresh swap

stuck elm
#

On BTRFS, you can just disable and remove the swap file then make a new one

#

.aw BTRFS

little pawnBOT
faint leaf
#

alright

stuck elm
faint leaf
stuck elm
#

Maybe that's why it freezes

faint leaf
#

its bc im autistic ok ๐Ÿ˜ญ

#

i found a bunch of security stats

#

and i wanted them all to go green ๐Ÿ’€๐Ÿ’€

#

its satisfying to me

stuck elm
#

I also have BTRFS and swap file but mine is not encrypted so it just works

stuck elm
#

And iirc encrypting swap only calls for issues

faint leaf
#

alright

#

so what should i do when i make my new seap

#

swap

stuck elm
faint leaf
#

when i try to do swapon

stuck elm
faint leaf
#

so i deleted the swapfile

#

and made a new one

#

but now it says invalid argument

stuck elm
#

On BTRFS you should use @swap subvolume

#

Not a swap partition

faint leaf
#

i am bro

stuck elm
faint leaf
# stuck elm Share your lsblk
Setting up swapspace version 1, size = 9 GiB (9663672320 bytes)
no label, UUID=00000000-0000-0000-0000-000000000000
mizook@misonomika/$ sudo swapon swap/swapfile 
swapon: /swap/swapfile: swapon failed: Invalid argument
mizook@misonomika/$ 
#
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 465.8G  0 disk 
โ””โ”€sda1        8:1    0 465.8G  0 part 
nvme0n1     259:0    0 238.5G  0 disk 
โ”œโ”€nvme0n1p1 259:1    0   260M  0 part 
โ”œโ”€nvme0n1p2 259:2    0    16M  0 part 
โ”œโ”€nvme0n1p3 259:3    0 236.4G  0 part /mnt/windows
โ”œโ”€nvme0n1p4 259:4    0   840M  0 part 
โ””โ”€nvme0n1p5 259:5    0   999M  0 part 
nvme1n1     259:6    0 465.8G  0 disk 
โ”œโ”€nvme1n1p1 259:7    0   512M  0 part /efi
โ””โ”€nvme1n1p2 259:8    0 465.3G  0 part /home
                                      /swap
                                      /
mizook@misonomika/$ 
stuck elm
faint leaf
#

oh yeah true

stuck elm
stuck elm
faint leaf
#

it doesent work

#
ERROR: cannot set NOCOW flag: Invalid argument
mizook@misonomika/$ 
stuck elm
#

Archwiki even states this

faint leaf
#

then why doesent it woro now

#

work

stuck elm
faint leaf
#

AND ITS SAYING THIS

stuck elm
#

So roll back on the steps

stuck elm
faint leaf
#

im abt to crash out bro

stuck elm
faint leaf
#

MY PARENTS R GONNA FORCE ME INTO BED

#

IN 30 MINS

#

NVM IN 20 MINS

#

PLEASE

#

I BEG

#
chattr: Invalid argument while setting flags on /swap
mizook@misonomika/$ 
#

@stuck elm

#

HELP ME BRO

#

BRO

#

WHAT TF ARE U DOING HELP PLZ

#

I IN SUPPORT SO HELP

#

HEELEP

#

ILL GIVE MOENY

#

ILL PAY U

#

I JS WANNA PLAY GENSHIN IN PEACE

#

@stuck elm WAKE TF UP

#

@stuck elm PLZ

#

@stuck elm HELP ME MAKE A GOD DAMN UFCKINJG SWAP YOU PIECE OF SHIT

faint leaf
#

@stuck elm am sry ok

stuck elm
#

!give @faint leaf :3

uncut shellBOT
faint leaf
#

WAT A COOKIE

#

OOOOOOO

#

TY

#

!give @stuck elm command_block

uncut shellBOT
faint leaf
#

what

#

oh nice

#

command block of a cookie ๐Ÿ’€

ancient glacier
ancient glacier
#

Show output of these

cat /proc/cmdline
sudo grep -r . /sys/kernel/debug/zswap/
zramctl

@faint leaf

stuck elm
faint leaf
#

i think regenerating the swap did the job already but i wouldn't say we have fixed this issue yet since the freezing could happen at any damning time

#

so i think we should js wait

#

in the meantime

#

i need to know where i should put my swap

#

while i have created a working swap

#

its on btrfs root

#

meaning when i open dolphin or smt i see this yucky @ and @home at my root

#

can you please help me get it right or smt ๐Ÿ˜ญ

#

@ancient glacier

ancient glacier
#

In that case you can't

faint leaf
#

i just MOUNTED the top level

#

on the fstab

#

then made a folder for swap

ancient glacier
#

Why did you mount it in your fstab

#

Either put the swap subvol in /swap
or mount the top-level subvol and make a @swap subvol there and mount the @swap subvol in your fstab to /swap

faint leaf
#

OH DO I NEED TO MAKE THE SWAP IN TOP LEVEL?

ancient glacier
faint leaf
#

i already had a subvolume so i did it in there

ancient glacier
faint leaf
#

it was in /swap

#

my old goofy swap i deleted

#

then i tried to make a new one

#

in /swap

#

realised i should do it from the subvolume itself at top level

#

please do not ask about how autistic my old swap was ๐Ÿ’€

ancient glacier
#

After you're sure you have swap (swapon --show) run the commands I sent

faint leaf
faint leaf
#

@ancient glacier new bug

#

i did nothing

#

and this is fucking happening now

#

it said server authentication

#

then that crashed

#

then it reopened plasma

#

then it said server authentication

#

then it crashed

#

i cant access my desktop

#

please help

ancient glacier
#

... tty

little pawnBOT
#

#15700 ๐Ÿ“ฃ To open a TTY (virtual console) press and hold Control, Alt and then press F1 through F6

faint leaf
#

@ancient glacier do you know why its doing this

#

@ancient glacier it works if i connect to my hotspot but if i connect to the damning school wifi my whole plasma goes insane

#

its the fucking locked down internet

#

man

ancient glacier
#

journalctl -b -0 to read the current boot journal

#

journalctl -b -0 | curl -F 'file=@-' 0x0.st to send current boot journal

faint leaf
#

i dont mind having to hotspot on boot

#

i do it anyway with my windows laptop since proton vpn got updated and it requires auth on startup

#

so yeah basically the same routine for me

#

ill run those commands in a minute just finishing my swap off

faint leaf
#

@ancient glacier mizook@misonomika/~$ cat /proc/cmdline BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=60d8d52b-bea8-4567-a880-ae79b51aeb65 rw rootflags=subvol=@ debug loglevel=3 quiet zswap.shrinker_enabled=1 zswap.enabled=1 zswap.compressor=zstd zswap.max_pool_percent=25 zswap.zpool=zsmalloc lockdown=integrity mem_sleep_default=s2idle mizook@misonomika/~$ sudo grep -r . /sys/kernel/debug/zswap/ [sudo] password for mizook: /sys/kernel/debug/zswap/stored_pages:1621 /sys/kernel/debug/zswap/pool_total_size:3411968 /sys/kernel/debug/zswap/written_back_pages:0 /sys/kernel/debug/zswap/decompress_fail:0 /sys/kernel/debug/zswap/reject_compress_poor:0 /sys/kernel/debug/zswap/reject_compress_fail:0 /sys/kernel/debug/zswap/reject_kmemcache_fail:0 /sys/kernel/debug/zswap/reject_alloc_fail:0 /sys/kernel/debug/zswap/reject_reclaim_fail:0 /sys/kernel/debug/zswap/pool_limit_hit:0 mizook@misonomika/~$ zramctl mizook@misonomika/~$

faint leaf
#

@ancient glacier is turning up the swappiness too much a bad thing?

faint leaf
#

nice

#

i think just remaking the swap fixed it

#

i test performance

#

by playing genshin

#

on arch

#

its struggling

#

it still struggling

#

i think we added too much swappiness

#

YES LAST ONE

#

WE GETTING SOMEWHERE

#

we in..

#

omg

#

we actually loaded in

#

but i need to decrease swappiness

#

bc its using more swap than ram

#

its doing pretty good for ram however

#

the cpu is struggling

#

but yeah who cares i cant solder a new one in ๐Ÿ’€

#

now we teleport to somewhere for testing hehe

#

teleporting is as usual

#

i got from one place to another FASTER than windows can do it

#

good job genshin hehe

#

genshin is spitting out more fps than windows can too

#

thats epic

#

i think our freezing problem might be fixed

#

tested combat

#

it works flawlessly

#

better FPS than windows even when there is 5 billion particles everywhere when fighting

ancient glacier
#

Check zswap stats

faint leaf
#

i think it struggles more with disk since it took ages to open the wings when i jumped off like the texture took a bit to load

faint leaf
ancient glacier
faint leaf
#

should i keep them?

#

yeah its struggling with IO such as gui elements

#

like it has to load a menu for example

#

it takes its time to load it

#

but main gameplay is absolutely flawless

#

its just loading thats the problem

ancient glacier
faint leaf
#

loading from disk

faint leaf
ancient glacier
#

when the kernel swaps memory to disk it first goes to zswap and is then compressed and stored in memory until the zswap pool is full

faint leaf
#

alright

ancient glacier
#

non compressable data is sent to disk right away

faint leaf
#

i see

ancient glacier
#

and it also has to read from the disk

#

and then that's probably sent to the disk too...

faint leaf
#

๐Ÿ˜ญ๐Ÿ˜ญ

ancient glacier
#

Check the zswap stats for how full the pool is

faint leaf
#

how to

ancient glacier
#

sudo grep -r . /sys/kernel/debug/zswap/

faint leaf
faint leaf
#

@ancient glacier how come every time i open a tty then the x11 server crashes

#

like its just a typing indicator in the top left

proper frost
faint leaf
proper frost
#

wdym, when youre on X and then switch to a TTY its just a blinking cursor nothing else?

faint leaf
#

on wayland this bug didnt exist

#

but i switched to x11 because wayland didnt start an x server properly

proper frost
#

Im not too familiar with wayland but my GF is on wayland and she doesnt have anything related to X

faint leaf
#

it never created it for me even when i installed x11

proper frost
#

Thats cuz you'd have both installed yes, but you can only pick one or the other.

#

like when login

faint leaf
#

wayland or x11

#

i pick

#

defaults to my last used so its always x11 now

proper frost
#

yes so are you really launching a TTY (pressing ctrl alt F1-F7) ? or do you mean that when you login with X11 you only get a blinking cursor and no desktop?

#

because you dont need a greeter, a DE or X (or Wayland) to access a TTY...

faint leaf
#

if i open a tty at greeter time and go back to the greeter after and login normally its blinking cursor

#

i logout and everything

proper frost
#

okay well you need to start X again

#

I think the command is startx on top of my head

faint leaf
#

also i cant really start x if the cursor is just blinking like that

proper frost
#

So let me get this straight you
-login into an Xsession
-switch to a TTY with lets say CTRL+ALT+F3
-Then you try and switch back to Xorg with CTRL+ALT+F1 Im assuming?
And theres just a blinking cursor?

proper frost
#

If you replace the last step by startx instead of CTRL+ALT+F1 what does it do?

faint leaf
proper frost
#

Nvm it doesnt work

#

Hmm I... never went back to desktop after going into a tty tbh

#

Why do you need to swap from desktop to a tty though?

faint leaf
#

ykw its fine

proper frost
#

Its not a bug because my machine does this too but I do admit I am curious about making this work

faint leaf
#

hmmm i see

proper frost
#

@faint leaf okay thanks for your patience

uncut shellBOT
#

pot of received a thank you cookie!

proper frost
#

If you wanna come back to your desktop from tty

#

(Youre using sddm as a greeter?)

faint leaf
proper frost
#

You can simply sudo sddm it should start back your desktop

#

Also bonus tip ctrl+alt+backspace reloads your Xsession.

#

Least for me thats what works right now.
From X to TTY with ctrl+alt+F2 then I launch back the greater with sudo lightdm (sddm in your case), and Im back on my desktop.

#

But really the TTY is just used as a lifesaver so I dont see all this being very practical. Good info to know I guess so thanks for the learning exp colon_three

#

Consider closing the thread if everything is resolved for you.

Also feel free to make another one for other issues.

#

... solved

little pawnBOT
#

#17680 ๐Ÿ“ฃ If there is nothing else that we can do for you, please close this thread by adding "[SOLVED]" to the title.

  • You can do this on desktop by clicking the three dots on the top right of the page, and pressing "Edit Post".
  • You can also do this on Android / iOS by long tapping your post in the text channel list, and tapping "Edit Post".

Your title should be like so: http://0x0.st/8Rt9.png
Thank you

faint leaf
#

OH MY FUCKING CHRIST

#

ITS FUCKING BACK

#

MY PC IS FUCKING FREEZING AGAIN

#

ALL I DID WAS OPEN GOD DAMN FUCKING STEAM AND THE WHOLE FUCKING THING FUCKING FROZE

#

IM SICK OF HAVING TO REISUB EVERY FUCKING DAY

proper frost
#

Everytime I tried reisub it never worked. toks

proper frost
faint leaf
#

i used windows on this laptop for 5 years

#

now im arch user

proper frost
#

Was the hardware working well on other distros?
Could consider Memtest8 and SMART test, these are fairly easy to do. And perhaps a cpu stress test.

#

Okay

faint leaf
#

yeah i have done all of that all by playing genshin impact ๐Ÿ’€

proper frost
#

Well, i still find it curious it crashes so dam much

faint leaf
#

every day i have to fucking reisub

faint leaf
#

the whole way through genshin gameplay today i was at 100% cpu

#

it was fine

proper frost
#

Memtest is real easy and fast to do.

faint leaf
#

i think i have done a memtest in the past

#

and nothing showed up

proper frost
#

What does the logs say? Have you poked at journalctl?

#

Also jumping from windows straight into arch is quite a leap.

faint leaf
proper frost
#

No

#

journalctl -k -r -b -1 --lines=100 to see what happens at shutdown.

#

Well, last shutdown

#

So after a crash reboot and type this to see the last 100 journal lines before the REISUB.

proper frost
#

You would need to show me above the SIGTERM line

faint leaf
#

i dont see any errors or anything up there

proper frost
#

I would still share the logs so we can look at it.

faint leaf
#

h o w

proper frost
#

You could journalctl -k -r -b -1 --lines=150 >> ~/REISUBcrash.log and send the file here.

faint leaf
#

okok

proper frost
#

Or wtv ways of sharing text that floats your boat.

#

Like pastebins and such

faint leaf
proper frost
#

Sorry had to fetch it on my PC

#

Ehh thanks but very cryptic to me... I cant even pin point when the system actually froze.