Trackmania not enough ram

Man, where are emojis when you need them…

It took you more time to write all this than it would to create a swapfile. :facepalm:

3 Likes

no, it preferably shouldn’t do that :slightly_smiling_face:

But the message in the picture in your initial post pointed to a lack of RAM and/or swap pace - that’s why we went to recommend that.



you posted, then withdrew the post - but you had problems
Apparently, the commands given in the Arch Wiki cannot be used as is.

remedy is found by reading man mkswap
or here:

LANG=C mkswap -h

Usage:
 mkswap [options] device [size]
...

So, it appears the syntax is a little different - adapt it (the size goes last - and just as a number).

I didn’t test it - I only knew the other way,
which is using dd to create a file of the desired size
and format it as swap …

Here you go - with example.
(much too large for you - adapt the count parameter …)

It is really rare that examples taken from the Arch wiki do not work …

Not having enough RAM/SWAP might very well make things crash/close after a certain point.
With 7.68 GiB of RAM total and no SWAP … I find it very likely related.

…oh … and that was before noticing the original error is literally about RAM.

How is this even a discussion?

Buy more RAM and/or add SWAP.
Thats it. There are no other answers.

6 Likes

Well, maybe you have to check the ProtonDB Page I did send you earlier, there is a guy played it 2 weeks ago with a Proton version.
3 weeks ago, even one with 8 GB Ram.

Read up about swap file

And even try my Swap-file script.
I would add 16 GB while you have that much free space on your Disk.

script

swap-activate() {
    # swapfile
    set -e

    # set swapfile path
    path_="/swapfile"

    # convert diskspace to MB
    diskspace="$(df --output=avail -B1 / | tail -n 1)"
    diskspace=$((diskspace / 1024 / 1024)) # Convert GB to MB

    while true; do

        echo "How much MB should your swapfile have?"
        echo "Free space is $diskspace MB"
        echo "  Enter here: "
        read -r i

        # number check
        if ! [[ "$i" =~ ^[0-9]+$ ]]; then
            echo "Memory size must be numbers"
            continue
        fi

        # Diskspace check
        if [[ $i -ge $diskspace ]]; then
            echo "Not enough disk space to create a swapfile of ${i} MB."
            continue
        fi

        # lesser then 1
        if [[ $i -le 0 ]]; then
            echo "${i} MB is a invalid value."
            continue
        fi

        break
    done

    echo -e 'Do you want to use \e[38;2;242;29;0m'"${i}"'\e[0m MB?'
    echo "Press y are Enter to continue"

    read -r r

    if [[ "$r" =~ ^[Yy]$ ]] || [[ "$r" == "" ]]; then

        # Trap signals to perform cleanup actions
        cleanup_() {
            if swapon --show | grep -q "file"; then
                sudo swapoff $path_ || true
                sh -c "sudo rm $path_"
            fi
        }
        cleanup_

        # build swapfile
        sudo dd if=/dev/zero of=$path_ bs=1M count="$i" status=progress || {
            echo "Error creating swapfile"
            sleep 5
            exit 1
        }
        # set permission
        if sh -c "sudo chmod 600 $path_"; then
            echo "chmod 600 $path_"
        else
            echo "Error changing permissions"
            sleep 5
            exit 1
        fi
        # create swapfile
        sudo mkswap $path_ || {
            echo "Error setting up swap"
            sleep 5
            exit 1
        }
        # aktive swap
        sudo swapon $path_ || {
            echo "Error activating swap"
            sleep 5
            exit 1
        }

        # config swap
        sudo sh -c " cat <<'EOF' >/etc/sysctl.d/99-swappiness.conf

    vm.swappiness=11
    vm.vfs_cache_pressure=66
    vm.dirty_ratio=3
    # sudo sysctl vm.vfs_cache_pressure=100
    # sudo sysctl vm.swappiness=60
    # sudo mkinitcpio -P
    # sudo sysctl --system
EOF
"

        # set fstab
        if sudo sh -c "grep -q $path_ /etc/fstab"; then
            echo "Entry already exists in /etc/fstab"
        else
            sudo sh -c "echo \"$path_ none swap defaults 0 0\" >> /etc/fstab"
            echo "Entry added to /etc/fstab"
        fi
    else
        echo "swapfile cancelled.."
    fi

    # show swap
    if [[ -e $path_ ]]; then
        swapon --show
    fi
}
swap-activate
    ~  inxi -Dj                                                                                                                                                                                                                      ✔ 
Drives:
  Local Storage: total: 931.51 GiB used: 180.81 GiB (19.4%)
  ID-1: /dev/sda vendor: HGST (Hitachi) model: HTS541010A7E630
    size: 931.51 GiB
Swap:
  ID-1: swap-1 type: file size: 4 GiB used: 28.3 MiB (0.7%) file: /swapfile
    ~     

Steam still game still doesnt run also got this error

Check your Mem/Swap status with htop while you run Trackmania… most gaming systems use 16Gbyte since 12 year ago… its possible that 8gbyte+ 4Gbyte swap is still not enough.

Close background applications can helps with performance.

Use different Proton versions, like the experimental proton.

1 Like

Add more ram and swap the drive for an ssd. Setting up swap may prevent crashes but since you’re using a 5400rpm spinner drive it will slow the machine down when swap is used.

Trackmania requires at least an AMD Radeon R9 270X which outperforms your R7 M260 by 888%, so I guess, swap or no swap, this isn’t going to work.

1 Like

I would have suggested zram … all the more so if its a spinner disk.

Now that you mention the devices …

Are we sure its even using the AMD?

I think it might be using the intel iGPU.

The preference may be for the AMD … but that will need to be handled.
(DRI_PRIME ?)
On top of that … its using the old radeon driver.
As a southern islands card its pretty old … but new enough to have GCN and thus the ability to enable amdgpu.

Ok so trackmania is runing now(using the 4gb swap, I found cscs guide online and used it without problems Manjaro Freezing BAD - #6 by cscs) from ubisoft connect its still is quite laggy but its playable at like 10-20 fps, after setting the settings to the lowest possible. I would like to learn more about how to optimize it. Im gonna try to install openplay and from it the plugin tweak to reduce render distance and increase fps.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.