How to enable hardware acceleration in FreeBSD ?

R6exe

Member

Reaction score: 2
Messages: 32

Hi,
I posted before a computer which has some limited hardware.
It's specs are these.
AMD 64 Athlon 3000+.
Nvidia FX 5700 256MB.
512MB RAM DDR x2 = 1024MB.
I have installed on it FreeBSD 12.1 RELEASE-p6 GENERIC i386 with the LXDE Desktop.
When the LXDE desktop wants to use a screensaver which has 3D images, the CPU starts using a lot of it's resources, and even the 3D images goes like slow xd.
I think this is a hardware acceleration problem, and I would like some help to be able to fix this if it's possible.:)
When I do a dmesg | grep agp, appears this.
agp0: <NVIDIA nForce3-250 AGP Controller> on hostb0.
Doing a cat /var/log/Xorg.0.log | grep "Direct Rendering" doesn't give me anything.
Thank you for your possible help, at least I would like to not stress a lot the CPU when using some graphical 3d application.
Cheers.
 
OP
R

R6exe

Member

Reaction score: 2
Messages: 32

FX is dead. Anything below 8 series is out of support.
Damn, well, what do you thing should I do shkln ?
I mean really, when I move a window the CPU just gets higher until 100% of usage.
Do you thing maybe Linux hardware support could fix this ?
Regards.
 

shkhln

Daemon

Reaction score: 991
Messages: 2,275

Well, the question is: what are you doing with not quite retro, yet already long obsolete desktop machine?
 

shkhln

Daemon

Reaction score: 991
Messages: 2,275

304 is not supported by Nvidia and was broken by the last Xorg update. Strictly speaking, 340 is out of support as well, however it still works. With 8 series cards, that is.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,724
Messages: 39,312

304 is unsupported and broken by the last Xorg update.
Didn't know it was broken. It's not marked as such though. That's a shame, nobody will fix it in any case, so I suspect it will be removed some time soon.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,724
Messages: 39,312

It's going to be difficult finding a replacement card, there are very few AGP cards nowadays. You may need to find a second hand on eBay.
 

shkhln

Daemon

Reaction score: 991
Messages: 2,275

Didn't know it was broken. It's not marked as such though. That's a shame, nobody will fix it in any case, so I suspect it will be removed some time soon.

See PR 244421, for example. The elephant in the room is that those fixed-function pipeline video cards are useless for modern desktop — they aren't just weak, they are completely at odds with current graphics programming practices.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,724
Messages: 39,312

These things happen. As you said in another thread a while back, we're not a museum. So old stuff eventually breaks and gets removed.
 
OP
R

R6exe

Member

Reaction score: 2
Messages: 32

Then should I use another OS ? Like XP again ?
I'm trying to use these old computers as servers for my own projects that I have.
They are just machines with some Java code as back-end.
I would like to use the GUI instead of CLI because it helps me work more faster.
Using Windows XP leaves me with security holes and incompatible software, which doesn't help too much, even if the machine has the hardware requirements.
Then I thought maybe installing Linux would be a good idea, but I didn't decide to do that because Linux is dropping support for i386.
And then I found FreeBSD and like it, but unfortunately I found these problems related with the GUI.
At least what I would like to do is to not get the processor so high, when moving the windows and all that stuff. Maybe installing a reverse-engineering Linux driver of that graphics card could help ? Or Installing a Linux distribution ?
I just would like to use a UNIX platform and not use Windows, but if that's the only way I can go to get things working I think I don't have another option.
Regards.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,724
Messages: 39,312

I'm trying to use these old computers as servers for my own projects that I have.
Servers don't need a working graphics card.

but I didn't decide to do that because Linux is dropping support for i386.
As 32 bit is still quite prevalent in embedded systems I highly doubt this. Your favorite distribution might drop support for 32 bit but that's not the same as Linux dropping support.
 
OP
R

R6exe

Member

Reaction score: 2
Messages: 32

Servers don't need a working graphics card.


As 32 bit is still quite prevalent in embedded systems I highly doubt this. Your favorite distribution might drop support for 32 bit but that's not the same as Linux dropping support.
I'm not an expert on servers, but I think that for example if I access into the Window Manager to make some changes in GUI mode, and the service is still running, isn't gonna get the service more slow because of the CPU using it's resources for the display while I'm doing the changes ? Isn't it more better to use the resources of the graphics card for the display of the Window manager or desktop ?
Thank you.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,724
Messages: 39,312

I'm not an expert on servers, but I think that for example if I access into the Window Manager to make some changes in GUI mode, and the service is still running, isn't gonna get the service more slow because of the CPU using it's resources for the display while I'm doing the changes ?
Look into remote X if you really want to use a GUI with some application(s). With remote X there's no need to run anything graphical on the server itself (and thus doesn't require a working graphics card).
 
OP
R

R6exe

Member

Reaction score: 2
Messages: 32

Look into remote X if you really want to use a GUI with some application(s). With remote X there's no need to run anything graphical on the server itself (and thus doesn't require a working graphics card).
Thank you SirDice.
Which service are you talking about ? XRDP ? VNC ?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,724
Messages: 39,312

Search for "X forwarding". All you need is an SSH connection (with X forwarding turned on) and a locally running X-server.

 

kpedersen

Son of Beastie

Reaction score: 2,163
Messages: 3,003

If your machine is for learning rather than production (that old NVIDIA card suggests it isn't production), rather than switching to Linux (Nouveau open-source driver) or switching to Windows, I would be tempted to suggest use an old build of FreeBSD (and relating packages and ports snapshot) from a time when the FX series was current (i.e 9.x). However just be aware that asking questions about old versions of FreeBSD is a little out of scope for these forums.

Otherwise, yeah Windows XP and the most recent version of VMware (or VirtualBox) you can find will probably get best results.
The llvmpipe based software renderer will even provide fairly decent 3D performance in a VM if your CPU is reasonable.
 
OP
R

R6exe

Member

Reaction score: 2
Messages: 32

If your machine is for learning rather than production (that old NVIDIA card suggests it isn't production), rather than switching to Linux (Nouveau open-source driver) or switching to Windows, I would be tempted to suggest use an old build of FreeBSD (and relating packages and ports snapshot) from a time when the FX series was current (i.e 9.x). However just be aware that asking questions about old versions of FreeBSD is a little out of scope for these forums.

Otherwise, yeah Windows XP and the most recent version of VMware (or VirtualBox) you can find will probably get best results.
The llvmpipe based software renderer will even provide fairly decent 3D performance in a VM if your CPU is reasonable.

Yeah maybe that's a good answer kpedersen, thank you.
The only problem here is that VirtualBox or VMware most recent versions I think they are not supported by XP, and for sure those old versions could have vulnerabilities to the host, I mean maybe thanks to a buffer overflow or whatever.
Another problem is performance, I think that machine is able to virtualize, but I think in my opinion the performance it's gonna decrease like 30 % - 20 %.
Nouveau driver ? Is that compatible with FreeBSD ? I saw in the FreeBSD documentation that even some Linux executables work more better under FreeBSD, do you think that "Nouveau" driver could work under FreeBsd ?
Thank you, regards.
 

shkhln

Daemon

Reaction score: 991
Messages: 2,275

The llvmpipe based software renderer will even provide fairly decent 3D performance in a VM if your CPU is reasonable.

The software renderer about which OP was complaining in the first post should already be llvmpipe.
 

kpedersen

Son of Beastie

Reaction score: 2,163
Messages: 3,003

Nouveau driver ? Is that compatible with FreeBSD ?

Nouveau is currently Linux only.


The only problem here is that VirtualBox or VMware most recent versions I think they are not supported by XP, and for sure those old versions could have vulnerabilities to the host, I mean maybe thanks to a buffer overflow or whatever.

If you keep your XP host offline (i.e disable TCP/IP, give it an invalid IP etc) and only allow the bridged VM through then that gets past the issue of Windows being vulnerable (not just XP, I wouldn't trust any recent version either).

As for VirtualBox / VMware having vulnerabilities, see here:
I would say though that most (if not all of them) require local access to the machine. If you block all ports other than i.e 80, I doubt any of them could be exploited.

The software renderer about which OP was complaining in the first post should already be llvmpipe.

I was thinking that it was because of using the vesa or nv driver. For example if you run glxgears with LIBGL_ALWAYS_SOFTWARE=1 it runs fairly well when using i.e the intel or nvidia blob but still terribly with vesa. Mostly because the image gets generated but actually pushing that to the physical screen is slow. So we need to get around that.

There is the vmware GPU driver (x11-drivers/xf86-video-vmware) that should push the pixels OK. Otherwise yeah we may have to fall back to SirDice's suggestion of remote rendering.

If you use TigerVNC on the VM you will possibly get better results because as mentioned before, even though the llvmpipe renderer might be generating the image quickly the cost is often in the vesa driver actually displaying the pixels on screen (especially with larger resolutions). If you use another host (with actual GPU drivers) to do that instead (i.e the vncviewer) you can save some processing.

For some things X11 forwarding is better but for recent software these days, they all deal with images anyway which kills a lot of the benefits of a network aware protocol.
 

shkhln

Daemon

Reaction score: 991
Messages: 2,275

It's a roughly 2004-2005 machine with a CPU without virtualization extensions, only 1 Gb of RAM and an effectively not upgradeable video card. I don't see the point in these workarounds. No amount of effort would make the desktop experience here less horrible.

The only sensible options are:
  1. treat this as a retro PC by installing old software and isolating it from the Internet; good for old games and maybe word processing or something.
  2. install up-to-date Linux/*BSD there (with or without very lightweight GUI) to occasionally run a specific single non-demanding task; for a 24/7 home server buying a motherboard with an integrated Atom processor would be a far better decision.
 
OP
R

R6exe

Member

Reaction score: 2
Messages: 32

If you keep your XP host offline (i.e disable TCP/IP, give it an invalid IP etc) and only allow the bridged VM through then that gets past the issue of Windows being vulnerable (not just XP, I wouldn't trust any recent version either).
Wow that's really smart, having no Ip address asigned to XP and with bridged adapter in the virtual machine really sounds to work.
The only problem that I see here is the performance and the Java jdk.
I think XP just supports jdk7.
And I dont know if the virtual machine could support the X11 with LXDE on that machine.
I've another machine that has the same problem as the Nvidia one, but this one has an ati 9200, do you thing there would be a driver for this one as it is from ati ?
Thank you so much. Regards.
 
Top