mjktfw
Posts: 2
Joined: Thu Feb 01, 2018 12:31 pm

Re: Q3lite - Quake III Arena for the Raspberry Pi

Thu Feb 01, 2018 12:46 pm

That's a great piece of work, @cdev-tux. I've experienced some issues compiling ioquake3 on stretch, but not such problem with your version.
I'm wondering, what would you consider the desired way to programatically launch timedemo in a loop from a headless console? The aim is to benchmark my pi. Currently I'm directly running the quake3.armv7l binary with

Code: Select all

cl_timedemoLog
option set, such as:

Code: Select all

sudo -u pi /usr/local/games/quake3/quake3.armv7l ${other_opts} +set timedemo 1 +demo four +set cl_timedemoLog "timedemolog"
while detaching the job and checking in a loop if the log file was generated. If so, I get the log, kill the process, delete the file and repeat in loop. But maybe there is some more elegant solution making advance of server daemon (witch I'm totally unfamiliar with) or pipefile found in

Code: Select all

~/.q3a/baseq3/pipefile
(was unable to google any documentation on this, however).

User avatar
ztealmax
Posts: 94
Joined: Sat Aug 19, 2017 5:19 pm

Re: Q3lite - Quake III Arena for the Raspberry Pi

Fri Feb 02, 2018 11:23 am

Im really sorry to bother you again, i have narrowed it down to what command dont work as it should
sudo su.

My user pi is in the same groups as in raspbian-stretch-desktop distro still with that command keyboard is locked for making any commands
in console or change playername, how ever when i run only sudo /usr/local/games/quake3/quake3.armv7l fs_homepath /home/"$USER"/.q3a
it works, so i wonder if it is that the startup script isnt working optimal with finding home dir?

Clearification: when starting q3lite the normal way via start menu another config must be used im sure its not the one in /home/pi/.q3a
as username there i different from what i have set (unnamedplayer), and when running it with command i stated above it works and i have
the name i set and i can change playername, and input commands in console. *Really hope you get a ahaa notion of what it might be thats faultering

Sincerally
Martin

User avatar
ztealmax
Posts: 94
Joined: Sat Aug 19, 2017 5:19 pm

Re: Q3lite - Quake III Arena for the Raspberry Pi

Fri Feb 02, 2018 1:30 pm

Ok finally got it working for me under my desktop i had to modify q3lite startup script:

Code: Select all

#!/bin/bash
# Copyright (C) 2016-2017 cdev-tux - github.com/cdev-tux
# This file is part of Q3lite source code.
# See COPYING.txt for license details.

# Make sure we're running as root.
#  Removed this part of the script! // Martin

q3dir="/usr/local/games/quake3"
logged_in_user=$(who | grep -m 1 "." | awk '{print $1}')
if [ -z "$logged_in_user" ]; then
	q3l_user="pi"
else
	q3l_user="$logged_in_user"
fi
q3l_userhome=$(sudo -u $q3l_user -H -s eval 'echo $HOME')
q3l_homepath="$q3l_userhome/.q3a"
current_res="$(tvservice -s)"

# Disable keyboard input to the desktop x11 server if it's running (fixes SDL2 keypress leakage issue).
# This script will try to determine the correct keyboard ID's to disable, but if the auto-detection
# fails then you can determine the ID's manually by using the instructions below.
# Enter "xinput" in a terminal window to show a list of all input devices.  Change the line below to use
# the id number(s) of your keyboard from the "xinput" command. Use the ID numbers from each line
# that does NOT contain the word "Virtual". If your keyboard uses ID 6, 7, and 8
# then set the following line to: xinput_id="6 7 8". See the Q3lite FAQ for details.

xinput_id=""

# The following line that begins with "settings=" contains the command line arguments supplied
# to the game when it starts. Change these settings to match your desired settings.  Don't modify
# the line that begins with "timedemo=" or it may break the timedemo function.
# Settings for vm_ui and vm_cgame:
# +set vm_* 0 = .dll files are used (Windows)
# +set vm_* 1 = .so files are used (Linux, Mac)
# +set vm_* 2 = .qvm files are used (Quake Virtual Machine, default)

settings="+set com_hunkMegs 192 +set com_zoneMegs 24 +set com_soundMegs 16 +set fs_homepath $q3l_homepath +set vm_ui 2 +set vm_cgame 2 +set com_introplayed 1 +set com_protocol 68"
timedemo="$settings +set timedemo 1 +demo four"

if [ $(uname -m) = armv7l ]; then
	arch="armv7l"
else
	arch="arm"
fi

# Check to see if the GUI is running.
if systemctl is-active graphical.target > /dev/null; then
	gui="yes"
	# Attempt to auto-detect the keyboard ID's to disable keyboard input to the desktop x11 server.
	if [ "$xinput_id" = "" ]; then
		xinput_id=$(xinput | grep -i "id=" | grep -i -v "Virtual" | grep -Po 'id=\K[^=[]' | tr '\n' ' ' | sed 's/[ ]*$//')
	fi
	# Echo the xinput keyboard ID's for troubleshooting purposes.
	echo -e "\nxinput_id=$xinput_id\n"

# Uncomment the xinput_id="" line below to prevent xinput from disabling keyboard input to the x11 server.
# Caution, this will allow keystrokes to leak back to the desktop which can cause all sorts of mayhem.
# Leave a text editor like gedit open and in focus on the desktop to catch keystrokes.  This is used for
# troubleshooting.
#xinput_id=""

	# Disable keyboard input to the x11 server for each keyboard id.
	if [ "$xinput_id" != "" ]; then
		for xid in $xinput_id;
		do
			xinput --disable $xid;
			echo -e "xinput disabled keyboard ID=$xid";
		done
	else
		echo -e "\nUnable to determine xinput ID to disable keyboard input to the x11 server."
		echo -e "This may allow keyboard keypresses to leak back to the desktop per an SDL2 issue."
		echo -e "See the Q3lite FAQ for details.\n"
	fi
fi

# Set Q3lite video resolution mode.  Enter "tvservice -m DMT" and
# "tvservice -m CEA" in a terminal window to list available video modes.
# Uncomment the following line and set your in-game resolution if desired.
#tvservice -e "DMT 85"

# Start Q3lite under the user account.
if [ "$1" = "timedemo" ]; then
	if [  -f  $q3dir/quake3.$arch ]; then
	# Altered this part // Martin
	/usr/local/games/quake3/quake3.armv7l +set com_hunkMegs 192 +set com_zoneMegs 24 +set com_soundMegs 16 +set fs_homepath /home/"$USER"/.q3a +set vm_ui 2 +set vm_cgame 2 +set com_introplayed 1 +set com_protocol 68
	else
		echo -e "Unable to find $q3dir/quake3.$arch binary, exiting...\n"
		exit 2
	fi
else
	if [  -f  $q3dir/quake3.$arch ]; then
	# Altered this part // Martin
		/usr/local/games/quake3/quake3.armv7l +set com_hunkMegs 192 +set com_zoneMegs 24 +set com_soundMegs 16 +set fs_homepath /home/"$USER"/.q3a +set vm_ui 2 +set vm_cgame 2 +set com_introplayed 1 +set com_protocol 68
	else
		echo -e "Unable to find $q3dir/quake3.$arch binary, exiting...\n"
		exit 3
	fi
fi

# If the game resolution is different than the desktop resolution then enable
# flipping the virtual terminal to 1 and back to 7, otherwise go strait to desktop.
if [ "$current_res" != "$(tvservice -s)" ]; then
	flipvt="yes"
fi

# Reset desktop video resolution mode.  Enter "tvservice -m DMT" and
# "tvservice -m CEA" in a terminal window to list available video modes.
# Uncomment the following line and set the desired desktop video resolution mode.
#tvservice -e "DMT 82"

# Return to the desktop if it's running, otherwise restart tty1 console.
if [ "$gui" = "yes" ]; then
	# Re-enable keyboard input to the desktop x11 server if it's running.
	if [ "$xinput_id" != "" ]; then
		for xid in $xinput_id;
		do
			xinput -enable $xid;
			echo -e "xinput enabled keyboard ID=$xid";
		done
	fi
	if [ "$flipvt" = "yes" ]; then
		sudo chvt 1
		sudo chvt 7
	fi
else
	sudo chvt 2
	sudo chvt 1
	sudo systemctl restart getty@tty1.service
fi

exit 0
What i did is i removed that it must be run as root and changed the startline for the game to this:

Code: Select all

/usr/local/games/quake3/quake3.armv7l +set com_hunkMegs 192 +set com_zoneMegs 24 +set com_soundMegs 16 +set fs_homepath /home/"$USER"/.q3a +set vm_ui 2 +set vm_cgame 2 +set com_introplayed 1 +set com_protocol 68
So im guessing that when running it with sudo -u $q3l_user it cant identify my user correctly.

Hope this helps some others that runs non standard raspbian desktop

My appriciation to cdev-tux for putting all this time to get this great game working as it should, and helping me sort my problems out
thank you. :D

Sincerally
Martin

User avatar
cdev-tux
Posts: 63
Joined: Tue Sep 26, 2017 5:12 am

Re: Q3lite - Quake III Arena for the Raspberry Pi

Sat Feb 03, 2018 2:45 am

mjktfw wrote:
Thu Feb 01, 2018 12:46 pm
That's a great piece of work, @cdev-tux. I've experienced some issues compiling ioquake3 on stretch, but not such problem with your version.
I'm wondering, what would you consider the desired way to programatically launch timedemo in a loop from a headless console? The aim is to benchmark my pi. Currently I'm directly running the quake3.armv7l binary with

Code: Select all

cl_timedemoLog
option set, such as:

Code: Select all

sudo -u pi /usr/local/games/quake3/quake3.armv7l ${other_opts} +set timedemo 1 +demo four +set cl_timedemoLog "timedemolog"
while detaching the job and checking in a loop if the log file was generated. If so, I get the log, kill the process, delete the file and repeat in loop. But maybe there is some more elegant solution making advance of server daemon (witch I'm totally unfamiliar with) or pipefile found in

Code: Select all

~/.q3a/baseq3/pipefile
(was unable to google any documentation on this, however).


If you're looking for just the fps numbers you could log them to a single logfile with a timestamp. This script uses a modified version of your launch code line.

Create the file ~/.q3a/baseq3/timedemoloop.sh

Code: Select all

#!/bin/bash
# timedemoloop.sh - loads the config file ~/.q3a/baseq3/timedemoloop.cfg

# Change the number below to set the number of times to loop.
loop=4

logfile="timedemolog"
counter=1
echo "Timedemolog" > $logfile
echo "===========" >> $logfile
while [ $counter -le $loop ]
do
	sudo -u pi /usr/local/games/quake3/quake3.armv7l ${other_opts} +exec timedemoloop.cfg 2>&1 | \
	egrep -e '[0-9]+ frames' | tail -c +17 | awk -v date="$(date +"%Y/%m/%d %r  ")" '{ printf date  $5 " fps\n" }' >> $logfile
#	egrep -e '[0-9]+ frames' | tail -c +17 | awk -v date="$(date +"%Y/%m/%d %r  ")" '{ printf date  $0 "\n" }' >> $logfile
	counter=$(( $counter + 1))
	sleep 3
done

Then create the file ~/.q3a/baseq3/timedemoloop.cfg

Code: Select all

// timedemoloop.cfg - called from ~/.q3a/baseq3/timedemoloop.sh
set timedemo 1
set demoexit "quit"
set rundemo "demo four; set nextdemo vstr demoexit"
vstr rundemo

Running the script should produce output similar to this:

Code: Select all

Timedemolog
===========
2018/02/02 05:59:01 PM  96.4 fps
2018/02/02 05:59:24 PM  96.8 fps
2018/02/02 05:59:47 PM  96.7 fps
2018/02/02 06:00:10 PM  96.8 fps

If you comment out the first line beginning with "egrep" and uncomment the line below it, then you'll get output similar to this:

Code: Select all

Timedemolog
===========
2018/02/02 06:01:42 PM  1260 frames 13.0 seconds 96.8 fps 3.0/10.3/105.0/5.3 ms
2018/02/02 06:02:04 PM  1260 frames 13.0 seconds 96.7 fps 3.0/10.3/106.0/5.2 ms
2018/02/02 06:02:27 PM  1260 frames 13.0 seconds 96.7 fps 3.0/10.3/105.0/5.3 ms
2018/02/02 06:02:50 PM  1260 frames 13.0 seconds 96.9 fps 3.0/10.3/106.0/5.3 ms

There's quite a few different ways to log timedemos, and this isn't by any means optimal. But hopefully it captures the data you're looking for. Keep an eye on your Raspberry Pi, as benchmarking can produce extra heat.

The pipefile is used to communicate with a Q3 server that's running in the background. There's a brief mention of it in the README.md, and you can search online for "Linux named pipe" to get additional information.
cdev-tux
Q3lite source code: https://github.com/cdev-tux/q3lite
Documentation, game FAQ and Compiling/Installation Guide: https://github.com/cdev-tux/q3lite/wiki

mjktfw
Posts: 2
Joined: Thu Feb 01, 2018 12:31 pm

Re: Q3lite - Quake III Arena for the Raspberry Pi

Sat Feb 03, 2018 3:09 pm

Thanks @cdev-tux for pointing to +exec and vstr, this is actually quite elegant solution.
Regarding the overheating - RPi3's CPU with no fan/heatsinks running timedemo alone, reaches ~ 80*C after ~5-6 minutes of continuous testing. Then the throttling kicks in and the temperature stabilizes. With a small fan the temperature will oscillate at ~60*C.

User avatar
cdev-tux
Posts: 63
Joined: Tue Sep 26, 2017 5:12 am

Re: Q3lite - Quake III Arena for the Raspberry Pi

Sat Feb 17, 2018 1:09 am

I just pushed new updates to the repository that put some of the framework in place to get the VC4 OpenGL renderer working in the future. Q3lite now loads OpenGL functions at run time, which will allow the game binary to switch between different renderers (OpenGL or OpenGL ES).

The code that sets the color level in the game was recently fixed. If your timedemo benchmarks slowed down with the previous change, it’s because the color was defaulting to 16-bit even though it was set to 24-bit in the autoexec.cfg file. The previous change fixed the color logic, so you’re now using 24-bit color as a result. To regain that lost performance, set your color level back to 16-bit in your ~/.q3a/baseq3/autoexec.cfg file:

Code: Select all

seta r_colorbits “16”

If you compile a new version of Q3lite, the installer doesn’t overwrite the autoexec.cfg file, so it’s necessary to make the above change to your existing file.

You'll need to compile the "dev" branch to get the latest changes.
cdev-tux
Q3lite source code: https://github.com/cdev-tux/q3lite
Documentation, game FAQ and Compiling/Installation Guide: https://github.com/cdev-tux/q3lite/wiki

User avatar
ztealmax
Posts: 94
Joined: Sat Aug 19, 2017 5:19 pm

Re: Q3lite - Quake III Arena for the Raspberry Pi

Fri Feb 23, 2018 11:39 am

stretch-lite *With XFCE4 desktop / followed guide on raspbian forum this time.

Sorry to bring this one up again cdev-tux>
Ok to be honest im getting frustrated i cant figure out whats wrong, still cant get keyboard to work in q3lite
whats not working is still "Change playername" it still just inputs [DEL] button and arrows and Enter i can delete username and it saves it then as ofc a blankname, cant enter anything in console either

dont think the problem is xinput as some keys work, perhaps somehow only q3lite only accepts input from arrow-keys, delete and enter key. however when gaming WSAD works
xinput output

Code: Select all

xinput_id=6 8 1 9 7

xinput disabled keyboard ID=6
xinput disabled keyboard ID=8
xinput disabled keyboard ID=1
xinput disabled keyboard ID=9
xinput disabled keyboard ID=7
tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    tty]    xinput enabled keyboard ID=6
xinput enabled keyboard ID=8
xinput enabled keyboard ID=1
xinput enabled keyboard ID=9
xinput enabled keyboard ID=7
And this is output when running sudo q3lite seems to work as it should, it finds homepath and username

Code: Select all

logged in user pi
q3l_homepath /home/pi/.q3a
current_res state 0x120006 [DVI DMT (58) RGB full 16:10], 1680x1050 @ 60.00Hz, progressive
next i thought ok maybe user isnt a member of all groups needed, checked it and user is member of all groups needed!
also tried to enter keyboard in xinput="5 7 10" (my usb keyboard) stil same result.

Perhaps some needed system file isnt installed, but cant figure out what that might be.

output for sudo q3lite

Code: Select all

$ sudo q3lite

xinput_id=6 8 1 9 7

xinput disabled keyboard ID=6
xinput disabled keyboard ID=8
unable to find device 1
xinput disabled keyboard ID=1
xinput disabled keyboard ID=9
xinput disabled keyboard ID=7
Q3lite v1.0.2+42748141 linux-armv7l Feb 23 2018
----- FS_Startup -----
We are looking in the current search path:
/home/pi/.q3a/baseq3
/home/pi/.q3a/baseq3/pak8.pk3 (9 files)
/home/pi/.q3a/baseq3/pak7.pk3 (4 files)
/home/pi/.q3a/baseq3/pak6.pk3 (64 files)
/home/pi/.q3a/baseq3/pak5.pk3 (7 files)
/home/pi/.q3a/baseq3/pak4.pk3 (272 files)
/home/pi/.q3a/baseq3/pak3.pk3 (4 files)
/home/pi/.q3a/baseq3/pak2.pk3 (148 files)
/home/pi/.q3a/baseq3/pak1.pk3 (26 files)
/home/pi/.q3a/baseq3/pak0.pk3 (3539 files)
/usr/local/games/quake3/baseq3
/usr/local/games/quake3/baseq3/pak8.pk3 (9 files)
/usr/local/games/quake3/baseq3/pak7.pk3 (4 files)
/usr/local/games/quake3/baseq3/pak6.pk3 (64 files)
/usr/local/games/quake3/baseq3/pak5.pk3 (7 files)
/usr/local/games/quake3/baseq3/pak4.pk3 (272 files)
/usr/local/games/quake3/baseq3/pak3.pk3 (4 files)
/usr/local/games/quake3/baseq3/pak2.pk3 (148 files)
/usr/local/games/quake3/baseq3/pak1.pk3 (26 files)
    
----------------------
4607 files in pk3 files
execing default.cfg
execing q3config.cfg
couldn't exec autoexec.cfg
Hunk_Clear: reset the hunk ok
----- Client Initialization -----
Couldn't read q3history.
----- Initializing Renderer ----
-------------------------------
QKEY found.
----- Client Initialization Complete -----
----- R_Init -----
SDL using driver "RPI"
Initializing OpenGL display
Display aspect: 1.600
...setting mode 6: 1024 768
Using 16 color bits, 16 depth, 0 stencil display.
Available modes: '1680x1050'
GL_RENDERER: VideoCore IV HW
Initializing OpenGL extensions
...GL_EXT_texture_compression_s3tc not found
...GL_S3_s3tc not found
...using GL_EXT_texture_env_add
...using GL_ARB_multitexture (4 texture units)
...GL_EXT_compiled_vertex_array not found
...GL_EXT_texture_filter_anisotropic not found
Initializing Shaders
    
GL_VENDOR: Broadcom
GL_RENDERER: VideoCore IV HW
GL_VERSION: OpenGL ES-CM 1.1
GL_EXTENSIONS: GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_OES_texture_npot GL_OES_EGL_image GL_OES_EGL_image_external GL_EXT_discard_framebuffer GL_OES_query_matrix GL_OES_framebuffer_object GL_OES_rgb8_rgba8 GL_OES_depth24 GL_OES_depth32 GL_OES_stencil8 GL_OES_draw_texture GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_APPLE_rgb_422 GL_OES_matrix_palette GL_EXT_debug_marker 
GL_MAX_TEXTURE_SIZE: 2048
GL_MAX_TEXTURE_UNITS_ARB: 4
    
PIXELFORMAT: color(16-bits) Z(16-bit) stencil(0-bits)
MODE: 6, 1024 x 768 fullscreen hz:N/A
GAMMA: software w/ 0 overbright bits
rendering primitives: single glDrawElements
texturemode: GL_LINEAR_MIPMAP_NEAREST
picmip: 1
texture bits: 16
multitexture: enabled
compiled vertex arrays: disabled
texenv add: enabled
compressed textures: disabled
----- finished R_Init -----
------ Initializing Sound ------
SDL_Init( SDL_INIT_AUDIO )... OK
SDL audio driver is "alsa".
SDL_AudioSpec:
  Format:   AUDIO_S16LSB
  Freq:     22050
  Samples:  512
  Channels: 2
Starting SDL audio callback...
SDL audio initialized.
----- Sound Info -----
    1 stereo
16384 samples
   16 samplebits
    1 submission_chunk
22050 speed
0x35e17d8 dma buffer
No background file.
----------------------
Sound initialization successful.
--------------------------------
Sound memory manager started
Loading vm file vm/ui.qvm...
File "vm/ui.qvm" found in "/home/pi/.q3a/baseq3/pak8.pk3"
ui loaded in 1368608 bytes on the hunk
35 arenas parsed
32 bots parsed
--- Common Initialization Complete ---
IP: 127.0.0.1
IP: 10.0.1.241
IP6: ::1
IP6: fe80::cb35:221a:1759:b78d%eth0
Opening IP6 socket: [::]:27960
Opening IP socket: 0.0.0.0:27960
----- Client Shutdown (Client quit) -----
RE_Shutdown( 1 )
Hunk_Clear: reset the hunk ok
Closing SDL audio device...
SDL audio device shut down.
-----------------------
xinput enabled keyboard ID=6
xinput enabled keyboard ID=8
unable to find device 1
xinput enabled keyboard ID=1
xinput enabled keyboard ID=9
xinput enabled keyboard ID=7
hmm perhaps its an udev rule or something?

User avatar
cdev-tux
Posts: 63
Joined: Tue Sep 26, 2017 5:12 am

Re: Q3lite - Quake III Arena for the Raspberry Pi

Fri Feb 23, 2018 8:42 pm

ztealmax wrote:
Fri Feb 23, 2018 11:39 am
stretch-lite *With XFCE4 desktop / followed guide on raspbian forum this time.

I don’t have any experience working in that environment, but give this a try. Edit /usr/local/bin/q3lite and add the following to the line that begins with “settings=”:

Code: Select all

+set sv_pure 0

Let me know if that fixes your issue.

Make sure that SDL2-2.0.4 libraries are located in /usr/local/lib/q3lite.

The duplicate .pk3 files in /home/pi/.q3a/baseq3 aren’t necessary and can be deleted.

Also, your autoexec.cfg file doesn’t appear to be loading, so you may want to check the file permissions.
cdev-tux
Q3lite source code: https://github.com/cdev-tux/q3lite
Documentation, game FAQ and Compiling/Installation Guide: https://github.com/cdev-tux/q3lite/wiki

User avatar
ztealmax
Posts: 94
Joined: Sat Aug 19, 2017 5:19 pm

Re: Q3lite - Quake III Arena for the Raspberry Pi

Fri Feb 23, 2018 10:06 pm

cdev-tux wrote:
Fri Feb 23, 2018 8:42 pm
ztealmax wrote:
Fri Feb 23, 2018 11:39 am
stretch-lite *With XFCE4 desktop / followed guide on raspbian forum this time.

I don’t have any experience working in that environment, but give this a try. Edit /usr/local/bin/q3lite and add the following to the line that begins with “settings=”:

Code: Select all

+set sv_pure 0

Let me know if that fixes your issue.

Make sure that SDL2-2.0.4 libraries are located in /usr/local/lib/q3lite.

The duplicate .pk3 files in /home/pi/.q3a/baseq3 aren’t necessary and can be deleted.

Also, your autoexec.cfg file doesn’t appear to be loading, so you may want to check the file permissions.
Didnt have any effect im affraid, stil only keys accepted in menu is arrows, delete, escape

User avatar
cdev-tux
Posts: 63
Joined: Tue Sep 26, 2017 5:12 am

Re: Q3lite - Quake III Arena for the Raspberry Pi

Fri Feb 23, 2018 10:57 pm

The text editing issue is usually a problem with versions of SDL2 newer than 2.0.4. The Q3lite binary first looks for SDL libraries in /usr/local/lib/q3lite. If it doesn't find them there then it looks in the system directory /usr/local/lib. If it finds SDL libraries there that are newer than 2.0.4, it will use them and that can be an issue. With newer versions of SDL2, things seem to work fine until either one of the Alt keys are pressed. It's a problem with SDL2 on the Pi, and is something that will have to be fixed upstream.

Other things to try:

Have a look at the readme file on the libsdl.org site:
https://hg.libsdl.org/SDL/file/cd67e676 ... berrypi.md

Try compiling and installing SDL2-2.0.4 per the instructions in the Compiling and Installation Guide. Then copy the 2.0.4 libraries from /usr/local/lib/ to /usr/local/lib/q3lite/.

Other than that, I'm afraid I'm out of ideas.
cdev-tux
Q3lite source code: https://github.com/cdev-tux/q3lite
Documentation, game FAQ and Compiling/Installation Guide: https://github.com/cdev-tux/q3lite/wiki

User avatar
ztealmax
Posts: 94
Joined: Sat Aug 19, 2017 5:19 pm

Re: Q3lite - Quake III Arena for the Raspberry Pi

Sat Feb 24, 2018 8:36 pm

Thank you, that didnt work either, well i just purge desktop from raspbian and add my own fling to it, iknow it will work then :) thanx for the support

User avatar
ztealmax
Posts: 94
Joined: Sat Aug 19, 2017 5:19 pm

Re: Q3lite - Quake III Arena for the Raspberry Pi

Sat Mar 10, 2018 1:09 pm

Hi again, what files do i need to alter to be able to have q3lite in menu of pure LXDE desktop?

what i found so far is:
src/q3lite/Makefile.q3lite
*changed every line name lxde-pi-applications.menu to lxde-applications.menu

and this:
src/q3lite/misc/q3lite/pi/lxde-pi-applications.menu
*Renamed it to lxde-applications.menu
and within that file also change it to:/etc/xdg/menus/lxde-applications.menu<

amything else i have to change to have to correct menu links installed in pure LXDE?

User avatar
cdev-tux
Posts: 63
Joined: Tue Sep 26, 2017 5:12 am

Re: Q3lite - Quake III Arena for the Raspberry Pi

Mon Mar 12, 2018 9:37 pm

ztealmax wrote:
Sat Mar 10, 2018 1:09 pm
Hi again, what files do i need to alter to be able to have q3lite in menu of pure LXDE desktop?

what i found so far is:
src/q3lite/Makefile.q3lite
*changed every line name lxde-pi-applications.menu to lxde-applications.menu

and this:
src/q3lite/misc/q3lite/pi/lxde-pi-applications.menu
*Renamed it to lxde-applications.menu
and within that file also change it to:/etc/xdg/menus/lxde-applications.menu<

amything else i have to change to have to correct menu links installed in pure LXDE?

I haven’t tried to run it on a full LXDE desktop, but it sounds like you’ve changed the necessary files. You’ll have to modify Makefile.q3lite if you want the installer to copy the renamed menu file.
cdev-tux
Q3lite source code: https://github.com/cdev-tux/q3lite
Documentation, game FAQ and Compiling/Installation Guide: https://github.com/cdev-tux/q3lite/wiki

User avatar
cdev-tux
Posts: 63
Joined: Tue Sep 26, 2017 5:12 am

Re: Q3lite - Quake III Arena for the Raspberry Pi

Thu Mar 22, 2018 6:52 pm

I added support to Q3lite for the Raspberry Pi 3 B+. The new processor revision is now detected at compile time. Please let me know if you have any issues. Enjoy!

https://github.com/cdev-tux/q3lite
cdev-tux
Q3lite source code: https://github.com/cdev-tux/q3lite
Documentation, game FAQ and Compiling/Installation Guide: https://github.com/cdev-tux/q3lite/wiki

User avatar
bleep42
Posts: 259
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex

Re: Q3lite - Quake III Arena for the Raspberry Pi

Mon Apr 02, 2018 5:35 pm

Hi,
I've just tried your latest compile/install procedure as above. Everything appears to compile and install ok, however when I try to run I get an error "...WARNING: could not set the given mode (-2)" I'm using a Pi3B+ Raspbian Stretch and I used the dev branch.
crash log below.

Code: Select all

tty console mode disabled
Q3lite v1.0.2+81bdbc4c linux-armv7l Apr  2 2018
----- FS_Startup -----
We are looking in the current search path:
/home/pi/.q3a/baseq3
/usr/local/games/quake3/baseq3
/usr/local/games/quake3/baseq3/pak8.pk3 (9 files)
/usr/local/games/quake3/baseq3/pak7.pk3 (4 files)
/usr/local/games/quake3/baseq3/pak6.pk3 (64 files)
/usr/local/games/quake3/baseq3/pak5.pk3 (7 files)
/usr/local/games/quake3/baseq3/pak4.pk3 (272 files)
/usr/local/games/quake3/baseq3/pak3.pk3 (4 files)
/usr/local/games/quake3/baseq3/pak2.pk3 (148 files)
/usr/local/games/quake3/baseq3/pak1.pk3 (26 files)
/usr/local/games/quake3/baseq3/pak0.pk3 (3539 files)

----------------------
4073 files in pk3 files
execing default.cfg
couldn't exec q3config.cfg
execing autoexec.cfg
Hunk_Clear: reset the hunk ok
----- Client Initialization -----
Couldn't read q3history.
----- Initializing Renderer ----
-------------------------------
QKEY found.
Compiled with SDL v2.0.4
Linking against SDL v2.0.4
----- Client Initialization Complete -----
----- R_Init -----
SDL using driver "RPI"
Initializing OpenGL display
Display aspect: 1.778
...setting mode -2: 1920 1080
Couldn't get a visual
...WARNING: could not set the given mode (-2)
Initializing OpenGL display
Display aspect: 1.778
...setting mode -2: 1920 1080
Couldn't get a visual
...WARNING: could not set the given mode (-2)
----- Client Shutdown (Client fatal crashed: GLimp_Init() - could not load OpenGL subsystem) -----
RE_Shutdown( 1 )
Hunk_Clear: reset the hunk ok
-----------------------
GLimp_Init() - could not load OpenGL subsystem
Any help greatly appreciated.
Regards,
Kevin.

User avatar
cdev-tux
Posts: 63
Joined: Tue Sep 26, 2017 5:12 am

Re: Q3lite - Quake III Arena for the Raspberry Pi

Mon Apr 02, 2018 10:55 pm

bleep42 wrote:
Mon Apr 02, 2018 5:35 pm
Hi,
I've just tried your latest compile/install procedure as above. Everything appears to compile and install ok, however when I try to run I get an error "...WARNING: could not set the given mode (-2)" I'm using a Pi3B+ Raspbian Stretch and I used the dev branch.
crash log below.

Hi Kevin,
Here are a few suggestions to try. It appears that SDL is having trouble using your desktop resolution of 1920 x 1080. Make sure that you’re using the legacy Broadcom driver (OpenGL ES) as it’s the only supported driver at the moment. I’m waiting for a bug fix upstream in the SDL code before I can add support for the VC4 OpenGL driver.

If you’re already using the legacy driver then I would check to see that you have all of the prerequisite packages installed before compiling. Please see the Compiling and Installation Guide for instructions on installing those packages. If you have all of the packages installed then have a look at the troubleshooting section of the guide for additional things to try.

I just updated a fresh install of the latest Raspbian Stretch to the new kernel, and compiled Q3lite on a Pi 3 B+ and it’s running here (timedemo four runs at just over 100 fps @ 1080P). Please let me know if the above suggestions don’t fix the issue and we can try something else.

Thanks.
cdev-tux
Q3lite source code: https://github.com/cdev-tux/q3lite
Documentation, game FAQ and Compiling/Installation Guide: https://github.com/cdev-tux/q3lite/wiki

User avatar
bleep42
Posts: 259
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex

Re: Q3lite - Quake III Arena for the Raspberry Pi

Wed Apr 04, 2018 3:37 pm

Hi,
Thanks for your reply, I tried doing all of that, but still exactly the same. So I've reinstalled Raspbian from scratch and that made it work. Thanks.
Now is there a way of getting the *. pk3 files from the original Openarena game that you used to be able to download from the RaspberryPi shop to work with this? I have them saved away.
Thanks, Kevin.

User avatar
cdev-tux
Posts: 63
Joined: Tue Sep 26, 2017 5:12 am

Re: Q3lite - Quake III Arena for the Raspberry Pi

Wed Apr 04, 2018 11:22 pm

bleep42 wrote:
Wed Apr 04, 2018 3:37 pm
Hi,
Thanks for your reply, I tried doing all of that, but still exactly the same. So I've reinstalled Raspbian from scratch and that made it work. Thanks.
Now is there a way of getting the *. pk3 files from the original Openarena game that you used to be able to download from the RaspberryPi shop to work with this? I have them saved away.
Thanks, Kevin.

Hi Kevin,

I’m glad that you were able to get things running. :)

The pak files installed by Q3lite (after the end user agrees to the EULA) are from the freely available Quake III Arena v1.32b point release update. These updated pak files are required by ioquake3, which Q3lite is based upon. The ioquake3 project has the same updated pak files available for download on their website, after the user agrees to the id Software EULA.

http://ioquake3.org/extras/patch-data/

These are the pak1.pk3 through pak8.pk3 files. The pak0.pk3 file contains original game assets and can’t be made available lawfully, accept by authorized resellers.

I hope that offers a little bit of background on the updated pak files as I understand them. I’m afraid I can’t offer any legal advice concerning making the pak files available in the RaspberryPi shop since I’m not an attorney.

If you’re looking to host a copy of the point release file and wanted to add the URL to your local Q3lite source code, you can add the URL to the Q3lite installer here:

https://github.com/cdev-tux/q3lite/blob ... ypi.sh#L83

The name of your hosted point release file needs to be “linuxq3apoint-1.32b-3.x86.run”. I hope I’m understanding your question correctly and offering a suitable solution.
cdev-tux
Q3lite source code: https://github.com/cdev-tux/q3lite
Documentation, game FAQ and Compiling/Installation Guide: https://github.com/cdev-tux/q3lite/wiki

jpwhit
Posts: 1
Joined: Fri Apr 06, 2018 1:42 am

Re: Q3lite - Quake III Arena for the Raspberry Pi

Fri Apr 06, 2018 1:55 am

I compiled q3lite on a Pi 3 B+ and was getting the same error as Kevin. "...WARNING: could not set the given mode (-2)"

So I started from scratch on a new SD card, but during this process realized I had missed the "sudo rpi-update" on my original attempt. So I went back to the original SD card and updated the firmware with rpi-update and that fixed the issue.

Thought I would mention this in case other run into the same issue. It's easy to overlook the firmware update step....

Thanks for the nice port of Quake III.

John

User avatar
bleep42
Posts: 259
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex

Re: Q3lite - Quake III Arena for the Raspberry Pi

Fri Apr 06, 2018 1:21 pm

Hi John,
Yes I had done the firmware update as well, I just copied and pasted every command in order, till I finished. :-)
I strongly suspect it was caused by the fact that my Stretch was an upgrade from Jessie, not a straight Stretch installation.
Regards, Kevin.

User avatar
cdev-tux
Posts: 63
Joined: Tue Sep 26, 2017 5:12 am

Re: Q3lite - Quake III Arena for the Raspberry Pi

Fri Apr 06, 2018 8:28 pm

jpwhit wrote:
Fri Apr 06, 2018 1:55 am
I compiled q3lite on a Pi 3 B+ and was getting the same error as Kevin. "...WARNING: could not set the given mode (-2)"

So I started from scratch on a new SD card, but during this process realized I had missed the "sudo rpi-update" on my original attempt. So I went back to the original SD card and updated the firmware with rpi-update and that fixed the issue.

Thought I would mention this in case other run into the same issue. It's easy to overlook the firmware update step....

Thanks for the nice port of Quake III.

John

Hi John,

Thank you for reporting this. I updated the Compiling and Installation Guide to clarify the firmware install step, and added a note in the Troubleshooting section explaining the issue.
cdev-tux
Q3lite source code: https://github.com/cdev-tux/q3lite
Documentation, game FAQ and Compiling/Installation Guide: https://github.com/cdev-tux/q3lite/wiki

User avatar
Raspberry-3.14
Posts: 13
Joined: Sun Jan 07, 2018 9:54 pm

Re: Q3lite - Quake III Arena for the Raspberry Pi

Mon Apr 16, 2018 8:37 pm

Q3lite compiled on my Pi 3 and works fantastic. Bravo.
Raspberry-3.14

User avatar
ztealmax
Posts: 94
Joined: Sat Aug 19, 2017 5:19 pm

Q3lite - Using custom desktop "Keyboard fails need help"

Sat May 19, 2018 11:01 pm

HI again :)

Ok im struggling not to be able this to work when using custom desktop
tried everything from LXDE, XFCE, MATE and plain Openbox.

So explenation of my problem first:

When downloading "out-of-the-box" Raspbian stretch full with desktop
and compiling Q3lite everything works as it should.

When downloading Raspbian stretch lite and installing lxde whit all bells and whistles including mesa, xinput etc... and compiling Q3lite and it compiles perfectly without any problem, when starting Q3lite the keyboard
as i have stated in previous posts fails but not completely let me explain:
Arrow keys, ESC, Enter, DEL works so for example when deleting
Playername and trying to put in my own nothing happens what so ever
first thought this might be a XINPUT problem however disabling it in Q3lite
same thing happens, so that leads me to think that there must be some mystery file missing a dependence lib/prog something ive been looking tru all
installed packages on Raspbian stretch full but just cant seem to figure it out
whats missing in my installation.

All depends listed on q3lite are installed
also tried to compile SDL 2.04 and verified version also no problem with
that.

(my installation is based on guide found here: viewtopic.php?t=133691 )

Please Is anyone else using custom desktop having these issues, can someone please try it out on their custom desktop?

Im going nuts here and not sure what to do next

/SIncerally
Martin

User avatar
cdev-tux
Posts: 63
Joined: Tue Sep 26, 2017 5:12 am

Re: Q3lite - Using custom desktop "Keyboard fails need help"

Sun May 20, 2018 12:49 am

ztealmax wrote:
Sat May 19, 2018 11:01 pm
HI again :)

Ok im struggling not to be able this to work when using custom desktop
tried everything from LXDE, XFCE, MATE and plain Openbox.

Hi Martin,

There appears to be an issue with SDL on Linux that involves SDL_TEXTINPUT. I submitted a bug report months ago but it hasn’t been addressed yet. Although the issue is not identical to yours, it appears to be related. I spent a rather large amount of time troubleshooting the relevant SDL code, but I simply don’t have the experience with their code to solve it. This problem also affects other platforms. If I had to take a wild guess, I would say that there appears to be a conflict with compiling newer versions of SDL with --disable-video-x11 and having x11 running in the background. Until the issue is looked at by one of the knowledgeable SDL programmers, I’m afraid there’s not much I can do.

https://discourse.libsdl.org/t/no-sdl-t ... inux/23904
cdev-tux
Q3lite source code: https://github.com/cdev-tux/q3lite
Documentation, game FAQ and Compiling/Installation Guide: https://github.com/cdev-tux/q3lite/wiki

User avatar
ztealmax
Posts: 94
Joined: Sat Aug 19, 2017 5:19 pm

Re: Q3lite - Using custom desktop "Keyboard fails need help"

Sun May 20, 2018 12:56 am

cdev-tux wrote:
Sun May 20, 2018 12:49 am
ztealmax wrote:
Sat May 19, 2018 11:01 pm
HI again :)

Ok im struggling not to be able this to work when using custom desktop
tried everything from LXDE, XFCE, MATE and plain Openbox.

Hi Martin,

There appears to be an issue with SDL on Linux that involves SDL_TEXTINPUT. I submitted a bug report months ago but it hasn’t been addressed yet. Although the issue is not identical to yours, it appears to be related. I spent a rather large amount of time troubleshooting the relevant SDL code, but I simply don’t have the experience with their code to solve it. This problem also affects other platforms. If I had to take a wild guess, I would say that there appears to be a conflict with compiling newer versions of SDL with --disable-video-x11 and having x11 running in the background. Until the issue is looked at by one of the knowledgeable SDL programmers, I’m afraid there’s not much I can do.

https://discourse.libsdl.org/t/no-sdl-t ... inux/23904
But it works raspbian full install, thats weird. *Shouldnt it be not working there also then? im really sure it isnt that problem here to be honest, im guessing a piece of fix is mixing thats on the full raspbian
and im not pressing ALT or CTRL key its just some keys thats disabled at start. im hoping someone else but me have same issue so we together can figure out if perhaps *Raspberry team has implemented some fixes, configs, patches thats not clear to me yet *It never fails on full raspbian stretch ( To clearify i can play the game without problems just not type anything in console or alter anything in menus )

Thanx for the answer m8, keep up to great work much apriciated

Return to “Gaming”