Radeon Video: Difference between revisions

From Alpine Linux
(Add section Fixing a frozen X11 when invoking startx)
(Change order of bullets: keep original "install X or Y")
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{TOC right}}
The following instructions are for modern AMD GPU chipsets covered by the radeon driver.
The following instructions are for modern AMD GPU chipsets covered by the radeon driver.


== Setup Xorg/udev ==
== Setup Xorg/udev ==


# Run the [[Alpine setup scripts#setup-xorg-base|setup-xorg-base]] script.
# Run the <code>[[Alpine setup scripts#setup-xorg-base|setup-xorg-base]]</code> script.
# Install the Xorg AMD video drivers: {{Cmd|# apk add xf86-video-ati}}
# Install the Xorg AMD video drivers: {{Cmd|# apk add xf86-video-ati}}
# For newer devices, use: {{Cmd|# apk add xf86-video-amdgpu}}
# For newer devices, use: {{Cmd|# apk add xf86-video-amdgpu}}
# Install the AMD firmware files: {{Cmd|# apk add linux-firmware-amdgpu}}
# Enable [[#Kernel Modesetting (KMS)]]. Specifically, the <code>fbcon</code> module is necessary, or leaving Xorg (via <code>Ctrl+Alt+F1</code> or quitting) will result in a black screen until the machine is power cycled. If you have already launch Xorg and don't want to experience this effect, you can <code>modprobe fbcon</code> while Xorg is running.
# Enable [[#Kernel Modesetting (KMS)]]. Specifically, the <code>fbcon</code> module is necessary, or leaving Xorg (via <code>Ctrl+Alt+F1</code> or quitting) will result in a black screen until the machine is power cycled. If you have already launch Xorg and don't want to experience this effect, you can <code>modprobe fbcon</code> while Xorg is running.


== Kernel Modesetting (KMS) ==
== Kernel Modesetting (KMS) ==


To enable KMS at boot:
To enable [[KMS]] at boot:
# Add the <code>radeon</code> and <code>fbcon</code> modules to {{Path|/etc/modules}}: {{Cmd|$ echo radeon >> /etc/modules<br />$ echo fbcon >> /etc/modules}}
# Add the <code>radeon</code> or <code>amdgpu</code> and <code>fbcon</code> modules to {{Path|/etc/modules}}: {{Cmd|$ echo radeon >> /etc/modules<br />$ echo fbcon >> /etc/modules}} or {{Cmd|$ echo amdgpu >> /etc/modules<br />$ echo fbcon >> /etc/modules}}
# Install <code>mkinitfs</code>: {{Cmd|apk add mkinitfs}}
# Install <code>mkinitfs</code>: {{Cmd|apk add mkinitfs}}
# Enable the <code>kms</code> feature in the <code>mkinitfs</code> configuration by adding it to the <var>features</var> variable, e.g., {{cat|/etc/mkinitfs/mkinitfs.conf|features{{=}}"keymap cryptsetup kms ata base ide scsi usb virtio ext4"}}
# Enable the <code>kms</code> feature in the <code>mkinitfs</code> configuration by adding it to the <var>features</var> variable, e.g., {{cat|/etc/mkinitfs/mkinitfs.conf|features{{=}}"keymap cryptsetup kms ata base ide scsi usb virtio ext4"}}
Line 17: Line 20:
# Reboot to test the configuration.
# Reboot to test the configuration.


== Fixing MESA-LOADER errors ==
== Troubleshooting ==
=== Fixing MESA-LOADER errors===
{{Obsolete|Alpine no longer ships with the ''linux-hardened'' kernel}}


The ''linux-hardened'' kernel package places restrictions on sysfs and will prevent the MESA-LOADER from working as a normal user even if added to the video group.
The ''linux-hardened'' kernel package places restrictions on sysfs and will prevent the MESA-LOADER from working as a normal user even if added to the video group.
Line 25: Line 30:
Either switch to the ''linux-vanilla'' package or apply the '''grsec_sysfs_restrict=0''' kernel parameter to allow normal users to access hardware acceleration on the desktop.
Either switch to the ''linux-vanilla'' package or apply the '''grsec_sysfs_restrict=0''' kernel parameter to allow normal users to access hardware acceleration on the desktop.


== Fixing a frozen X11 when invoking startx ==
=== Fixing a frozen X11 when invoking startx ===


You may need to set the AccelMethod to exa not glamour which is the default for the driver.
You may need to set the AccelMethod to exa not glamor which is the default for the driver.


{{cat|/etc/X11/xorg.conf|
   Section "Device"
   Section "Device"
         Option      "AccelMethod"        "exa"
         Option      "AccelMethod"        "exa"
        Driver      "radeon"
Identifier  "Card0"
   EndSection
Driver      "radeon"
BusID      "PCI:1:0:0"
   EndSection}}
   
   
 
= =
* [https://wiki.archlinux.org/index.php/ATI archlinux.org / ATI]
* [https://wiki.archlinux.org/index.php/Xorg archlinux.org / Xorg]


[[Category:Drivers]]
[[Category:Drivers]]

Revision as of 06:25, 25 May 2020

The following instructions are for modern AMD GPU chipsets covered by the radeon driver.

Setup Xorg/udev

  1. Run the setup-xorg-base script.
  2. Install the Xorg AMD video drivers:

    # apk add xf86-video-ati

  3. For newer devices, use:

    # apk add xf86-video-amdgpu

  4. Install the AMD firmware files:

    # apk add linux-firmware-amdgpu

  5. Enable #Kernel Modesetting (KMS). Specifically, the fbcon module is necessary, or leaving Xorg (via Ctrl+Alt+F1 or quitting) will result in a black screen until the machine is power cycled. If you have already launch Xorg and don't want to experience this effect, you can modprobe fbcon while Xorg is running.

Kernel Modesetting (KMS)

To enable KMS at boot:

  1. Add the radeon or amdgpu and fbcon modules to /etc/modules:

    $ echo radeon >> /etc/modules
    $ echo fbcon >> /etc/modules

    or

    $ echo amdgpu >> /etc/modules
    $ echo fbcon >> /etc/modules

  2. Install mkinitfs:

    apk add mkinitfs

  3. Enable the kms feature in the mkinitfs configuration by adding it to the features variable, e.g.,

    Contents of /etc/mkinitfs/mkinitfs.conf

    features="keymap cryptsetup kms ata base ide scsi usb virtio ext4"
  4. Run mkinitfs.
  5. Reboot to test the configuration.

Troubleshooting

Fixing MESA-LOADER errors

This material is obsolete ...

Alpine no longer ships with the linux-hardened kernel (Discuss)

The linux-hardened kernel package places restrictions on sysfs and will prevent the MESA-LOADER from working as a normal user even if added to the video group.

See https://bugs.alpinelinux.org/issues/7265

Either switch to the linux-vanilla package or apply the grsec_sysfs_restrict=0 kernel parameter to allow normal users to access hardware acceleration on the desktop.

Fixing a frozen X11 when invoking startx

You may need to set the AccelMethod to exa not glamor which is the default for the driver.

Contents of /etc/X11/xorg.conf

Section "Device" Option "AccelMethod" "exa" Identifier "Card0" Driver "radeon" BusID "PCI:1:0:0" EndSection