Some Games are crashing linked to a vm_max_map_count too low

Bug #2057792 reported by vinceff
814
This bug affects 198 people
Affects Status Importance Assigned to Milestone
gamemode (Ubuntu)
Confirmed
Undecided
Unassigned
linux (Ubuntu)
Won't Fix
Undecided
Unassigned
procps (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Hello there,

I submit this request to improve the gaming experience in ubuntu for all users.
Today, Hogwarts Legacy, Star Citizen and few more games are crashing or just not starting because the vm_max_map_count is locked at 65530. If we change this value to a value > 200000, all games are working well and there is no bug linked to maps.

Some others distribution like Fedora or Pop OS, have already made the change few month before.

It's time to Ubuntu to makes the change also.

Thanks in advance for applying this request.

How to make this change :

One file to modify :
/etc/sysctl.conf
Add this line :
vm.max_map_count=2147483642
Save
Reboot and enjoy

Best Regards
Vinceff

CVE References

vinceff (vinceff)
tags: added: gaming
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Libera.chat.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/2057792/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu):
status: New → Confirmed
Changed in ubuntu:
status: New → Confirmed
Revision history for this message
vincent delor (cardiacman) wrote :

Hi,

SteamOS and Fedora has already adopted a higher default value for this parameter, leading to a noticeably smoother gaming experience. Implementing a similar adjustment in the next Ubuntu release could provide a substantial boost to the gaming community, making Ubuntu an even more attractive platform for gamers.

Thank you for considering this enhancement. Your efforts to improve the gaming ecosystem on Linux are greatly appreciated.

Regards,

Vincent.

Revision history for this message
Yannick Defais (sevmek) wrote :
R (r87)
summary: - Some Games are crashing linked to a vm_max_map_count too low
+ Certains jeux crashent liés à un vm_max_map_count trop faible
delta (deltabtw)
Changed in ubuntu:
status: Confirmed → Fix Released
Changed in linux (Ubuntu):
status: Confirmed → In Progress
status: In Progress → Fix Committed
status: Fix Committed → Confirmed
vinceff (vinceff)
Changed in ubuntu:
status: Fix Released → Confirmed
summary: - Certains jeux crashent liés à un vm_max_map_count trop faible
+ Some Games are crashing linked to a vm_max_map_count too low
Revision history for this message
dan stewart (ledam) wrote :

Many crash because VM_max_count two low.

Revision history for this message
Nicolas Du Moulin (nicdm) wrote :

I can confirm this! Some games do crash because of a to low VM_max_map_count.

This change will improve the gaming experience on Ubuntu and thus would be a nice one to have in the next LTS release.

Revision history for this message
francois pussault (fpussault) wrote :

I confirm this! Some games might crash low VM_max_map_count is set too low.

Revision history for this message
mikeonlinux (mickael-stemmer) wrote :

Can confirm some games crash due to VM_max_map_count being set too low by default.

Revision history for this message
A1RM4X onYouTube (a1rm4x) wrote :

Non exhaustive list of games impacted by this bug:
- Dayz
- Hogwarts legacy
- Counter-Strike 2
- Payday 2
- Star Citizen
- ....

Thanks.

Revision history for this message
STLRX (stlrx) wrote :

Got same issue

Revision history for this message
NHiX (nicolasnhix) wrote :

I confirm this ! Please modify default value of VM_max_map_count

Revision history for this message
Elfedac (elfedac) wrote :

Hello,
Got same issue linked to a vm_max_map_count too low.
Regards.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Subscribing Canonical desktop team to get their input.

Basically the ask is to ship this file:

https://src.fedoraproject.org/rpms/systemd/blob/f39/f/10-map-count.conf

I believe if we do it should be shipped in procps; or possibly, gamemode should set that option?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gamemode (Ubuntu):
status: New → Confirmed
Changed in procps (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for the report.

So

- the kernel default and current value is 65530

- Fedora changed to 1048576 (https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/10-map-count.conf) which was enough according to their testing

- you are suggesting 2147483642 , which is several order of magnitude higher

Unsure if there are possible side effects or downside of having a too high value but it's late in the cycle and 1048576 seems like a more reasonable default

@Julian I think from a Desktop perspective we are +1 on bumping to at least 1048576, technically that should be done in systemd I think. It that a FFe/change that you/foundations are wanting to work on?

Revision history for this message
vinceff (vinceff) wrote :

Hello Sebastien,

I agree with you.

The value 2147483642 is the value purposed by TKG kernel, but as mentioned in my report, if the value is > 200k well issues in game is over.

I think, the fedora value is a good approach because we already have return of their experience, and there is no trouble linked about this value reported in the fedora side.

Revision history for this message
Julian Andres Klode (juliank) wrote :

I'm agreeing with desktop in following Fedora to bump to 1048576, the precedence makes this safe, and this I consider this a bug fix for crashing software and not a feature request.

Changed in procps (Ubuntu):
status: Confirmed → Triaged
Changed in linux (Ubuntu):
status: Confirmed → Won't Fix
Changed in procps (Ubuntu):
status: Triaged → In Progress
Changed in procps (Ubuntu):
status: In Progress → Fix Committed
no longer affects: ubuntu
Revision history for this message
Julian Andres Klode (juliank) wrote :

Uploaded procps with the file; leaving gamemode task open because maybe dynamic enhancements there still make some sense in 24.10

Revision history for this message
vadim (vadim1337) wrote :

I suggest including 2147483642 not in LTS, but in Ubuntu 24.10 as an experiment. Because I noticed an unpleasant detail. For example, there is a game "Don't Starve," I know there is a native version, but this is just as an experiment with Proton. If you launch the Proton version, you will receive a message when vm.max_map_count = 1048576: "steam_app_218740" is not responding. You may choose to wait a short while for it to continue or force the app to quit entirely. But when vm.max_map_count = 2147483642, there are no problems, everything loads instantly.

Revision history for this message
Mateusz Stachowski (stachowski-mateusz) wrote :

Just updated the package from noble-proposed and the file is there with the agreed value.

Changed in procps (Ubuntu):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package procps - 2:4.0.4-4ubuntu3

---------------
procps (2:4.0.4-4ubuntu3) noble; urgency=medium

  * No-change rebuild for CVE-2024-3094

 -- Steve Langasek <email address hidden> Sun, 31 Mar 2024 08:16:00 +0000

Changed in procps (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Uwe Schindler (uwe-thetaphi) wrote :

To complete the list of products: In addition to games, this change is also useful for users of Elasticsearch and/or Opensearch and Apache Lucene/Solr on large clusters.

Elasticsearch also suggests raising the value, although not so high: https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
Opensearch: https://opensearch.org/docs/latest/install-and-configure/install-opensearch/index/#important-settings
Apache Solr: https://solr.apache.org/guide/solr/latest/deployment-guide/taking-solr-to-production.html

If you e.g. start Elasticsearch without a large enough vm.max_map_count, it will print a log message to raise it and exit.

My personal opinion: Actually the game issues described here should better be fixed in Steam's launcher when starting such a game (or in Wine). The downstream software should better ask the user to raise the value upon starting.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.