Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMD APU no display on kernels 6.2 and newer #3122

Open
igel-itzo opened this issue Aug 28, 2023 · 7 comments
Open

AMD APU no display on kernels 6.2 and newer #3122

igel-itzo opened this issue Aug 28, 2023 · 7 comments

Comments

@igel-itzo
Copy link

igel-itzo commented Aug 28, 2023

Distribution (run cat /etc/os-release):
PRETTY_NAME="Pop!_OS 22.04 LTS"

Related Application and/or Package Version (run apt policy $PACKAGE NAME):
linux-image-generic
linux-modules-*-generic

Issue/Bug Description:
Pop-OS! with kernel 6.2 and newer do not initialize display consistently on AMD APUs and do not generate signal. Tested Athlon 3000g, Ryzen 5600g, both HDMI and DP. Asrock x300 deskmini and Asrock x300 deskmeet, with various bios & agesa versions.
Reddit comments indicate 2400g may also be affected, and kernel mail-list also indicates laptops with amd apus affected in other ways.

kernel requires the argument amdgpu.ignore_crat=1 for proper display initialization. Other arguments (e.g. iommu modes and kfd settings) will also help initialize the display, but would have issues on standby, hibernation, virtualization ability or security.

Steps to reproduce (if you know):
Install Pop-OS! on AMD APU system with default settings, boot

Expected behavior:
Display initializes properly (e.g. into text console as safe mode, or the installer detects the need for the parameter and adds it to the kernel command line in a manner that persists though kernel package updates/upgrades)

Other Notes:
Arguably AMD broke the amdgpu and related drivers in 6.2 and they "fixed" it in 6.3. However even kernel 6.4.6 on Pop-OS! exhibits the behavior and requires the parameter added to the kernel command line (which is not an easy thing to do persistently though upgrades with Pop-OS!). It looks like AMD has acknowledged that further fixes are needed and they are prepping them for 6.5

@dx9s
Copy link

dx9s commented Aug 31, 2023

This this might be related to my issue. Will try rolling back to the latest 5.x kernel.

The laptop I have after the recently (talking a few days ago) update to a new kernel has remove the ability to change screen resolutions.. Only one option exists for the built in screen (2560x1600 and I like to change to 1280x800 for various things including playing games)

I understand this is probably a kernel upstream issue, but it seems to have caused an issue for my AMD (built in) GPU as well.

dx@pop-os:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Pop
Description:	Pop!_OS 22.04 LTS
Release:	22.04
Codename:	jammy
dx@pop-os:~$ uname -a
Linux pop-os 6.4.6-76060406-generic #202307241739~1692717645~22.04~5597803 SMP PREEMPT_DYNAMIC Tue A x86_64 x86_64 x86_64 GNU/Linux
 dx@pop-os:~$ lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         48 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  16
  On-line CPU(s) list:   0-15
Vendor ID:               AuthenticAMD
  Model name:            AMD Ryzen 7 6800U with Radeon Graphics
    CPU family:          25
    Model:               68
    Thread(s) per core:  2
    Core(s) per socket:  8
    Socket(s):           1
    Stepping:            1
    Frequency boost:     disabled
    CPU max MHz:         4767.1870
    CPU min MHz:         1600.0000
    BogoMIPS:            5389.53
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mc
                         a cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall n
                         x mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_go
                         od nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl p
                         ni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2api
                         c movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_le
                         gacy svm extapic cr8_legacy abm sse4a misalignsse 3dnow
                         prefetch osvw ibs skinit wdt tce topoext perfctr_core p
                         erfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw
                         _pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 
                         avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap c
                         lflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cq
                         m_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero 
                         irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm
                         _lock nrip_save tsc_scale vmcb_clean flushbyasid decode
                         assists pausefilter pfthreshold avic v_vmsave_vmload vg
                         if v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid ove
                         rflow_recov succor smca fsrm
Virtualization features: 
  Virtualization:        AMD-V
Caches (sum of all):     
  L1d:                   256 KiB (8 instances)
  L1i:                   256 KiB (8 instances)
  L2:                    4 MiB (8 instances)
  L3:                    16 MiB (1 instance)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-15
Vulnerabilities:         
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Not affected
  Retbleed:              Not affected
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer
                          sanitization
  Spectre v2:            Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIB
                         P always-on, RSB filling, PBRSB-eIBRS Not affected
  Srbds:                 Not affected
  Tsx async abort:       Not affected
dx@pop-os:~$ 

@dx9s
Copy link

dx9s commented Aug 31, 2023

Okay booted to "old/previous" kernel (hold space bar after bios screen) and now have a list of screen resolutions to choose from:

dx@pop-os:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Pop
Description:	Pop!_OS 22.04 LTS
Release:	22.04
Codename:	jammy
dx@pop-os:~$ uname -a
Linux pop-os 6.2.6-76060206-generic #202303130630~1685473338~22.04~995127e SMP PREEMPT_DYNAMIC Tue M x86_64 x86_64 x86_64 GNU/Linux
dx@pop-os:~$ lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         48 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  16
  On-line CPU(s) list:   0-15
Vendor ID:               AuthenticAMD
  Model name:            AMD Ryzen 7 6800U with Radeon Graphics
    CPU family:          25
    Model:               68
    Thread(s) per core:  2
    Core(s) per socket:  8
    Socket(s):           1
    Stepping:            1
    Frequency boost:     disabled
    CPU max MHz:         4767.1870
    CPU min MHz:         1600.0000
    BogoMIPS:            5389.93
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht 
                         syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid
                          aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx
                          f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs s
                         kinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ss
                         bd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap cl
                         flushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local
                          clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean f
                         lushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip pku ospke
                          vaes vpclmulqdq rdpid overflow_recov succor smca fsrm
Virtualization features: 
  Virtualization:        AMD-V
Caches (sum of all):     
  L1d:                   256 KiB (8 instances)
  L1i:                   256 KiB (8 instances)
  L2:                    4 MiB (8 instances)
  L3:                    16 MiB (1 instance)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-15
Vulnerabilities:         
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Not affected
  Retbleed:              Not affected
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP always-on, RSB filling, PBRSB-eIBRS Not affe
                         cted
  Srbds:                 Not affected
  Tsx async abort:       Not affected

@dx9s
Copy link

dx9s commented Aug 31, 2023

So there is something wrong with the newer kernels and AMDGPUs. For those curious on the older kernel

dx@pop-os:~$ lsgpu
card0                    1002:1681                         drm:/dev/dri/card0
└─renderD128                                               drm:/dev/dri/renderD128
dx@pop-os:~$ xrandr 
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 16384 x 16384
eDP connected primary 1280x800+0+0 (normal left inverted right x axis y axis) 217mm x 135mm
   2560x1600     60.01 +  40.00  
   1920x1200     60.01  
   1920x1080     60.01  
   1600x1200     60.01  
   1680x1050     60.01  
   1280x1024     60.01  
   1440x900      60.01  
   1280x800      60.01* 
   1280x720      60.01  
   1024x768      60.01  
   800x600       60.01  
   640x480       60.01  
HDMI-A-0 connected (normal left inverted right x axis y axis)
   1280x720      60.00 +  59.94  
   800x600       60.00  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
DisplayPort-2 disconnected (normal left inverted right x axis y axis)
DisplayPort-3 disconnected (normal left inverted right x axis y axis)
DisplayPort-4 disconnected (normal left inverted right x axis y axis)
DisplayPort-5 disconnected (normal left inverted right x axis y axis)

and the newer kernel:

dx@pop-os:~$ lsgpu
card0                    1002:1681                         drm:/dev/dri/card0
└─renderD128                                               drm:/dev/dri/renderD128
dx@pop-os:~$ xrandr 
Screen 0: minimum 320 x 200, current 2560 x 1600, maximum 16384 x 16384
eDP connected primary 2560x1600+0+0 (normal left inverted right x axis y axis) 217mm x 135mm
   2560x1600     60.01*+  40.00  
HDMI-A-0 connected (normal left inverted right x axis y axis)
   1280x720      60.00 +  59.94  
   800x600       60.00  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
DisplayPort-2 disconnected (normal left inverted right x axis y axis)
DisplayPort-3 disconnected (normal left inverted right x axis y axis)
DisplayPort-4 disconnected (normal left inverted right x axis y axis)
DisplayPort-5 disconnected (normal left inverted right x axis y axis)

Why did the modelines change?

@leviport
Copy link
Member

@dx9s I believe you're seeing pop-os/linux#269 which will be fixed by pop-os/linux#276, which will be released a bit later today.

@igel-itzo
Copy link
Author

igel-itzo commented Sep 1, 2023

@dx9s what you are reporting seems to be a different issue. The one I am referring to seems to stem from patch sets in this thread https://lore.kernel.org/amd-gfx/CADnq5_NmnX3mz16NcjBp--Z2Mu=io407Cuj4ShfVOQW=SdaBKA@mail.gmail.com/ in which amd made changes to kfd, and iommu memory handling. For most laptop users it will be seen as an issue where the system won't be able to resume after suspend, if it is able to boot into graphics at all.

@dx9s
Copy link

dx9s commented Sep 26, 2023

I just ran an update and it installed a new kernel. I was hoping it would fix the issue and it has not.

Luckily the kernel update didn't remove the older 6.2.6 kernel so I can still grub -> pick older kernel and get the ability to select more than one video resolution.

Not sure where I am supposed to report this issue, here or some place else. Everything is stock.. I fear an update will update to even new 6.4+ and remove the 6.2 kernal and things will be still broken. At least my notes here will help me to get the older kernel version so I can forcefully roll back to older kernel and have a work around for a while.. I've seen this problem (xrandr only display ONE modeiline for attached monitor) only once before on a System76 machine (still not fixed there either, years ago) and the display properties will ONLY show resolution options based on what xrandr shows. This laptop I own forces 4K video on the 4K laptop display, no way to select other resolutions other than using Xrandr to force GPU to scale from command like or the nvidia drivers to hack a way around it. Scaling just the fonts is a workaround that doesn't solve everything there.

But with this computer w/ amdgpu, I know this worked (past tense) and it was a recent kernel update that broke it.

@leviport
Copy link
Member

@dx9s I linked to the issue tracking the bug you're seeing, so posting there would be more appropriate since this thread is not about the same thing. As an update, the 6.4.11 kernel (with the fix, as I mentioned) couldn't be released because of a different bug. The 6.4.6 update you saw was just a small update to fix that bug. Since it wasn't a new version, it didn't replace the oldkern version, as you observed. The next update, which I believe will be 6.5.4 also has the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants