Team Fortress 2

Team Fortress 2

Not enough ratings
Linux survival guide for Team Fortress 2
By d14 (it/its/pup/pups)
A guide on how to improve and help stabilize the Source Engine (TF2 here) on any Linux distros, preferably xUbuntu
   
Award
Favorite
Favorited
Unfavorite
Source Engine crashing due to missing U+033F character
Description

• Problem is caused by Source Engine not realizing the `U+033F` character in your font (Verdana by default). The system usually finds a fallback font but due to some bugs it crashed instead.
• Solution is to install a fallback font

Solution

I've tried many fallback fonts but TF2 just loves to use this one specific font, `WenQuanYi Zen Hei`, even after modifying the WenQuanYi Zen Hei configuration files. That's why we'll be going for that font.

To install it, do
sudo apt install ttf-wqy-zenhei
Note that Arch Linux uses wqy-zenhei (Ubuntu code edited thanks to sobaque)
Make Source Engine show non-Latin glyphs
Brief description and why you should do it

There's this one thing about the font WenQuanYi Zen Hei, is that the font itself doesn't have the character needed for your "daily pleasure". Take a look at this lenny face:
( ͡° ͜ʖ ͡°)

As you can see, the mouth of the face (character U+035C, in Combining Diacritical Marks), won't show up inside the in-game chat window after installing the font WenQuanYi Zen Hei. Reason being that the font was a Chinese font. It includes most glyphs that you would normally see inside CJK fontsets (Noto CJK for example). To save spaces, the font didn't have the U+035C glyph. And of course, Source Engine decided to ignore that instead of crashing or falling back to a font, just do annoy the heck out of you.

If you're like me (aka spams a lot and uses lots of Unicode characters) or you want to see what Windows users see (but in a greater appearance), then this step will help you.

Some examples

How to do:
  1. Download the new `wqy-zenhei`
    Originally posted by "Remove Space between mega and .nz":
    https://mega .nz/#!cIMnAIjK!IjrbpEKN9FYmUwfIJu04DAnYkAibAJD8yJ3ssoQhRpM
  2. Type in Console `sudo nautilus`
  3. Copy the wqy-zenhei.ttf file to /usr/share/fonts/truetype/wqy/ (overwrite the old .ttc)

Some other steps (optional but recommended)
This step is recommended, since TF2 uses Verdana but the font is built on Noto Sans
Go to
~/.local/share/Steam/steamapps/common/Team Fortress 2/tf/custom/YOUR_HUD/resources/chatschemes.res
Then open up that file, Find all Verdana and replace it with WenQuanYi Zen Hei (use the Find and Replace tool). It makes the fonts look much better.
If you don't have a HUD, then just download a HUD (preferably Improved Default HUD if you want to) then grab the chatschemes.res file only.
Q: Ok, why the ♥♥♥♥ do you want me to do this? I am too lazy to do it
A: Please just do it. The font was built on Noto Sans (open source) and Arial Unicode MS (don't sue me please). If you mix the Noto Sans font with Verdana, it looks really ugly.

Q: What the ♥♥♥♥ is in this font anyway?
A: Noto Sans regular, Noto Sans Canadian Aboriginal regular, Noto Sans Thai regular, Arial Unicode MS regular (since it only has regular style, do NOT use other styles and do NOT use this font in documents, go for something else like Noto Sans CJK or Arial Unicode MS)
General issues such as crashing randomly, low frames per second or optimizing nVidia drivers
Crashing randomly
How the ♥♥♥♥ am I suppose to help you? Alright, I'll try
  1. `mat_phong 0` and `mat_bumpmap 0` (phong is ugly without bumpmap)
  2. `mat_picmip 2` and `r_lod 1`
  3. `mat_queue_mode -1`

Low frames per second
Easy, use a performance configuration, preferably Rhapsody's (Cowmanglia's exists but Rhapsody's ones update more often)

Website here, go check it out for yourself: https://rhapsodysl.github.io/perfconfig/

Make sure to open up and READ THE DAMN FILE! The file is very customizable, and if you customize it properly, it will give you massive FPS boost while maintaining appearance.

nVidia drivers
WARNING! PROCEED WITH CAUTION! YOU HAVE TO USE NVIDIA'S PROPRIETARY DRIVER FOR THIS!

1. Resolve screen tearing without VSync
- Generate `xorg.conf`: https://askubuntu.com/questions/217758/how-to-make-an-xorg-conf-file
- Go there, find this and add

New line(s):
Option "TripleBuffer" "1" Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"

TripleBuffer and ForceFullCompositionPipeline helps reduce screen tearing greatly with minimal input lag. It also applies to the entire system, even when you're watching YouTube videos.

2. Boosting performance
Open up NVIDIA X Server Settings, go to the OpenGL settings inside the X screen 0 section and make the following changes:
12 Comments
lightwo 18 Feb @ 1:42pm 
The "Make Source Engine show non-Latin glyphs" isn't relevant any longer as the game has been updated to fix pretty much all font issues.
lightwo 15 Jul, 2022 @ 8:00am 
Eyo, I made an updated guide for fonts not knowing yours existed. Anyway, in that one the download isn't needed for the edited WQY-ZenHei since it explains how to do the modification. Cheers
d14 (it/its/pup/pups)  [author] 28 Aug, 2021 @ 10:37pm 
MrSoup678: I don't think I'd be willing to head to MEGA in current year. Is the bug still an issue? I believe if you have fontconfig, you can force override WenQuanYi Zen Hei to a generic font with proper overrides like Sans.
MrSoup678 23 Aug, 2021 @ 8:14am 
Hello, I have a question. Do you still have that modified font file? Cuz the link is down.
HK 18 Aug, 2021 @ 6:21am 
You can fix the issue where text copied from TF2 will crash chromium-based applications by symlinking the 32-bit SDL library from /usr/lib32/ to TF2/bin/libSDL2-2.0.so.0 . Not 100% sure if this is VAC-safe though since this can be seen as modifying a game library.
d14 (it/its/pup/pups)  [author] 23 Mar, 2021 @ 9:00pm 
This only works when the game is full-screened.
d14 (it/its/pup/pups)  [author] 23 Mar, 2021 @ 9:00pm 
On XFCE, you can make the WM compositor avoid compositing the game window in the Window Manager Tweaks dialog, Compositor tab.
HK 21 Mar, 2021 @ 10:04am 
Another tip: If you're noticing the game stuttering more than it would on a Windows install, try turning off your display compositor. I know xfcewm has this problem and this is the only workaround I could find.
Wolf Rayet 11 Jun, 2020 @ 6:57am 
Thank you for this
d14 (it/its/pup/pups)  [author] 9 May, 2018 @ 8:44pm 
Fixed, arigathanks