Doom running in software mode and CPU getting hot

I thought I would try and get DOOM running on FreeBSD 15.0-RELEASE so I did pkg install doomlegacy.

A message I saw when installing was:
Code:
=====
Message from sdl-1.2.15_17,2:

--
Your SDL library has been built with libvgl support, which means that you
 can run almost any SDL application straight on your console (VESA 2.0
 compatible videocard is required).

 To do this you have to load the vesa kernel module or enable it in your
 kernel, and set environment variable "SDL_VIDEODRIVER=vgl".
=====

I am using the 'amdgpu' video driver, so can I still get this working so that the game runs with hardware rendering rather than using the CPU to render in software mode?
 
I added 'vesa' to the list of kernel modules to load in /etc/rc.conf but it doesn't seem to make any difference - DOOM (/usr/local/bin/doomlegacy) is still doing software rendering.

Any ideas how to get it to do hardware rendering?

Code:
root@freebsd:/etc # cat rc.conf | grep vesa
kld_list="amdgpu vesa linux linux64"
root@freebsd:/etc #
 
I tried removing the 'doomlegacy' package and building the port at /usr/ports/games/doomlegacy but looking at the high CPU temp after playing it for a short time, it looks like it is still not using hardware rendering.

To build I ran make install within that port directory.
I also tried make config but it only offers two options: (1) DOCS (build and/or install documentation) and (2) LIBZIP (Zipped WAD file support using libzip). Both options are selected by default (X) in the selection field.

I didn't see any installed DOCS but maybe I need to hunt around a bit for them if they have been installed somewhere.

The VESA driver seems installed:
Code:
root@freebsd:/usr/ports/games/doomlegacy # kldstat | grep vesa
25    1 0xffffffff841f9000     43f0 vesa.ko

I also set the environment variable specified within the notice in the first post:
Code:
$ SDL_VIDEODRIVER=vgl
$ export SDL_VIDEODRIVER
$ /usr/local/bin/doomlegacy
 Feb 13 2026             Doom Legacy 1.48.14 (rev 1660)                15:06:17 
Z_Init: Init zone memory allocation daemon. 
System memory 27580 MiB, free 22161 MiB
8 MiB requested for Z_Init.
Initializing SDL...
 Couldn't initialize SDL: No available video device
Shutting down joysticks.
Joystick subsystem closed cleanly.
$

It says it couldn't initialize SDL: No available video device... :-/
 
I had a hunt around for the doomlegacy docs and found them so I will have a read through to see how I may be able to get hardware rendering working:

Code:
root@freebsd:/usr/ports/games/doomlegacy # find / -name doomlegacy*
/usr/ports/games/doomlegacy
...
/usr/local/bin/doomlegacy
...
/usr/local/share/doc/doomlegacy


root@freebsd:/usr/ports/games/doomlegacy # cd /usr/local/share/doc/doomlegacy
root@freebsd:/usr/local/share/doc/doomlegacy # ls -la
total 512
drwxr-xr-x    5 root wheel     23 Feb 13 15:06 .
drwxr-xr-x  164 root wheel    164 Feb 13 15:06 ..
-rw-r--r--    1 root wheel   3499 Dec 28  2023 3dfloors.html
-rw-r--r--    1 root wheel  25580 Dec 28  2023 INSTALL.html
-rw-r--r--    1 root wheel  18092 Jun  9  2014 LICENSE.txt
-rw-r--r--    1 root wheel  13392 Sep 20  2016 Make_WIN32.txt
-rw-r--r--    1 root wheel  14048 Dec 18  2022 README_Compiling.txt
-rw-r--r--    1 root wheel  99827 Dec 28  2023 boomref.html
-rw-r--r--    1 root wheel  96577 Dec 28  2023 console.html
-rw-r--r--    1 root wheel  43098 Jun  9  2014 doom_linedefs.ods
-rw-r--r--    1 root wheel  48567 Dec 28  2023 editing.html
-rw-r--r--    1 root wheel  46867 Dec 28  2023 faq.html
-rw-r--r--    1 root wheel  34257 Dec 28  2023 fsbasic.html
-rw-r--r--    1 root wheel  75833 Dec 28  2023 fsfuncs.html
drwxr-xr-x    3 root wheel     11 Feb 13 15:06 images
-rw-r--r--    1 root wheel   3503 Dec 28  2023 index.html
-rw-r--r--    1 root wheel   2845 Jun  9  2014 legacy.css
-rw-r--r--    1 root wheel  72783 Dec 28  2023 legacy.html
drwxr-xr-x    2 root wheel      6 Feb 13 15:06 res
-rw-r--r--    1 root wheel  17714 Dec 28  2023 source.html
drwxr-xr-x    2 root wheel      7 Feb 13 15:06 technical
-rw-r--r--    1 root wheel   8421 Dec 28  2023 tutorial.html
-rw-r--r--    1 root wheel 180989 Dec 28  2023 whatsnew.html
 
vgl(3) is no longer working since FreeBSD moved to vt (from syscons). I am working on an alternative (glass) but frankly it doesn't sound like you want this anyway, these are for running Doom directly in the console without X11.

Doom is mostly software raycasting rendered rather than OpenGL/Vulkan. However there should be acceleration for the 320x200 texture to be stretched to the full screen size. It looks like this is a separate Chocolate Doom branch though.

Your CPU shouldn't be getting hot just rendering Doom though. Do you have OpenGL in place? use glxinfo and look for AMD in the vendor string.
 
vgl(3) is no longer working since FreeBSD moved to vt (from syscons). I am working on an alternative (glass) but frankly it doesn't sound like you want this anyway, these are for running Doom directly in the console without X11.
Good to know, thanks.

Doom is mostly software raycasting rendered rather than OpenGL/Vulkan. However there should be acceleration for the 320x200 texture to be stretched to the full screen size. It looks like this is a separate Chocolate Doom branch though.

Your CPU shouldn't be getting hot just rendering Doom though. Do you have OpenGL in place? use glxinfo and look for AMD in the vendor string.
Yes, it's strange - this fairly powerful passively cooled 12 core AMD Ryzen 9 7900 CPU with iGPU runs hotter than my other passively cooled Intel N100 machine with iGPU.
The Ryzen machine runs Doom at around 70C+ whereas the much weaker 4-core Intel N100 machine runs at around 40C after playing for a few minutes.

The Ryzen 9 7900 machine is normally around 48C at idle.
The Intel N100 machine is normally around 37C+ at idle.
It seems the temp of the N100 doesn't increase much when playing Doom whereas it does increase considerably on the Ryzen system.

On the Intel N100 system:
The 'drawing options/drawmode options' is set to 'software 8bit'.
The 'video modes' screen reports 'current default: 320x200 (8 bits)' - however '720x400' is highlighted in white within the mode list and the mode list doesn't have an entry for 320x200 which seems odd.

On the Ryzen 9 7900 system:
The 'drawing options/drawmode options' is set to 'software 8bit'.
The 'video modes' screen reports 'current default: 720x400 (8 bits)'.
This is approx 4 times the amount to render compared to the 320x200 the N100 system is using.
There is no option to set the 320x200 resolution that the N100 is using.

Output from glxinfo | grep AMD:
Code:
$ glxinfo | grep AMD
No such file or directory
    Vendor: AMD (0x1002)
    Device: AMD Radeon Graphics (radeonsi, raphael_mendocino, LLVM 19.1.7, DRM 3.54, 15.0-RELEASE) (0x164e)
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon Graphics (radeonsi, raphael_mendocino, LLVM 19.1.7, DRM 3.54, 15.0-RELEASE)
    GL_AMD_conservative_depth, GL_AMD_depth_clamp_separate,
    GL_AMD_draw_buffers_blend, GL_AMD_framebuffer_multisample_advanced,
    GL_AMD_gpu_shader_int64, GL_AMD_multi_draw_indirect,
    GL_AMD_performance_monitor, GL_AMD_pinned_memory,
    GL_AMD_query_buffer_object, GL_AMD_seamless_cubemap_per_texture,
    GL_AMD_shader_stencil_export, GL_AMD_shader_trinary_minmax,
    GL_AMD_texture_texture4, GL_AMD_vertex_shader_layer,
    GL_AMD_vertex_shader_viewport_index, GL_ANGLE_texture_compression_dxt3,
    GL_AMD_conservative_depth, GL_AMD_depth_clamp_separate,
    GL_AMD_draw_buffers_blend, GL_AMD_framebuffer_multisample_advanced,
    GL_AMD_multi_draw_indirect, GL_AMD_performance_monitor,
    GL_AMD_pinned_memory, GL_AMD_query_buffer_object,
    GL_AMD_seamless_cubemap_per_texture, GL_AMD_shader_stencil_export,
    GL_AMD_shader_trinary_minmax, GL_AMD_texture_texture4,
    GL_AMD_vertex_shader_layer, GL_AMD_vertex_shader_viewport_index,
    GL_AMD_framebuffer_multisample_advanced, GL_AMD_performance_monitor,

Output from glxinfo | grep OpenGL:
Code:
$ glxinfo | grep OpenGL
No such file or directory
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon Graphics (radeonsi, raphael_mendocino, LLVM 19.1.7, DRM 3.54, 15.0-RELEASE)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.1.7
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.1.7
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.1.7
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

I also changed the video drawing mode to OpenGL and still the Ryzen CPU is running Doom at 70C+.
 
Back
Top