2

I've 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, like 100%, and even the 3D images goes like slow. This happens too if I move a Window in the Desktop. 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: on hostb0. Doing a cat /var/log/Xorg.0.log | grep "Direct Rendering" doesn't give me anything.

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.

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'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 for your possible help, at least I would like to not stress a lot the CPU when using the Window Manager or desktop.

Cheers.

1
  • 1
    choosing a vanilla FreeBSD for Desktop use is maybe not the best choice. If you stick to FreeBSD, then you should go for GhostBSD or ULBSD, as being Desktop oriented (you should have a look at en.wikipedia.org/wiki/List_of_BSD_operating_systems).
    – Ouki
    Commented Jun 17, 2020 at 16:30

2 Answers 2

3

Xorg will try to autodetect your graphics card but the driver needs to be available. You do not write you have done anything to fetch a driver.

The dmesg output shows you what the FreeBSD kernel has detected. It can help you identify the graphics card you have available. It is however not something Xorg uses. As default Xorg on FreeBSD comes with a few pretty generic drivers. If you want anything accelerated you need a specific vendor driver for either of the "big 3": AMD, Intel and Nvidia.

You are on the right path when looking at /var/log/Xorg.0.log. On your system you will probably see that you are loading either fb, scfb or vesa which are generic drivers.

On my system I am using Intel Graphics and have installed the driver. This is autodetected by Xorg and I have the following lines in my log:

[   113.634] (II) intel(0): Allocated new frame buffer 1366x768 stride 5632, tiled
[   113.639] (II) UXA(0): Driver registered support for the following operations:
[   113.639] (II)         solid
[   113.639] (II)         copy
[   113.639] (II)         composite (RENDER acceleration)
[   113.639] (II)         put_image
[   113.639] (II)         get_image
[   113.639] (II) intel(0): [DRI2] Setup complete
[   113.639] (II) intel(0): [DRI2]   DRI driver: i965
[   113.639] (II) intel(0): [DRI2]   VDPAU driver: va_gl
[   113.640] (==) intel(0): Backing store enabled
[   113.640] (==) intel(0): Silken mouse enabled
[   113.640] (II) intel(0): Initializing HW Cursor
[   113.640] (==) intel(0): DPMS enabled
[   113.640] (==) intel(0): Intel XvMC decoder enabled
[   113.641] (II) intel(0): Set up textured video
[   113.641] (II) intel(0): [XvMC] xvmc_vld driver initialized.
[   113.641] (II) intel(0): DRI2: Enabled
[   113.641] (II) intel(0): DRI3: Disabled

You will see something similar for the other accelerated drivers.

There are several Nvidia drivers.

x11/nvidia-driver

x11/nvidia-driver-390

x11/nvidia-driver-340

x11/nvidia-driver-304

Which one you need to use depends on the age of the card and when support for it was dropped in the driver. Do not try to download and use a driver downloaded from Nvidia. Instead use the properly patched packages. Should I guess then I would try 340.

pkg install x11/nvidia-driver-340

Then enable it:

sysrc kld_list+="nvidia"

If it is a newer driver version >= 358.009 then replace with:

sysrc kld_list+="nvidia-modeset"

I am not sure if the nvidia driver still depends on the Linux subsystem. If you get any complaints then enable it using:

sysrc linux_enable="YES"

Check your settings with sysrc -a or just cat /etc/rc.conf. If you are not comfortable manually loading kernel modules then simple reboot your system.

This should be enough.

If you experience screen tearing with the driver then create the file /usr/local/etc/X11/xorg.conf/10-nvidia.conf with the following content:

Section "Device"
        Identifier     "NVIDIA Card"
        VendorName     "NVIDIA Corporation"
        Driver         "nvidia"
        Option         "AccelMethod" "none"
        Option         "TripleBuffer" "True"
        Option         "MetaModes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
EndSection

Easy installation

If you think the above is a hassle then you should have a look at FuryBSD which is directly derived from FreeBSD

3
  • Ok now thanks to a freebsd-update command I get this when doing dmesg | grep agp. agp0: <NVIDIA nForce3-250 AGP Controller> on hostb0. I found on the internet that the last nvidia fx 5700 driver for FreeBSD was 173.14.39. nvidia.es/download/driverResults.aspx/71305/es What should I do now ? Thank you.
    – Adrián
    Commented Jun 18, 2020 at 14:56
  • 1
    @Adrián That is unrelated. You need an Xorg driver. I would suggest to follow the instructions above. In your case I would go the easy route with FuryBSD (or GhostBSD or MidnightBSD!) Commented Jun 19, 2020 at 10:51
  • @ouki Yes - and I linked other derived as well. My daily driver is plain FreeBSD but I acknowledge how the derived might be easier for specific usecases. I have no skin in the game - I do not care which one is choosen. Commented Jun 19, 2020 at 10:53
1

By default FreeBSD uses very generic graphic drivers, but also has modern graphics infrastructure (ported from linux). To enable it you just need to install package drm-kmod:

# pkg install drm-kmod

and add one of lines below to /etc/rc.conf with sysrc command:

For amdgpu:

# sysrc kld_list+="amdgpu" 

For Intel:

# sysrc kld_list+="/boot/modules/i915kms.ko" 

For radeonkms:

# sysrc kld_list+="/boot/modules/radeonkms.ko"

Nvidia drivers have separate packages with different versions, choose one of found by command

# pkg search nvidia

and install chosen driver with command

# pkg install PACKAGENAME
2
  • I'm not familiar with the sysrc command, but given the similarity of this answer to Claus', would you explain when/why you would use your sysrc kld_list= (with an equals sign) versus Claus' sysrc kld_list+= (with a plus equals)?
    – Jeff Schaller
    Commented Oct 8, 2020 at 13:51
  • equals sign is used when you setting single value to the list, += used to add value without removing existing elements of kld_list. On new installation (and most installations) of FreeBSD kld_list is empty, but you can check this with command sysrc kld_list. Ps but thank you for the advice, edited my reply
    – cj ayho
    Commented Oct 9, 2020 at 6:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .