Skip to content

u/grg994

In this archive from Jan 2022 to Oct 2024

3
posts
69
comments
2
media
753
score

Memory is complicated, shared resource, "would be terrible" is not the argument that one wants to make. I would trust the kernel to know what to do unless proven otherwise.

I guess one is testing with an ssd, then:

  • turn on swap with same size as ram,
  • swapiness=100 and
  • every other vm.* to default.

May fake occupied uncompressible memory by example:

head -c 8000000000 /dev/random > /tmp/my_ballast

Then measure by looking at pressure stall info while using the system. (Still not objective, but probably the best metric people came up with):

watch cat /proc/pressure/memory

and

watch cat /proc/pressure/io

Is there a regression in these values with transparent huge pages on?

4 points

Doesn't the kernel break up huge pages once memory pressure appears and swapping some parts of the huge page is needed? I know there are parameters controlling that, I would go for those first if there is a real problem here.

Until there is no memory pressure saving ram does not help with anything expect the user's ego - or as we always say unused ram is wasted ram.

The only metric that matters is the system performance under memory pressure. Is there a measurable regression in that?

On the other hand having larger page tables of smaller pages is a constant penalty every context switch. Don't kill your performance just for having some nice numbers in (h/b/ )top.

2 points

Doesn't the kernel break up huge pages once memory pressure appears and swapping some parts of the huge page is needed? I know there are parameters controlling that, I would go for those first if there is a real problem here.

Until there is no memory pressure saving ram does not help with anything expect the user's ego - or as we always say unused ram is wasted ram.

The only metric that matters is the system performance under memory pressure. Is there a measurable regression in that?

On the other hand having larger page tables of smaller pages is a constant penalty every context switch. Don't kill your performance just for having some nice numbers in (h/b/ )top.

1 points

Doesn't the kernel break up huge pages once memory pressure appears and swapping some parts of the huge page is needed? I know there are parameters controlling that, I would go for those first if there is a real problem here.

Until there is no memory pressure saving ram does not help with anything expect the user's ego - or as we always say unused ram is wasted ram.

The only metric that matters is the system performance under memory pressure. Is there a measurable regression in that?

On the other hand having larger page tables of smaller pages is a constant penalty every context switch. Don't kill your performance just for having some nice numbers in (h/b/ )top.

1 points

Okay, no worries then. Probably you hit a random, difficult-to-reproduce bug. The GPU driver's state depends on everything the GPU has done since the boot. If you can't reproduce it, just leave it.

You may check dmesg once in following days that there are no silent issues there, just to be sure.

1 points

Ok, but then add to your post the way you did set it up (the nvidia driver, the something -> VAAPI translation layer you use, etc), so people can understand which of these non-standard setups you use, then someone might be able to help.

(I don't use nvidia, so someone else will have to help with your exact case)

1 points

Don't mark this solved if the "solution" is to downgrade to LTS kernel.

This could be a bug in the amdgpu kernel driver. It is part of the linux kernel.

Maybe regression in 6.6.3 -> 6.6.4. Instead of switching to LTS kernel, does just downgrading the kernel to the previous version (6.6.3) solve the issue?

Downstream (Arch Linux) reporting of kernel bugs go here: https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/issues

Upstream bug reporting for the graphics ("DRM" with kernel terms) kernel drivers of AMD go here: https://gitlab.freedesktop.org/drm/amd

Upstream reporting usually expects you to do some work. Read the details there. Like to try it with the current drm-tip kernel to see if it is already solved upstream for future versions.

(I have never done this for AMD, but Intel has a nice guide for gathering information on kernel gpu driver issues.)

2 points

I don't use nvidia, so only tips:

  • did you check dmesg?
  • motherboard BIOS is likely involved here: make sure fastboot any similar that skips some hardware initialization disabled and that you have is no inappropriate PCIe power saving feature turned on

It might help you debugging this if you do a test with "soft" reboot - only rerunning the kernel initialization but not the BIOS - through kexec

# kexec -l /boot/vmlinuz-linux --initrd=/boot/initramfs-linux.img --reuse-cmdline
# systemctl kexec

This should give a hint whether

  • rerunning the kernel initialization a second time is enough to fix it form 3.0 to 4.0 so this is likely a linux kernel setup issue
  • or rerunning the BIOS a second time during reboot is strictly necessary in with case the BIOS setup is sure involved to some degree
3 points

GPU Hang issue on Laptop, Had to hard shutdown laptop

GPU hangs normally fully recover in about 1 second by the kernel resetting the GPU (screen freeze for max 1-2 s, then a couple frames of flickering), so there is something more to it here.

i915 0000:00:02.0: [drm] ERROR GT0: GUC: Engine reset failed [...]

Maybe a malfunction in GuC firmware? You can try to disable it: https://wiki.archlinux.org/title/Intel_graphics#Enable_GuC_/_HuC_firmware_loading

Or try to use an older GuC version from linux-firmware (or idk maybe with i915.guc_firmware_path ?)

Also if ubuntu works you can compare all i915 parameters (https://wiki.archlinux.org/title/Intel_graphics#Module-based_options) and then force them

There is a bunch of other things that people tend to try: https://wiki.archlinux.org/title/Intel_graphics#Troubleshooting

Also search the official issues for kernel space Intel iGPU problems: https://gitlab.freedesktop.org/drm/intel/-/issues

The package intel-gpu-tools has a lot of other useful tools too. Not saying it is related but I had some power-management related GPU hangs on 10th gen mobile partially solved by increasing the minimum frequency with # intel_gpu_frequency .

4 points

For the 'message' press 'c - continue without paging' and just scroll up at the end :)

(There is a way to run gdb in batch mode where it outputs to a file instead of a terminal but I can't recall the commands instantly)

Anyway looks like it crashed in the middle of printing an error message (https://github.com/MusicPlayerDaemon/MPD/blob/9c19368fc789fa7101110f73b6ffae8503ae326d/src/tag/Config.cxx#L47).

You was about to get an error message like: 'error parsing metadata item "???" '

So 2 things here:

  • there is already an error while parsing your config file. Syntax error (missing or surplus of a syntactic character somewhere) maybe?
  • mpd fails to handle the error well and crashes. If you have some time, consider report it...
1 points

Whenever there is a segfault if you want to give the best shot for people to help do:

  1. Open the coredump in gdb: $ coredumpctl debug mpd
  2. If it asks Enable debuginfod for this session? (y or [n]) say y (this may use up to few 100 MB bandwidth to download debuginfo files)
  3. Run (gdb) bt
  4. If you don't know what is needed also run (gdb) thread apply all bt full
  5. copy the beginning of the coredumpctl output, and the output of the (gdb) commands (redact any personal info, if it's too long put it to a pastebin service and share the link)

This will be likely a bug in mpd or in a dependency.

4 points

I run my own libreddit instance on localhost.

That thing only uses a small non-authenticated subset of the reddit API. Not sure if it will be affected but if yes, I guess I will have a good opportunity to use my Rust knowledge, and contribute patching it to access reddit by web scraping means. Yo-ho-ho-ho!

This year is crazy for the 3rd party software I'm using. Last month Nitter broke down for NSFW tweets. Before yesterday Streamlink and yt-dlp and everything else broke for Twitch. Now this.

3 points

Alt +sysrq +f. This instantly unfreezes the system, although interestingly, no processes (at least not that I can see from my desktop usage, I didn't bother to monitor processes) are killed.

OOM kills (sysrq or not) are logged to the kernel log:

[ 9477.131124] oom-kill:constraint=CONSTRAINT_NONE,nodemask(null),
cpuset=system.slice,mems_allowd=0,global_oom,
task_memcg=/user.slice/user-1000.slice/session1.scope,
task=tail,pid=12944,uid=1000

[ 9477.131136] Out of memory: Killed process 12944 (tail) 
totalvm:8157860kB,anon-rss:6434048kB, file-rss:128kB, shmem-rss:0kB, 
UID:1000 pgtables:16000kB oom_score_adj:0

You can view it:

# dmesg

or

# journalctl -k -b 0
3 points
  • Most importantly keep backups of your files. Test backups and make sure you can restore from them.
  • If you save passwords in your browser enable master/primary password which encrypts the browser's password storage. And most browsers support multiple profiles which can have their settings and extensions installed, eg. I have a separate profile for banking which is clean with no extensions installed.
  • Read the Arch wiki pages about configuring the network setup you use. Eg. for DNS with systemd-resolved consider enabling DNSSEC and using a DNS-over-TLS provider. These are not enabled by default.
  • For firewall you may pick your poison. I started with nftables default config, for me it's a reasonable starting point, although changing the config later is not that user friendly as in others.
  • If you are running network services/daemons (transmission, ipfs, ..., eg. I have a local libreddit and nitter instance), prefer to start them with a systemd .service which runs them under their own user. And check their configs that sockets that don't need to be internet facing are binded to localhost / 127.0.0.1 instead of 0.0.0.0
  • Wine running windows apps can expose the system to most of risks that the windows ecosystem has. Read Wine security guidelines and consider using sandboxing for Wine
7 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.