Difference between revisions of "Operating System Specific Workarounds/Debian"
JeremyRand (talk | contribs) (→AMD GPUs: OpenGL failure / rectangular boxes instead of fonts in GDM3: Link to Page size) |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
'''Cause''' | '''Cause''' | ||
− | The required open-source (libre) video driver module ( | + | The required open-source (libre) video driver module (<code>ast</code>) is not included in the installer package |
'''Upstream Bug Report''' | '''Upstream Bug Report''' | ||
Line 16: | Line 16: | ||
'''Status''' | '''Status''' | ||
− | Root cause found, | + | Root cause found, untested patch provided. |
'''Workaround''' | '''Workaround''' | ||
Line 24: | Line 24: | ||
* Install | * Install | ||
− | # With system power off, | + | # With system power off, connect to the [[BMC Client Console]]. |
− | |||
# Attach the Debian install media | # Attach the Debian install media | ||
# Power on the system | # Power on the system | ||
− | # When the Petitboot screen appears, select the Debian install option you want and press | + | # When the Petitboot screen appears, select the Debian install option you want and press <code>e</code> to edit |
− | # Highlight the "Boot arguments" field and append | + | # Highlight the "Boot arguments" field and append <code>console=hvc0</code> after <code>quiet</code>. Ensure there is at least one space between <code>quiet</code> and <code>console=hvc0</code>. |
# Highlight OK and press Enter | # Highlight OK and press Enter | ||
# Ensure the previously-selected Debian install option is still selected, then press Enter | # Ensure the previously-selected Debian install option is still selected, then press Enter | ||
Line 36: | Line 35: | ||
* Switch from serial to VGA text console | * Switch from serial to VGA text console | ||
− | # Edit /etc/initramfs-tools/modules and append | + | # Edit <code>/etc/initramfs-tools/modules</code> and append <code>ast</code> to it |
− | # As root, run update-initramfs -u -k all | + | # As root, run <code>update-initramfs -u -k all</code> |
− | # Edit /etc/default/grub and change the | + | # Edit <code>/etc/default/grub</code> and change the <code>console=hvc0</code> string to <code>console=tty0</code> |
− | # As root, run update-grub | + | # As root, run <code>update-grub</code> |
# Reboot | # Reboot | ||
Line 45: | Line 44: | ||
'''Cause''' | '''Cause''' | ||
− | There appears to be an oversight in Debian wherein when the | + | There appears to be an oversight in Debian wherein, when the <code>firmware-amd-graphics</code> package is installed, initramfs is not updated automatically to include the <code>amdgpu</code> module and the GPU firmware. |
'''Workaround''' | '''Workaround''' | ||
− | * Manually load amdgpu into initramfs | + | * Manually load <code>amdgpu</code> into initramfs |
− | #Append | + | #Append <code>amdgpu</code> to <code>/etc/initramfs-tools/modules</code> |
− | #As root, run update-initramfs -u | + | #As root, run <code>update-initramfs -u</code> |
− | #Edit /etc/default/grub and change GRUB_CMDLINE_LINUX= to GRUB_CMDLINE_LINUX="modprobe.blacklist=ast video=offb:off console=tty0" | + | #Edit <code>/etc/default/grub</code> and change <code>GRUB_CMDLINE_LINUX=</code> to <code>GRUB_CMDLINE_LINUX="modprobe.blacklist=ast video=offb:off console=tty0"</code> |
− | #Run update-grub as root | + | #Run <code>update-grub</code> as root |
#Shutdown | #Shutdown | ||
#With BMC power disconnected, ascertain that the J10109 jumper is set as disabled before booting again | #With BMC power disconnected, ascertain that the J10109 jumper is set as disabled before booting again | ||
+ | |||
+ | === AMD GPUs: OpenGL failure / rectangular boxes instead of fonts in GDM3 === | ||
+ | '''Cause''' | ||
+ | |||
+ | Debian ships a patched Linux kernel that introduces Debian-specific bugs in the AMD GPU driver. One of these bugs impacts all [[Page size|64KiB page size]] systems, including the default kernels for ppc64le, and leads to generic failure of most OpenGL applications, including failure of font rendering in Gnome applications and, most notably, GDM3. | ||
+ | |||
+ | '''Upstream Bug Report''' | ||
+ | |||
+ | https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990279 | ||
+ | |||
+ | '''Status''' | ||
+ | |||
+ | Fixed. | ||
+ | |||
+ | '''Workaround''' | ||
+ | |||
+ | Apply the patch in the listed bug report (and reproduced below) to the current Debian kernel, then recompile and install: | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="width:800px; overflow:auto;"> | ||
+ | <pre> | ||
+ | From 02c987eb2ab0cdfd536d08bf812f4e37d3cc150a Mon Sep 17 00:00:00 2001 | ||
+ | From: Huacai Chen <chenhc@lemote.com> | ||
+ | Date: Tue, 30 Mar 2021 23:33:33 +0800 | ||
+ | Subject: [PATCH] drm/amdgpu: Set a suitable dev_info.gart_page_size | ||
+ | MIME-Version: 1.0 | ||
+ | Content-Type: text/plain; charset=UTF-8 | ||
+ | Content-Transfer-Encoding: 8bit | ||
+ | |||
+ | commit f4d3da72a76a9ce5f57bba64788931686a9dc333 upstream. | ||
+ | |||
+ | In Mesa, dev_info.gart_page_size is used for alignment and it was | ||
+ | set to AMDGPU_GPU_PAGE_SIZE(4KB). However, the page table of AMDGPU | ||
+ | driver requires an alignment on CPU pages. So, for non-4KB page system, | ||
+ | gart_page_size should be max_t(u32, PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE). | ||
+ | |||
+ | Signed-off-by: Rui Wang <wangr@lemote.com> | ||
+ | Signed-off-by: Huacai Chen <chenhc@lemote.com> | ||
+ | Link: https://github.com/loongson-community/linux-stable/commit/caa9c0a1 | ||
+ | [Xi: rebased for drm-next, use max_t for checkpatch, | ||
+ | and reworded commit message.] | ||
+ | Signed-off-by: Xi Ruoyao <xry111@mengyan1223.wang> | ||
+ | BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1549 | ||
+ | Tested-by: Dan Horák <dan@danny.cz> | ||
+ | Reviewed-by: Christian König <christian.koenig@amd.com> | ||
+ | Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ||
+ | [Salvatore Bonaccorso: Backport to 5.10.y which does not contain | ||
+ | a5a52a43eac0 ("drm/amd/amdgpu/amdgpu_kms: Remove 'struct | ||
+ | drm_amdgpu_info_device dev_info' from the stack") which removes dev_info | ||
+ | from the stack and places it on the heap.] | ||
+ | Signed-off-by: Salvatore Bonaccorso <carnil@debian.org> | ||
+ | --- | ||
+ | drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++-- | ||
+ | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
+ | |||
+ | diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | ||
+ | index efda38349a03..917b94002f4b 100644 | ||
+ | --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | ||
+ | +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | ||
+ | @@ -766,9 +766,9 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file | ||
+ | dev_info.high_va_offset = AMDGPU_GMC_HOLE_END; | ||
+ | dev_info.high_va_max = AMDGPU_GMC_HOLE_END | vm_size; | ||
+ | } | ||
+ | - dev_info.virtual_address_alignment = max((int)PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE); | ||
+ | + dev_info.virtual_address_alignment = max_t(u32, PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE); | ||
+ | dev_info.pte_fragment_size = (1 << adev->vm_manager.fragment_size) * AMDGPU_GPU_PAGE_SIZE; | ||
+ | - dev_info.gart_page_size = AMDGPU_GPU_PAGE_SIZE; | ||
+ | + dev_info.gart_page_size = max_t(u32, PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE); | ||
+ | dev_info.cu_active_number = adev->gfx.cu_info.number; | ||
+ | dev_info.cu_ao_mask = adev->gfx.cu_info.ao_cu_mask; | ||
+ | dev_info.ce_ram_size = adev->gfx.ce_ram_size; | ||
+ | -- | ||
+ | 2.33.0 | ||
+ | </pre> | ||
+ | </div> | ||
+ | |||
+ | Note that compiling a new Debian kernel as shown requires 24GB or more free disk space, and that you will need to repeat this process every time a Debian kernel security update is released. To reduce load on all impacted users, if you are impacted we strongly recommend you help put pressure on the Debian maintainers to merge the tested and working patch that is languishing in the bug report above. | ||
+ | |||
+ | On a default Bullseye system: | ||
+ | # apt-get source linux-image-5.10.0-10-powerpc64le | ||
+ | # cd linux-5.10.* | ||
+ | # Patch drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | ||
+ | # make bindeb-pkg -j32 (adjust -j for number of CPUs to use for build) | ||
+ | # cd .. | ||
+ | # dpkg -i linux-image-5.10.*_5.10.*-1_ppc64el.deb |
Latest revision as of 21:10, 17 May 2023
Debian-Specific Issues and Workarounds
Contents
Bullseye
Blank VGA
Cause
The required open-source (libre) video driver module (ast
) is not included in the installer package
Upstream Bug Report
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990016
Status
Root cause found, untested patch provided.
Workaround
Debian can be installed via the serial console, then switched to VGA mode after installation (i.e. after the ASpeed driver module is available to the kernel). The following instructions assume you have SSH shell access to the BMC:
- Install
- With system power off, connect to the BMC Client Console.
- Attach the Debian install media
- Power on the system
- When the Petitboot screen appears, select the Debian install option you want and press
e
to edit - Highlight the "Boot arguments" field and append
console=hvc0
afterquiet
. Ensure there is at least one space betweenquiet
andconsole=hvc0
. - Highlight OK and press Enter
- Ensure the previously-selected Debian install option is still selected, then press Enter
- Install Debian normally
- Switch from serial to VGA text console
- Edit
/etc/initramfs-tools/modules
and appendast
to it - As root, run
update-initramfs -u -k all
- Edit
/etc/default/grub
and change theconsole=hvc0
string toconsole=tty0
- As root, run
update-grub
- Reboot
Blank output on GPU after blacklisting AST
Cause
There appears to be an oversight in Debian wherein, when the firmware-amd-graphics
package is installed, initramfs is not updated automatically to include the amdgpu
module and the GPU firmware.
Workaround
- Manually load
amdgpu
into initramfs
- Append
amdgpu
to/etc/initramfs-tools/modules
- As root, run
update-initramfs -u
- Edit
/etc/default/grub
and changeGRUB_CMDLINE_LINUX=
toGRUB_CMDLINE_LINUX="modprobe.blacklist=ast video=offb:off console=tty0"
- Run
update-grub
as root - Shutdown
- With BMC power disconnected, ascertain that the J10109 jumper is set as disabled before booting again
AMD GPUs: OpenGL failure / rectangular boxes instead of fonts in GDM3
Cause
Debian ships a patched Linux kernel that introduces Debian-specific bugs in the AMD GPU driver. One of these bugs impacts all 64KiB page size systems, including the default kernels for ppc64le, and leads to generic failure of most OpenGL applications, including failure of font rendering in Gnome applications and, most notably, GDM3.
Upstream Bug Report
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990279
Status
Fixed.
Workaround
Apply the patch in the listed bug report (and reproduced below) to the current Debian kernel, then recompile and install:
From 02c987eb2ab0cdfd536d08bf812f4e37d3cc150a Mon Sep 17 00:00:00 2001 From: Huacai Chen <chenhc@lemote.com> Date: Tue, 30 Mar 2021 23:33:33 +0800 Subject: [PATCH] drm/amdgpu: Set a suitable dev_info.gart_page_size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit f4d3da72a76a9ce5f57bba64788931686a9dc333 upstream. In Mesa, dev_info.gart_page_size is used for alignment and it was set to AMDGPU_GPU_PAGE_SIZE(4KB). However, the page table of AMDGPU driver requires an alignment on CPU pages. So, for non-4KB page system, gart_page_size should be max_t(u32, PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE). Signed-off-by: Rui Wang <wangr@lemote.com> Signed-off-by: Huacai Chen <chenhc@lemote.com> Link: https://github.com/loongson-community/linux-stable/commit/caa9c0a1 [Xi: rebased for drm-next, use max_t for checkpatch, and reworded commit message.] Signed-off-by: Xi Ruoyao <xry111@mengyan1223.wang> BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1549 Tested-by: Dan Horák <dan@danny.cz> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> [Salvatore Bonaccorso: Backport to 5.10.y which does not contain a5a52a43eac0 ("drm/amd/amdgpu/amdgpu_kms: Remove 'struct drm_amdgpu_info_device dev_info' from the stack") which removes dev_info from the stack and places it on the heap.] Signed-off-by: Salvatore Bonaccorso <carnil@debian.org> --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index efda38349a03..917b94002f4b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -766,9 +766,9 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file dev_info.high_va_offset = AMDGPU_GMC_HOLE_END; dev_info.high_va_max = AMDGPU_GMC_HOLE_END | vm_size; } - dev_info.virtual_address_alignment = max((int)PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE); + dev_info.virtual_address_alignment = max_t(u32, PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE); dev_info.pte_fragment_size = (1 << adev->vm_manager.fragment_size) * AMDGPU_GPU_PAGE_SIZE; - dev_info.gart_page_size = AMDGPU_GPU_PAGE_SIZE; + dev_info.gart_page_size = max_t(u32, PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE); dev_info.cu_active_number = adev->gfx.cu_info.number; dev_info.cu_ao_mask = adev->gfx.cu_info.ao_cu_mask; dev_info.ce_ram_size = adev->gfx.ce_ram_size; -- 2.33.0
Note that compiling a new Debian kernel as shown requires 24GB or more free disk space, and that you will need to repeat this process every time a Debian kernel security update is released. To reduce load on all impacted users, if you are impacted we strongly recommend you help put pressure on the Debian maintainers to merge the tested and working patch that is languishing in the bug report above.
On a default Bullseye system:
- apt-get source linux-image-5.10.0-10-powerpc64le
- cd linux-5.10.*
- Patch drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
- make bindeb-pkg -j32 (adjust -j for number of CPUs to use for build)
- cd ..
- dpkg -i linux-image-5.10.*_5.10.*-1_ppc64el.deb