Skip to content

Q3lite FAQ

cdev-tux edited this page Apr 1, 2021 · 12 revisions

 

Q3lite FAQ - Frequently Asked Questions

    The Q3lite FAQ should answer many of the common questions about the game. You can also refer to the README.md file located in the Q3lite source directory for additional information.

Section 1: General Q3lite Questions

1.1 - Does Q3lite contain everything needed to run Quake III Arena?
1.2 - How do I launch Q3lite?
1.3 - Can I launch Q3lite from a non-graphical command line?
1.4 - I launched Q3lite from the desktop and I have a black screen?
1.5 - How do I change game settings and have them reload automatically?
1.6 - Where can I get custom Q3 maps for use with Q3lite?
1.7 - How do I run a timedemo to benchmark the game?
1.8 - How can I launch a dedicated server on the desktop/cmdline?
1.9 - How do I launch a dedicated server in the background?
1.10 - How did you create the Q3lite Logo?

Section 2: Raspberry Pi Specific Questions

2.1 - Which versions of the Pi will Q3lite compile and run on?  
2.2 - What Pi memory split should I use with Q3lite?  
2.3 - Can I change the Q3 screen resolution from the default desktop resolution?  
2.4 - Why are my keyboard keypresses leaking back to the desktop when I run Q3lite?  
2.5 - Why is my mouse sluggish even with acceleration maxed out?  
2.6 - How do I set up Q3lite on Raspbian Lite?  
2.7 - How can I fix distorted sound output from the 3.5mm audio jack?  
2.8 - Can I swap an SD card w/Q3lite from a Pi 1 to a Pi 3 or vice versa?  
2.9 - How can I improve game performance?
2.10 - Why can't I see through portals or see reflections in mirrors?

 

Section 1: General Q3lite Questions

 

1.1 - Does Q3lite contain everything needed to run Quake III Arena?

No, you'll still need to copy the pak0.pk3 file from your full version of Quake III Arena to the Q3lite directory: /usr/local/games/quake3/baseq3. You can purchase a copy of Q3 from GOG or Steam, search for "Quake III". It goes on sale from time to time for as little as $4.99. If you receive an error about the pak0.pk3 file then it is likely corrupted or missing. You'll also need the updated pak files from the Quake III Arena 1.32 point release. These files are named pak1.pk3 - pak8.pk3 and need to be copied to the directory: /usr/local/games/quake3/baseq3. The Q3lite installer will install these files for you if you agree to the id software EULA. If needed you can download the pak files from: https://ioquake3.org/extras/patch-data/ manually and copy them to the Q3lite directory mentioned above. You can also download the Quake III Arena 1.32 point release and extract the updated pak files from that. The point release file is in x86 format, so you'll need a 32 bit x86 Linux PC to extract the files.

    https://github.com/nrempel/q3-server/blob/master/linuxq3apoint-1.32b-3.x86.run

or

    ftp://ftp.idsoftware.com/idstuff/quake3/linux/linuxq3apoint-1.32b-3.x86.run

If you get an error something like "User Interface is version 3, expected version 6" when running Q3lite then you probably don't have the updated pak files installed.

1.2 - How do I launch Q3lite?

The game launch icons are located in the applications menu under the Games section. Select the Q3lite folder and a fly-out menu will appear. There are multiple Q3lite game icons, one for playing the game, one for running timedemo benchmarks, one for launching a dedicated server, and one for launching the RCON program to control background servers. You can right-click on these menu icons and choose "Add to desktop" if you would like desktop Q3lite launch icons.

1.3 - Can I launch Q3lite from a non-graphical command line?

Yes, just run the "q3lite" script from the command line with:

    sudo q3lite

1.4 - I launched Q3lite from the desktop and I have a black screen?

When a game error occurs, the error window opens on the desktop in x11 and may leave you with a black screen. Most of these error windows have been fixed to write errors to the crashlog.txt file instead, but there may still be a few cases where it's broken. To return to the desktop press Ctrl+Alt+F1 then Ctrl+Alt+F7. That will flip the virtual terminal windows and you should be back at the desktop. If your keyboard and mouse don't function, simply unplug them for a few seconds and plug them back in. You can then close any error windows on the desktop.

1.5 - How do I change Q3lite player settings and have them reload automatically?

Q3lite provides an autoexec.cfg file that you can use to make changes to game settings. Although this file doesn't contain every last setting, it's a good starting point for building your own custom settings file. The file is well commented to aid in customizing your settings and is located in the user home directory ~/.q3a/baseq3. You can also find an original copy in the Q3lite source directory under /misc/q3lite/autoexec.cfg. The file contains a few movement key bindings to get you going, but you'll need to set all of your settings here or else comment out the movement key bindings (place a "//" at the beginning of each line) and set them in the game menu. Any key bindings set in your autoexec.cfg file will override in-game settings.

1.6 - Where can I get custom Q3 maps for use with Q3lite?

A good place to start is: https://lvlworld.com/

1.7 - How do I run a timedemo to benchmark the game?

To run a timedemo benchmark select the timedemo icon in the applications menu under the Games section. You can also launch a timedemo from the command line with:

    sudo q3lite timedemo

When the timedemo is complete you can pull down the in-game console with the "~" key (or Shift-Esc) and check your frames-per-second (fps) number. If you can lower your screen resolution and settings enough to maintain 125 fps then you'll be able to jump a little bit higher than you can with other fps numbers.

1.8 - How can I launch a dedicated server on the desktop/cmdline?

To launch a server on the desktop you can select the Q3lite server icon in the applications menu. To shut the server down you can type "quit" in the server terminal (preferred) or simply close the server terminal window.

To launch a server on the command line enter:

    sudo q3lite-ded

Note that the server will shut down automatically if you log out. To prevent this you can run the server as a background service; see details in the next section.

If you decide to run a Q3lite server on the Internet, then you should set up a suitable firewall to protect the server. Instructions for setting up a firewall are outside the scope of this wiki, so you'll need to research that. An article entitled "Take These Steps to Secure Your Raspberry Pi Against Attackers" has some good information to get you started, but a custom firewall is needed to properly protect a Quake 3 server running on the Internet. The Q3lite server.cfg file is configured by default to launch a LAN server which won't ping the master server and isn't visible on the Internet.

1.9 - How do I launch a dedicated server in the background?

The systemd service file "q3lite_ded.service" is automatically installed by the Q3lite installer, but is disabled by default. You can use the "q3admin" program to |Start|Stop|Get Status|Start at Boot|Start a Logfile| for the background server. To run q3admin, enter in a terminal:

    q3admin

This will show you a list of the available background server commands.

To start the background server service, enter in a terminal:

    q3admin start

This manually starts the background server, but it won't automatically start at boot time unless you use the "q3admin boot" option. This will also start a read-only logfile console. If you shut down the logfile console and want to restart it, enter in a terminal: q3admin showlog. You won't be able to enter server console commands in the read-only logfile console. To send commands to the background server you can use the Q3lite RCON program, which can be launched from the applications menu in the Q3lite folder, or by entering in a terminal: rcon. You can also use the standard Quake3 rcon commands while connected to the server as a player/admin.

To stop the background server service, enter in a terminal:

    q3admin stop

To check if the background server is running and whether it's set to start at boot time, enter:

    q3admin status

To set the background server to launch at boot time, enter:

    q3admin boot

The server service will now launch automatically in the background every time you boot.

To disable the background server from launching at boot time, enter:

    q3admin noboot

To launch a read-only logfile console for the background server, enter:

    q3admin showlog

As mentioned above, if you decide to run a Q3lite server on the Internet, then you should set up a suitable firewall to protect the server. Instructions for setting up a firewall are outside the scope of this wiki, so you'll need to research that. The Q3lite server.cfg file is configured by default to launch a LAN server which won't ping the master server and isn't visible on the Internet.

1.10 - How did you create the Q3lite Logo?

The short answer is SolidWorks™.

 


 

Section 2: Raspberry Pi Specific Questions

 

2.1 - Which versions of the Pi will Q3lite compile and run on?

I've tested Q3lite on a Pi Zero W, Pi 1, Pi 2 and Pi 3, all with at least 512 MB of memory. You may be able to get Q3lite running on a Pi with 256 MB of memory but you'll need to lower the screen resolution and adjust the memory split to less than 128 MB for the GPU. You'll also need to lower the com_hunkMegs, com_zoneMegs, and com_soundMegs settings in /usr/local/bin/q3lite. I haven't tested any Pi's with 256 MB of memory so you'll have to experiment.

2.2 - What Pi memory split should I use with Q3lite?

You should dedicate 128 MB of memory to the GPU with the line gpu_mem=128 in the /boot/config.txt file or by running raspi-config in a terminal. The memory split option is under "Advanced Settings". The memory split setting isn't absolute; you may be able to get away with less memory for the GPU if you use a lower screen resolution, play on smaller maps, etc.

2.3 - Can I change the Q3 screen resolution from the default desktop resolution?

Yes, but it requires a manual workaround. The Raspberry Pi video driver in the SDL2 library currently only uses the desktop resolution. So it's necessary to use the Q3lite launch script to change the desktop resolution to the desired game resolution, launch the game, then reset the resolution upon game exit. To do this open the /usr/local/bin/q3lite file in your favorite text editor and uncomment the line under the section entitled "Set Q3lite video resolution mode" that sets the game resolution (remove the leading # hash mark). This Link shows which line to uncomment and modify.

    #tvservice -e "DMT 85"

Change the resolution to match one that's supported by your monitor. You can view all supported monitor resolutions by typing the following in a terminal:

    tvservice -m DMT

    tvservice -m CEA

Your monitor may show supported resolutions under CEA, DMT, or both, it just depends on the monitor. Add your desired resolution to the line. Next determine your current desktop resolution by typing the following into a terminal:

    tvservice -s

Uncomment the line under the section entitled "Reset desktop video resolution mode" that resets the desktop resolution (remove the leading # hash mark). This Link shows which line to uncomment and modify.

    #tvservice -e "DMT 82"

Change the resolution to match the one shown by the "tvservice --status" command and save the file. When you launch Q3lite you should now be using the desired resolution. Verify the resolution in-game by pulling down the Q3 console with the "~" key (or Shift-Esc) and scrolling up to see the resolution used. The example settings of "DMT 85" and "DMT 82" set the screen resolutions to 720P and 1080P respectively.

One last step is to verify that you have "seta r_mode -2" in your autoexec.cfg file located in: ~/.q3a/baseq3.

2.4 - Why are my keyboard keypresses leaking back to the desktop when I run Q3lite?

There seems to be an issue with SDL2 on the Raspberry Pi where keypresses leak back to the x11 desktop, causing all sorts of unintended events while you're playing the game. During my testing I witnessed random files opened, desktop icons gzipped into archives, applications opened and other general mayhem. Others have mentioned the issue on the SDL forums. The workaround that I came up with is to disable user input to the X server while running the game. This isn't necessary if the X server's not running. The Q3lite installer will attempt to auto-detect the correct keyboard id's to disable, but if it doesn't choose the right ones then you can set them manually. X server input can be disabled using a program called xinput. Xinput may be installed on your Pi already; if not you can install it with:

    sudo apt-get install xinput

Typing xinput into a terminal should give you a list of your connected input devices similar to that shown below.

pi@raspberrypi:~ $ xinput

⎡ Virtual core pointer                    		id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ NOVATEK Kensington U+P Keyboard         	id=8	[slave  pointer  (2)]
⎣ Virtual core keyboard                   		id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ NOVATEK Kensington U+P Keyboard         	id=6	[slave  keyboard (3)]
    ↳ NOVATEK Kensington U+P Keyboard         	id=7	[slave  keyboard (3)]

You need to make a list of device id's, adding the id number for each line that does NOT contain the word "Virtual". So you'll need to disable device id's 8, 6, and 7 in the above example. To manually set the keyboard id's to disable open the /usr/local/bin/q3lite script and change the line that pertains to xinput:

    xinput_id=""

Change this line to add the keyboard id's from lines that don't contain the word "Virtual". For the above example change the line to:

    xinput_id="8 6 7"

Make sure the id list has a blank space between id numbers, but no leading or trailing blank spaces. Save the file and test for keypress leakage. Changing the id numbers to the correct ones should fix your keypress leakage issue. Once the leakage issue is fixed in SDL2 then this problem will go away. For additional information see man xinput.

2.5 - Why is my mouse sluggish even with acceleration maxed out?

The fix is to open /boot/cmdline.txt and add this to the end of the line:

    usbhid.mousepoll=0

Then reboot and you should be able to adjust the mouse to your liking. This seems to be less of an issue with Raspbian Stretch than it was for Raspbian Jessie. https://github.com/raspberrypi/linux/issues/642
You can also adjust your in-game mouse sensitivity by changing the "sensitivity" cvar in your autoexec.cfg file.

2.6 - How do I set up Q3lite on Raspbian Lite?

See the Compiling and Installation Guide for complete details.

2.7 - How can I fix distorted sound output from the 3.5mm audio jack?

Try adding the following line to /boot/config.txt:

    audio_pwm_mode=2

Then reboot for this to take effect.

If that doesn't work try adding the following line to /boot/config.txt:

    disable_audio_dither=1

Then reboot for this to take effect.

If you have PulseAudio installed try uninstalling it to see if that fixes the issue.

    sudo apt-get remove pulseaudio

2.8 - Can I swap an SD card w/Q3lite from a Pi 1 to a Pi 3 or vice versa?

Yes you can but there's a catch. The Pi Zero and Pi 1 share a common processor architecture, while the Pi 2 and Pi 3 share a different architecture. You'll need to have the binary files for both architectures in your Q3lite game directory, which by default is /usr/local/games/quake3. To do this compile and install Q3lite on one architecture, then power down and move the SD card to the other architecture and compile and install Q3lite again. You should now have the the following files in your Q3lite game directory: quake3.arm quake3.armv7l q3ded.arm q3ded.armv7l When Q3lite runs it will automatically determine which architecture it's running on and load the correct binary file.

2.9 - How can I improve game performance?
  • Close unnecessary applications and background processes.
  • Edit your /boot/config.txt file and add the following line to the end of the file:
    framebuffer_depth=16
    Even though this is supposed to be the default, it added ~5 fps during timedemo benchmarking.
  • Lower your game resolution and video settings. 720P resolution seems to be the point where you begin to get diminishing returns on a Pi 3. Below that resolution, the game appears to begin being CPU bound. This will vary with different architectures and system settings.
  • Consider adding an I2S interface sound board. The Pimoroni pHAT DAC offers better sound than on-board, and was good for a ~2.5 fps increase during testing. This isn't an endorsement, just what was observed during use on my system. Other similar boards may offer an increase or decrease in performance. I tested a $5 generic USB sound board and lost 5-7 fps, so I wouldn't recommend those. Test sound boards at your own expense and risk, I don't guarantee any results.
  • Compiler settings. Although a lot of testing went into the default compiler settings for each architecture, there may be additional settings that will improve performance. Feel free to test different things and let me know if you find improvements.
2.10 - Why can't I see through portals or see reflections in mirrors?

Set r_fastsky to zero to see through portals and to see reflections in mirrors. This slows down the frame rate quite a bit, so that’s why it’s turned off by default. You can bind a key to toggle the setting on and off. This can be set in autoexec.cfg or in the console:

r_fastsky "0"

https://github.com/cdev-tux/q3lite/blob/dev/misc/q3lite/autoexec.cfg#L547-L548

Clone this wiki locally