pavement

Hardware Configuration, Audio/Video

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(Virtual Terminals Selection)
(ATI)
 
(37 intermediate revisions by one user not shown)
Line 1: Line 1:
 
Information on audio and video configuration of hardware.
 
Information on audio and video configuration of hardware.
  
==Audio Selection==
+
==GPU Hardware==
See [[Sound card]] for initial set up. To check the information on which sound output is used, type:
+
Here is a list of FreeBSD supported video cards, https://wiki.freebsd.org/Graphics#Hardware_Support. Check the latest compatibility information before purchasing a graphics card. Different brands of video cards generally don't work well together, but with newer software or implementation of this software, this may change.
% cat /dev/sndstat
+
  
Example of command to choose the soundcard:
+
At the time of FreeBSD 11, the VESA driver works with {{man|sc|4}}, and graphics cards which use KMS (ATI and Intel) need the {{man|vt|4}} driver. Most video drivers can be selected for installation by running {{cmd|make config}} from {{port|x11-drivers/xorg-drivers}}. To automate this, edit {{file|make.conf}}, and recompile {{port|x11-drivers/xorg-drivers}}. If another driver is specified and configured, removing the VESA driver is optional.
sysctl hw.snd.default_unit=0
+
x11-drivers_xorg-drivers_UNSET=VESA SCFB
To make the selection permanent, insert into {{file|/etc/sysctl.conf}}:
+
The argument to select specific driver for installation from {{port|x11-drivers/xorg-drivers}} is under the respective section below.
hw.snd.default_unit=0
+
  
===Radeon HDMI audio out===
+
When you set these cards, permissions must be set to allow access for them. Add your user to the {{code|video}} group in {{file|/etc/group}}. Then give {{yhl|drm}} and {{yhl|dri}} permissions to the {{code|video}} group through {{file|/etc/devfs.rules}}:
Partially supported Radeon video cards, linked to in the section "GPU Hardware" below, usually don't support HDMI audio out. Other Radeon cards require extra configuration.
+
[localrules=10]
 +
add path 'dri/*' mode 0666 group video
 +
add path 'drm/*' mode 0666 group video
 +
Be sure this location is referenced through {{file|/etc/rc.conf}}:
 +
devfs_system_ruleset="localrules"
  
To do this, edit the line {{code|int radeon_audio}} in {{file|/usr/src/sys/dev/drm2/radeon/radeon_drv.c}} to:
+
Do not load ATI, Intel or Nvidia cards by compiling their drivers into the kernel. ATI and Intel drivers are capable of auto-loading, but setting them in {{file|rc.conf}} will prevent them from falling back to the VESA driver for the console. Don't load ATI and Intel drivers through {{file|/boot/loader.conf}}.
int radeon_audio=1
+
  
After this, you may rebuild the modules only or whole kernel as typical:
+
There may be firmware error messages seen from the {{code|dmesg}} output, when using newer cards. If you inspect after that line with {{cmd|| grep -A3}} as an argument, the firmware loads after the error message is given.
/usr/src/sys/modules/drm2/make clean; make; make install
+
  
See the previous section for selecting HDMI audio out, and reboot. Xorg should automatically load the Radeon driver for this to work. If working from a console, add {{code|kld_list<nowiki>=</nowiki>"radeonkms"}} to {{file|/etc/rc.conf}}. You can see the loaded Radeon drivers by typing {{cmd|kldstat}}.
+
===ATI===
 +
Many ATI Radeon cards are compatible with FreeBSD, https://wiki.freebsd.org/Graphics#AMD_.2F_Radeon_Graphics. However, not all outputs or functions may work on partially supported video cards.
  
==Disabling overscan==
+
Radeon cards require the {{code|ATI}} setting in {{port|x11-drivers/xorg-drivers}}. Here is how to set it for installation through {{file|make.conf}}:  
Enabling audio on HDMI can crop the edges of the display on televisions. Toggle the 'overscan' function on the remote to adjust it properly. If the TV doesn't have the overscan function, you can insert into your window manager configuration file:
+
  x11-drivers_xorg-drivers_SET=ATI
  xrandr --output HDMI-0 --set underscan on
+
{{code|MACH64}} and {{code|R128}} are only also required if you have those specific older models.
  
If this stops working, use xrandr to adjust the resolution:
+
To configure the Radeon driver to load on boot-up, add the following to {{file|rc.conf}}:
  xrandr --output HDMI-0 --auto --set underscan on
+
  kld_list="radeonkms"
  
To increase it's borders use:
+
====Newer ATI chipsets====
xrandr --output HDMI-0 --set "underscan hborder" 5 --set "underscan vborder" 5
+
{{port|graphics/drm-stable-kmod}} supports fairly new ATI chipsets, and {{port|graphics/drm-next-kmod}} has experimental support for more recent ATI cards. These drivers only work from FreeBSD 11.2 (Beta) onward. Sources for kernel must be propagated, before either of these two ports is built.
  
==Virtual Terminals Selection==
+
To use ATI GPU's, {{code|AMDGPU}} in {{port|x11-drivers/xorg-drivers}} must be set. Many programs rely on the {{code|VDPAU}} wrapper for use on ATI cards, so this can be set from {{file|/etc/make.conf}}.
To select different virtual terminals from Xorg, press {{yhl|ctrl-alt-#}}.
+
x11-drivers_xorg-drivers_SET=ATI AMDGPU
 +
OPTIONS_SET=VDPAU
  
==GPU Hardware==
+
Depending on your driver, enable it from {{file|rc.conf}}:
Here is a list of FreeBSD supported video cards, https://wiki.freebsd.org/Graphics#Tested_hardware_matrix . There is also hardware compatibility information at FreeBSD's "Hardware Notes" pages under http://www.freebsd.org/releases/. As of this writting, select Intel, Nvidia and Radeon cards work with FreeBSD. Check for the latest compatibility information before purchasing a card. Different brands of video cards generally don't work well together, but with newer software or implementation of this software, this may change.
+
kld_list="amdgpu"
 +
or
 +
kld_list="/boot/modules/radeonkms.ko"
  
At the time of FreeBSD 11, the VESA driver works with {{man|sc|4}}, and other video drivers use the {{man|vt|4}} driver. To select the video driver, you can do so from {{port|x11-drivers/xorg-drivers}}. To automate this, edit {{file|make.conf}}. If another driver is specified and configured, removing the VESA driver is optional.
+
===Intel===
  x11-drivers_xorg-drivers_UNSET=VESA
+
For the status of Intel cards, see https://wiki.freebsd.org/Graphics#Intel_Graphics.
The argument to select specific driver from {{port|x11-drivers/xorg-drivers}} is under the respective section below.
+
To set Intel cards for installation, use this argument in {{file|make.conf}}:
 +
  x11-drivers_xorg-drivers_SET=INTEL
 +
To load an Intel graphics card on start up, insert into {{file|rc.conf}}:
 +
kld_list="i915kms"
  
===AMD===
+
Broadwell, Skylake and Kabylake Intel cards are expected to be functional in FreeBSD 12 (current): as of now, they are represented in {{port|graphics/drm-next-kmod}}.
Many Radeon cards are compatible with FreeBSD. Not all outputs or functions may work on partially supported video cards.
+
If you're testing this driver on current, set an absolute path, instead of the default, in {{file|rc.conf}} to:
 +
kld_list="/boot/modules/i915kms.ko"
  
Radeon cards require the "ATI" setting in {{port|x11-drivers/xorg-drivers}}.  
+
===Nvidia===
x11-drivers_xorg-drivers_SET=ATI
+
For the status of Nvidia cards, see https://wiki.freebsd.org/Graphics#NVidia_.2F_GeForce_Graphics.
The setting AMDGPU for newer video drivers is not ready for FreeBSD 11.1 and previous versions. MACH64 and R128 are only required if you have those specific older models.
+
  
As of this writing, Radeon cards generally only work when the modules are auto-loaded.
+
The driver for older Nvidia cards can be set to install by using this argument in {{file|make.conf}}:
To configure the Radeon driver to load on boot-up, add the following to {{file|rc.conf}}:
+
  x11-drivers_xorg-drivers_SET=NV
  kld_list="radeonkms"
+
Do not load it through {{file|/boot/loader.conf}} nor compiling it into the kernel. The Radeon driver is capable of auto-loading, but without setting it in {{file|rc.conf}} will cause it to fall back to VESA.
+
  
===Intel===
+
This card is perhaps loaded through {{file|/boot/loader.conf}}, instead of {{file|/etc/rc.conf}}.
Many Intel video cards work for FreeBSD 9.1 and later.
+
  
For status on the currently unsupported Haswell (Xeon E3 V3 and i[357]-4xxx processors) cards, see https://wiki.freebsd.org/Graphics/Update%20i915%20GPU%20driver%20to%20Linux%203.8
+
For setting up newer Nvidia cards, see [https://forums.freebsd.org/threads/52311/#post-364239| FreeBSD Forums HOWTO: Setup Xorg with NVIDIA's driver].
 
+
===Nvidia===
+
Nvidia cards haven't always been compatible with FreeBSD, but recently they are and have video card support.
+
  
 
==Multiple Monitors==
 
==Multiple Monitors==
Line 67: Line 68:
 
  xrandr --output DVI-0 --right-of HDMI-0
 
  xrandr --output DVI-0 --right-of HDMI-0
  
Using the gui {{port|x11/arandr}} is another option.
+
Using the gui {{port|x11/arandr}} is another option. For the obsolete way of configuring dual monitors for Nvidia cards, see [[Dual Screen]]
  
To see the obsolete way of configuring dual monitors for Nvidia cards, see [[Dual Screen]]
+
==Disabling overscan==
 +
Enabling audio on HDMI can crop the edges of the display on televisions. Toggle the 'overscan' function on the remote to adjust it properly. If the TV doesn't have the overscan function, you can insert into your window manager configuration file:
 +
xrandr --output HDMI-0 --set underscan on
 +
 
 +
If this stops working, use xrandr to adjust the resolution:
 +
xrandr --output HDMI-0 --auto --set underscan on
 +
 
 +
To increase it's borders use:
 +
xrandr --output HDMI-0 --set "underscan hborder" 5 --set "underscan vborder" 5
 +
 
 +
==Audio Selection==
 +
See [[Sound card]] for initial set up. To check the information on which sound output is used, type:
 +
% cat /dev/sndstat
 +
 
 +
Example of command to choose the soundcard:
 +
sysctl hw.snd.default_unit=0
 +
To make the selection permanent, insert into {{file|/etc/sysctl.conf}}:
 +
hw.snd.default_unit=0
 +
 
 +
===Radeon HDMI audio out===
 +
Partially supported Radeon video cards, linked to in the section "GPU Hardware" below, usually don't support HDMI audio out. Other Radeon cards require extra configuration.
 +
 
 +
To do this, edit the line {{code|int radeon_audio}} in {{file|/usr/src/sys/dev/drm2/radeon/radeon_drv.c}} to:
 +
int radeon_audio=1
 +
 
 +
After this, you may rebuild the modules only or whole kernel as typical:
 +
/usr/src/sys/modules/drm2/make clean; make; make install
 +
 
 +
See the previous section for selecting HDMI audio out, and reboot. Xorg should automatically load the Radeon driver for this to work. If working from a console, add {{code|kld_list<nowiki>=</nowiki>"radeonkms"}} to {{file|/etc/rc.conf}}. You can see the loaded Radeon drivers by typing {{cmd|kldstat}}.
  
 
==References==
 
==References==

Latest revision as of 21:24, 31 May 2018

Information on audio and video configuration of hardware.

Contents

GPU Hardware

Here is a list of FreeBSD supported video cards, https://wiki.freebsd.org/Graphics#Hardware_Support. Check the latest compatibility information before purchasing a graphics card. Different brands of video cards generally don't work well together, but with newer software or implementation of this software, this may change.

At the time of FreeBSD 11, the VESA driver works with sc(4), and graphics cards which use KMS (ATI and Intel) need the vt(4) driver. Most video drivers can be selected for installation by running make config from x11-drivers/xorg-drivers . To automate this, edit make.conf, and recompile x11-drivers/xorg-drivers . If another driver is specified and configured, removing the VESA driver is optional.

x11-drivers_xorg-drivers_UNSET=VESA SCFB

The argument to select specific driver for installation from x11-drivers/xorg-drivers is under the respective section below.

When you set these cards, permissions must be set to allow access for them. Add your user to the video group in /etc/group. Then give drm and dri permissions to the video group through /etc/devfs.rules:

[localrules=10]
add path 'dri/*' mode 0666 group video
add path 'drm/*' mode 0666 group video

Be sure this location is referenced through /etc/rc.conf:

devfs_system_ruleset="localrules"

Do not load ATI, Intel or Nvidia cards by compiling their drivers into the kernel. ATI and Intel drivers are capable of auto-loading, but setting them in rc.conf will prevent them from falling back to the VESA driver for the console. Don't load ATI and Intel drivers through /boot/loader.conf.

There may be firmware error messages seen from the dmesg output, when using newer cards. If you inspect after that line with | grep -A3 as an argument, the firmware loads after the error message is given.

ATI

Many ATI Radeon cards are compatible with FreeBSD, https://wiki.freebsd.org/Graphics#AMD_.2F_Radeon_Graphics. However, not all outputs or functions may work on partially supported video cards.

Radeon cards require the ATI setting in x11-drivers/xorg-drivers . Here is how to set it for installation through make.conf:

x11-drivers_xorg-drivers_SET=ATI

MACH64 and R128 are only also required if you have those specific older models.

To configure the Radeon driver to load on boot-up, add the following to rc.conf:

kld_list="radeonkms"

Newer ATI chipsets

graphics/drm-stable-kmod supports fairly new ATI chipsets, and graphics/drm-next-kmod has experimental support for more recent ATI cards. These drivers only work from FreeBSD 11.2 (Beta) onward. Sources for kernel must be propagated, before either of these two ports is built.

To use ATI GPU's, AMDGPU in x11-drivers/xorg-drivers must be set. Many programs rely on the VDPAU wrapper for use on ATI cards, so this can be set from /etc/make.conf.

x11-drivers_xorg-drivers_SET=ATI AMDGPU
OPTIONS_SET=VDPAU

Depending on your driver, enable it from rc.conf:

kld_list="amdgpu"

or

kld_list="/boot/modules/radeonkms.ko"

Intel

For the status of Intel cards, see https://wiki.freebsd.org/Graphics#Intel_Graphics. To set Intel cards for installation, use this argument in make.conf:

x11-drivers_xorg-drivers_SET=INTEL

To load an Intel graphics card on start up, insert into rc.conf:

kld_list="i915kms"

Broadwell, Skylake and Kabylake Intel cards are expected to be functional in FreeBSD 12 (current): as of now, they are represented in graphics/drm-next-kmod . If you're testing this driver on current, set an absolute path, instead of the default, in rc.conf to:

kld_list="/boot/modules/i915kms.ko"

Nvidia

For the status of Nvidia cards, see https://wiki.freebsd.org/Graphics#NVidia_.2F_GeForce_Graphics.

The driver for older Nvidia cards can be set to install by using this argument in make.conf:

x11-drivers_xorg-drivers_SET=NV

This card is perhaps loaded through /boot/loader.conf, instead of /etc/rc.conf.

For setting up newer Nvidia cards, see FreeBSD Forums HOWTO: Setup Xorg with NVIDIA's driver.

Multiple Monitors

Use the program xrandr to be able to use and configure multiple monitors. With this program, a basic video card can use both of it's HDMI and DVI outputs for dual configured monitors, as in different outputs for each monitor.

Example of command line that can be used in the file .xinitrc:

xrandr --output DVI-0 --right-of HDMI-0

Using the gui x11/arandr is another option. For the obsolete way of configuring dual monitors for Nvidia cards, see Dual Screen

Disabling overscan

Enabling audio on HDMI can crop the edges of the display on televisions. Toggle the 'overscan' function on the remote to adjust it properly. If the TV doesn't have the overscan function, you can insert into your window manager configuration file:

xrandr --output HDMI-0 --set underscan on

If this stops working, use xrandr to adjust the resolution:

xrandr --output HDMI-0 --auto --set underscan on

To increase it's borders use:

xrandr --output HDMI-0 --set "underscan hborder" 5 --set "underscan vborder" 5

Audio Selection

See Sound card for initial set up. To check the information on which sound output is used, type:

% cat /dev/sndstat

Example of command to choose the soundcard:

sysctl hw.snd.default_unit=0

To make the selection permanent, insert into /etc/sysctl.conf:

hw.snd.default_unit=0

Radeon HDMI audio out

Partially supported Radeon video cards, linked to in the section "GPU Hardware" below, usually don't support HDMI audio out. Other Radeon cards require extra configuration.

To do this, edit the line int radeon_audio in /usr/src/sys/dev/drm2/radeon/radeon_drv.c to:

int radeon_audio=1

After this, you may rebuild the modules only or whole kernel as typical:

/usr/src/sys/modules/drm2/make clean; make; make install

See the previous section for selecting HDMI audio out, and reboot. Xorg should automatically load the Radeon driver for this to work. If working from a console, add kld_list="radeonkms" to /etc/rc.conf. You can see the loaded Radeon drivers by typing kldstat.

References

  • FreeBSD related forums and documentation
Personal tools