Graphics Acceleration on an old version of FreeBSD reddit / freebsd ---------------------------------------------------------------------- cc17926 · 2022-06-16 23:51 Hello all, feel free to let me know if this is not the correct place to ask this, but I am looking to virtualize an older FreeBSD system (4.X) which was used for broadcast graphics play-out. I have successfully booted the system in VMWare but as the system requires X11 and graphics acceleration, I have run into several issues. Most notably, the VMWare SVGA driver included with XFree86 does not seem to enable acceleration which causes the system software to choke. I have tried compiling several drivers and adding drivers to no avail. Curious if anyone has any ideas or experience with this sort of virtualization feat. Thanks in advance! ---------------------------------------------------------------------- FreeBSDfan · 2022-06-17 00:38 For an old system, I can recommended PCem. PCem supports 4.x-era hardware very well. For a later 4.x VESA may work also ---------------------------------------------------------------------- implicitpharmakoi · 2022-06-17 02:27 PCIe passthrough of an older ATI card? ---------------------------------------------------------------------- 12Darius21 · 2022-06-17 04:09 When you say "does not seem to enable acceleration" what do you mean? Can you post the X log file somewhere? Another option (if the system doesn't require any custom KLDs) would be to install a modern FreeBSD and built a custom kernel with the COMPAT_FREEBSD4 option. That will let you run a modern X server (with presumably working virtualised graphics) but still run the old binaries. ---------------------------------------------------------------------- aedinius · 2022-06-17 12:10 PCIe on FreeBSD4.x? ---------------------------------------------------------------------- THEtechknight · 2022-06-17 13:40 Doesn't work with the environment trying to be virtualized. the software runs on XFree86 and its compiled against it, and will not run on newer versions of XOrg. Also, there is a kernel driver where AGP and its Aperture are needed. so no PCIE will work either. new versions of Xorg tries to run the program but it cant load everything and crashes, its looking for an API/Dependency in the old XFree86 that isnt in Xorg is my belief. Anyways, now the software does run and display its graphics/does its thing with the VMWARE stuff in backwards compatibility mode. But it wont enable Acceleration for OpenGL so it runs very slowly and crashes. The original system was intended for AGP/ATI 9000 series. ---------------------------------------------------------------------- THEtechknight · 2022-06-17 13:41 Tried it, it doesn't work with OpenGL Acceleration. also PCEm doesnt emulate anything newer than PIII which is an issue as well. The kernel we are using and trying to virtualize to preserve the system uses the ATI drivers, and AGP cards only. ---------------------------------------------------------------------- FreeBSDfan · 2022-06-17 13:43 I don't think then you can do 3D acceleration on a VM with 4.x. You can't even do it with 13.x. I hate to say it but you're better off keeping an old PC or porting your app to 13.x (or modern Linux/Windows). ---------------------------------------------------------------------- THEtechknight · 2022-06-17 13:58 It's not that simple. its a 100% proprietary system that we dont have the source code for, we are just simply preserving the software/system and its function as the hardware is failing and dropping like flies. Also finding the specific compatible video graphics cards from ATI have been a chore to keep things going. Thats the whole ordeal. ---------------------------------------------------------------------- THEtechknight · 2022-06-17 14:04 I'll see what I can do about getting the logs. ---------------------------------------------------------------------- implicitpharmakoi · 2022-06-17 15:04 Pcie looks like pci on legacy software, no reason old cards wouldn't work. But alternately, pci passthrough if you have the mobo. ---------------------------------------------------------------------- THEtechknight · 2022-06-17 17:02 Here is the X log: https://pastebin.com/4GShNARh ---------------------------------------------------------------------- THEtechknight · 2022-06-17 17:26 Wouldn't work in our situation, as the real system when not virtualized relies on the AGP graphics card and opens the AGP Aperture for direct framebuffer capture by another PCI card, happens transparently in the background without software intervention across the bus once its enabled/opened by the drivers. Luckily the PCI card isn't needed for the software, only to input/output video in and out of the software. the software itself can still run without the card and produce graphics only. But, it still needs the AGP card and video drivers for OpenGL acceleration and that's where the issue is with VMWare and other stuff. ---------------------------------------------------------------------- FreeBSDfan · 2022-06-17 18:07 Can you buy a new software to replace it (if you have the cash). Also does it require ATI cards or can Intel, Nvidia, or S3/VIA cards work? ---------------------------------------------------------------------- THEtechknight · 2022-06-18 00:12 Nope... It is all broadcast related stuff, and its preservation efforts of specific eras. Only drivers that are built with the kernel that know to work is ATI. there may be others but I do not know. ---------------------------------------------------------------------- grahamperrin · 2022-06-18 14:05 > … in VMWare … Might things be any different (better) with the old OS as a VirtualBox guest? The standard advice (for compatibility with guest additions) is for the guest to use VBoxSVGA. Re: if don't need VBoxSVGA, you can enable 3d acceleration, although I have no experience in this area; I can't guess whether it'll meet the requirements in your case. ---------------------------------------------------------------------- THEtechknight · 2022-06-19 13:11 Tried VirtualBox. Didnt work [https://cdn.discordapp.com/attachments/596166998187048960/98806712721 2793876/IMG\_9935.png](https://cdn.discordapp.com/attachments/59616699 8187048960/988067127212793876/IMG_9935.png) ---------------------------------------------------------------------- grahamperrin · 2022-06-19 13:36 FreeBSD bug [25788 – microuptime() weny backwards, again](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=25788) ---------------------------------------------------------------------- 12Darius21 · 2022-06-19 13:42 If it is that specific then it seems unlikely you will get it working without PCI pass through but that would require an AGP port so... Doesn't seem likely. ---------------------------------------------------------------------- 12Darius21 · 2022-06-19 13:44 Have you tried running it under something like Xpra? It is like screen or tmux for X but also handles OpenGL. ---------------------------------------------------------------------- THEtechknight · 2022-06-19 14:24 Then idk how to fix that for VBox. Cant recompile the kernel because its a custom build with custom KLDs. ---------------------------------------------------------------------- THEtechknight · 2022-06-19 14:25 Not sure exactly how to do that yet. ---------------------------------------------------------------------- THEtechknight · 2022-06-19 16:31 Took a look at it. Requires Python 3.7 which wont work, the system relies on a very specific version of 2.X to run. upgrading it will break the entire thing. (Ask me how i know) ---------------------------------------------------------------------- 12Darius21 · 2022-06-21 05:53 Oh duh of course, what a PITA... ---------------------------------------------------------------------- [deleted] · 2022-06-22 05:40 [deleted] ---------------------------------------------------------------------- THEtechknight · 2022-06-22 17:27 That would imply you have the source code? or did you really spend eons staring at ghidra/IDA. if so, props because I couldn't do that. I was thinking more along the lines of just writing a brand new one out of C++ and emulating the old extends. Call it a day. ---------------------------------------------------------------------- [deleted] · 2022-06-22 19:45 [deleted] ---------------------------------------------------------------------- THEtechknight · 2022-06-22 19:57 Creating a renderer is an ambitious project and probably wont happen until im retired, but by then we will be past the 2038 bug so it wont matter lmao. Anyways, Yeah i heard of DLL injection, alot of games used that for exploiting. But, I dont know how it works and never personally used it. ---------------------------------------------------------------------- [deleted] · 2022-06-22 20:03 [deleted] ---------------------------------------------------------------------- THEtechknight · 2022-06-22 20:04 Yeah. Luckily ive been able to rebuild the one I have. But only a matter of time before chips start failing. ---------------------------------------------------------------------- [deleted] · 2022-06-22 20:11 [deleted]