< Blog

Old ATI graphics crashing on boot with Linux

July 27, 2018

As of 2018, the Linux kernel seems to have an issue with some ATI laptop GPUs from the R500 range (circa 2005-2006), such as the Mobility Radeon X1300 and X1400. Booting most Linux distributions on an affected device (such as a ThinkPad T60 equipped with the Mobility Radeon X1300) will result in a blank screen and a semi-responsive system: on Debian, it does connect to a wired network and obtain a DHCP lease, but sshd does not start up.

Disabling the accelerated radeon driver by setting nomodeset or modprobe.blacklist=radeon on the kernel command line allows the system to boot up. Once booted with the radeon module blacklisted, running modprobe radeon to manually load it triggers a kernel oops:

[ 1887.690895] [drm] radeon kernel modesetting enabled.
[ 1887.691335] [drm] initializing kernel modesetting (RV515 0x1002:0x7149 0x17AA:0x2005 0x00).
[ 1887.691830] ATOM BIOS: M54CSP/M52CSP
[ 1887.691861] [drm] Generation 2 PCI interface, using max accessible memory
[ 1887.691869] radeon 0000:01:00.0: VRAM: 128M 0x0000000000000000 - 0x0000000007FFFFFF (64M used)
[ 1887.691873] radeon 0000:01:00.0: GTT: 512M 0x0000000008000000 - 0x0000000027FFFFFF
[ 1887.693304] [drm] Detected VRAM RAM=128M, BAR=128M
[ 1887.693307] [drm] RAM width 64bits DDR
[ 1887.693413] [TTM] Zone  kernel: Available graphics memory: 440506 kiB
[ 1887.693415] [TTM] Zone highmem: Available graphics memory: 512638 kiB
[ 1887.693416] [TTM] Initializing pool allocator
[ 1887.693423] [TTM] Initializing DMA pool allocator
[ 1887.693474] [drm] radeon: 64M of VRAM memory ready
[ 1887.693476] [drm] radeon: 512M of GTT memory ready.
[ 1887.693497] [drm] GART: num cpu pages 131072, num gpu pages 131072
[ 1887.694481] [drm] radeon: power management initialized
[ 1887.705319] [drm] radeon: 1 quad pipes, 1 z pipes initialized.
[ 1887.707819] [drm] PCIE GART of 512M enabled (table at 0x0000000000040000).
[ 1887.707873] radeon 0000:01:00.0: WB enabled
[ 1887.707880] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000008000000 and cpu addr 0x57b36282
[ 1887.707886] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1887.707887] [drm] Driver supports precise vblank timestamp query.
[ 1887.707889] radeon 0000:01:00.0: radeon: MSI limited to 32-bit
[ 1887.707906] [drm] radeon: irq initialized.
[ 1887.707919] [drm] Loading R500 Microcode
[ 1887.707939] radeon 0000:01:00.0: firmware: failed to load radeon/R520_cp.bin (-2)
[ 1887.708042] radeon 0000:01:00.0: Direct firmware load for radeon/R520_cp.bin failed with error -2
[ 1887.708120] [drm:r100_cp_init [radeon]] *ERROR* Failed to load firmware!
[ 1887.708186] radeon 0000:01:00.0: failed initializing CP (-2).
[ 1887.708249] radeon 0000:01:00.0: Disabling GPU acceleration
[ 1887.708309] [drm] radeon: cp finalized
[ 1887.709440] [drm] Radeon Display Connectors
[ 1887.709442] [drm] Connector 0:
[ 1887.709443] [drm]   VGA-1
[ 1887.709446] [drm]   DDC: 0x7e40 0x7e40 0x7e44 0x7e44 0x7e48 0x7e48 0x7e4c 0x7e4c
[ 1887.709447] [drm]   Encoders:
[ 1887.709448] [drm]     CRT1: INTERNAL_KLDSCP_DAC1
[ 1887.709449] [drm] Connector 1:
[ 1887.709450] [drm]   LVDS-1
[ 1887.709453] [drm]   DDC: 0x7e60 0x7e60 0x7e64 0x7e64 0x7e68 0x7e68 0x7e6c 0x7e6c
[ 1887.709453] [drm]   Encoders:
[ 1887.709455] [drm]     LCD1: INTERNAL_LVTM1
[ 1887.709456] [drm] Connector 2:
[ 1887.709457] [drm]   DVI-I-1
[ 1887.709458] [drm]   HPD1
[ 1887.709460] [drm]   DDC: 0x7e50 0x7e50 0x7e54 0x7e54 0x7e58 0x7e58 0x7e5c 0x7e5c
[ 1887.709461] [drm]   Encoders:
[ 1887.709462] [drm]     DFP1: INTERNAL_KLDSCP_TMDS1
[ 1888.072596] [drm] fb mappable at 0xD8040000
[ 1888.072599] [drm] vram apper at 0xD8000000
[ 1888.072600] [drm] size 3145728
[ 1888.072601] [drm] fb depth is 24
[ 1888.072602] [drm]    pitch is 4096
[ 1888.072744] fbcon: radeondrmfb (fb0) is primary device
[ 1888.096241] PCI registers are not implemented
[ 1888.096255] BUG: unable to handle kernel NULL pointer dereference at 00000124
[ 1888.096363] IP: atom_get_src_int+0x5c6/0x6a0 [radeon]
[ 1888.096365] *pdpt = 0000000033e73001 *pde = 0000000000000000
[ 1888.096372] Oops: 0000 [#1] SMP
[ 1888.096375] Modules linked in: radeon(+) ttm drm_kms_helper drm i2c_algo_bit fuse appletalk ax25 ipx(C) p8023 p8022 psnap llc coretemp kvm irqbypass evdev arc4 iwl3945 joydev pcspkr pcmcia iTCO_wdt iTCO_vendor_support snd_hda_codec_analog snd_hda_codec_generic iwlegacy serio_raw sg mac80211 snd_hda_intel yenta_socket pcmcia_rsrc cfg80211 snd_hda_codec pcmcia_core snd_hda_core snd_hwdep snd_pcm thinkpad_acpi snd_timer nvram snd soundcore rfkill shpchp battery ac tpm_tis tpm_tis_core tpm rng_core video button acpi_cpufreq ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 crc32c_generic fscrypto ecb crypto_simd cryptd aes_i586 uas usb_storage sd_mod sr_mod cdrom ata_generic ata_piix psmouse libata scsi_mod i2c_i801 ehci_pci uhci_hcd ehci_hcd lpc_ich usbcore usb_common e1000e ptp pps_core thermal
[ 1888.096494] CPU: 1 PID: 1064 Comm: modprobe Tainted: G         C       4.16.0-2-686-pae #1 Debian 4.16.12-1
[ 1888.096496] Hardware name: LENOVO 200746P/200746P, BIOS 79ET61WW (1.06 ) 05/24/2006
[ 1888.096588] EIP: atom_get_src_int+0x5c6/0x6a0 [radeon]
[ 1888.096590] EFLAGS: 00010202 CPU: 1
[ 1888.096594] EAX: 00000000 EBX: 00000049 ECX: f3e2d718 EDX: 00000009
[ 1888.096597] ESI: f3eb0000 EDI: 00000000 EBP: f3e2d6d8 ESP: f3e2d6b8
[ 1888.096600]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[ 1888.096603] CR0: 80050033 CR2: 00000124 CR3: 2df130a0 CR4: 000006f0
[ 1888.096607] Call Trace:
[ 1888.096703]  atom_op_div+0x7d/0x150 [radeon]
[ 1888.096795]  ? atom_op_setfbbase+0xa0/0xa0 [radeon]
[ 1888.096887]  atom_execute_table_locked+0xf5/0x2f0 [radeon]
[ 1888.096981]  atom_execute_table_scratch_unlocked+0x53/0x70 [radeon]
[ 1888.097073]  atom_execute_table+0x2b/0x40 [radeon]
[ 1888.097179]  atombios_digital_setup+0x17b/0x2b0 [radeon]
[ 1888.097286]  ? radeon_atom_encoder_dpms+0x140/0x140 [radeon]
[ 1888.097391]  radeon_atom_encoder_mode_set+0x29c/0x370 [radeon]
[ 1888.097404]  ? drm_crtc_helper_set_mode+0x37c/0x560 [drm_kms_helper]
[ 1888.097510]  ? radeon_atom_encoder_dpms+0x140/0x140 [radeon]
[ 1888.097520]  drm_crtc_helper_set_mode+0x399/0x560 [drm_kms_helper]
[ 1888.097541]  drm_crtc_helper_set_config+0x75d/0x8a0 [drm_kms_helper]
[ 1888.097640]  radeon_crtc_set_config+0x44/0x110 [radeon]
[ 1888.097664]  __drm_mode_set_config_internal+0x53/0xd0 [drm]
[ 1888.097759]  ? radeon_crtc_cursor_move+0x40/0x40 [radeon]
[ 1888.097780]  drm_mode_set_config_internal+0x21/0x40 [drm]
[ 1888.097791]  restore_fbdev_mode+0xcf/0x150 [drm_kms_helper]
[ 1888.097802]  drm_fb_helper_restore_fbdev_mode_unlocked+0x46/0xa0 [drm_kms_helper]
[ 1888.097813]  drm_fb_helper_set_par+0x2a/0x60 [drm_kms_helper]
[ 1888.097821]  fbcon_init+0x4ae/0x610
[ 1888.097829]  visual_init+0xc0/0x120
[ 1888.097835]  do_bind_con_driver+0x178/0x340
[ 1888.097841]  ? device_create_groups_vargs+0x61/0xd0
[ 1888.097847]  do_take_over_console+0x72/0x180
[ 1888.097852]  do_fbcon_takeover+0x5d/0xd0
[ 1888.097857]  fbcon_event_notify+0x587/0x760
[ 1888.097862]  ? fbcon_scroll+0xd30/0xd30
[ 1888.097868]  notifier_call_chain+0x51/0x80
[ 1888.097873]  blocking_notifier_call_chain+0x3b/0x50
[ 1888.097878]  fb_notifier_call_chain+0x16/0x20
[ 1888.097882]  register_framebuffer+0x21c/0x350
[ 1888.097895]  __drm_fb_helper_initial_config_and_unlock+0x211/0x470 [drm_kms_helper]
[ 1888.097907]  drm_fb_helper_initial_config+0x35/0x40 [drm_kms_helper]
[ 1888.098003]  radeon_fbdev_init+0xe6/0x150 [radeon]
[ 1888.098098]  radeon_modeset_init+0x441/0x950 [radeon]
[ 1888.098187]  radeon_driver_load_kms+0x187/0x2a0 [radeon]
[ 1888.098208]  drm_dev_register+0x133/0x1b0 [drm]
[ 1888.098229]  drm_get_pci_dev+0x86/0x160 [drm]
[ 1888.098316]  radeon_pci_probe+0x111/0x160 [radeon]
[ 1888.098324]  ? __pm_runtime_resume+0x51/0x80
[ 1888.098411]  ? radeon_pmops_runtime_idle+0xa0/0xa0 [radeon]
[ 1888.098416]  pci_device_probe+0xc7/0x160
[ 1888.098422]  driver_probe_device+0x2dc/0x470
[ 1888.098427]  __driver_attach+0xb1/0xe0
[ 1888.098431]  ? driver_probe_device+0x470/0x470
[ 1888.098436]  bus_for_each_dev+0x5a/0x90
[ 1888.098440]  driver_attach+0x19/0x20
[ 1888.098444]  ? driver_probe_device+0x470/0x470
[ 1888.098448]  bus_add_driver+0x12f/0x230
[ 1888.098452]  ? 0xf86b2000
[ 1888.098456]  driver_register+0x56/0xd0
[ 1888.098459]  ? 0xf86b2000
[ 1888.098463]  __pci_register_driver+0x3d/0x40
[ 1888.098548]  radeon_init+0x8c/0xaa [radeon]
[ 1888.098554]  do_one_initcall+0x49/0x168
[ 1888.098561]  ? free_unref_page_commit+0x73/0xe0
[ 1888.098567]  ? _cond_resched+0x17/0x40
[ 1888.098573]  ? kmem_cache_alloc_trace+0x107/0x1d0
[ 1888.098578]  ? do_init_module+0x21/0x1dc
[ 1888.098582]  ? do_init_module+0x21/0x1dc
[ 1888.098587]  do_init_module+0x50/0x1dc
[ 1888.098593]  load_module.constprop.56+0x1d40/0x25f0
[ 1888.098603]  SyS_finit_module+0x8a/0xe0
[ 1888.098611]  do_fast_syscall_32+0x7f/0x1b0
[ 1888.098616]  entry_SYSENTER_32+0x4e/0x7c
[ 1888.098618] EIP: 0xb7f4ad09
[ 1888.098620] EFLAGS: 00000292 CPU: 1
[ 1888.098623] EAX: ffffffda EBX: 00000007 ECX: 004391cc EDX: 00000000
[ 1888.098627] ESI: 0221d980 EDI: 0221d120 EBP: 00000000 ESP: bf93cd1c
[ 1888.098630]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b
[ 1888.098633] Code: ff ff 8b 0d 38 9d a8 f8 85 c9 0f 84 6b fd ff ff 56 68 46 66 a7 f8 e8 69 d3 75 e1 58 5a e9 59 fd ff ff 8d 76 00 8b 45 e4 8b 40 08  1c 98 e9 a6 fa ff ff 53 68 0a 66 a7 f8 e8 46 d3 75 e1 5e 58
[ 1888.098799] EIP: atom_get_src_int+0x5c6/0x6a0 [radeon] SS:ESP: 0068:f3e2d6b8
[ 1888.098801] CR2: 0000000000000124
[ 1888.098806] ---[ end trace 99335fff91d33938 ]---

One line in the kernel oops log stood out to me and the helpful people on #radeon IRC:

[ 1888.096496] Hardware name: LENOVO 200746P/200746P, BIOS 79ET61WW (1.06 ) 05/24/2006

This ThinkPad T60 is running an early BIOS revision from 2006, probably containing an old video BIOS which the radeon mode-setting driver doesn’t like. The latest BIOS revision for a non-widescreen T60 is 79ETE7WW (2.27 ) 03/21/2011. I updated to it through a bootable MS-DOS USB drive (IBM/Lenovo BIOS updaters do not work on FreeDOS) and started up the same Debian testing system which was giving me trouble before. It now boots properly with the radeon module enabled (see kernel log below), and everything including 2D acceleration appears to work.

[   15.176836] [drm] radeon kernel modesetting enabled.
[   15.177318] [drm] initializing kernel modesetting (RV515 0x1002:0x7149 0x17AA:0x2005 0x00).
[   15.177374] resource sanity check: requesting [mem 0x000c0000-0x000dffff], which spans more than PCI Bus 0000:00 [mem 0x000d4000-0x000d7fff window]
[   15.177381] caller pci_map_rom+0x66/0x110 mapping multiple BARs
[   15.177748] ATOM BIOS: M64CSP/M62CSP/M54CSP/M52CSP
[   15.177785] [drm] Generation 2 PCI interface, using max accessible memory
[   15.177792] radeon 0000:01:00.0: VRAM: 128M 0x0000000000000000 - 0x0000000007FFFFFF (64M used)
[   15.177795] radeon 0000:01:00.0: GTT: 512M 0x0000000008000000 - 0x0000000027FFFFFF
[   15.178933] [drm] Detected VRAM RAM=128M, BAR=128M
[   15.178937] [drm] RAM width 64bits DDR
[   15.179064] [TTM] Zone  kernel: Available graphics memory: 440490 kiB
[   15.179066] [TTM] Zone highmem: Available graphics memory: 512590 kiB
[   15.179067] [TTM] Initializing pool allocator
[   15.179074] [TTM] Initializing DMA pool allocator
[   15.179129] [drm] radeon: 64M of VRAM memory ready
[   15.179130] [drm] radeon: 512M of GTT memory ready.
[   15.179151] [drm] GART: num cpu pages 131072, num gpu pages 131072
[   15.180179] [drm] radeon: power management initialized
[   15.189480] [drm] radeon: 1 quad pipes, 1 z pipes initialized.
[   15.191979] [drm] PCIE GART of 512M enabled (table at 0x0000000000040000).
[   15.192068] radeon 0000:01:00.0: WB enabled
[   15.192074] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000008000000 and cpu addr 0x90f68200
[   15.192077] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[   15.192078] [drm] Driver supports precise vblank timestamp query.
[   15.192081] radeon 0000:01:00.0: radeon: MSI limited to 32-bit
[   15.192105] [drm] radeon: irq initialized.
[   15.192122] [drm] Loading R500 Microcode
[   15.192152] radeon 0000:01:00.0: firmware: failed to load radeon/R520_cp.bin (-2)
[   15.192270] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
[   15.192381] radeon 0000:01:00.0: Direct firmware load for radeon/R520_cp.bin failed with error -2
[   15.192454] [drm:r100_cp_init [radeon]] *ERROR* Failed to load firmware!
[   15.192567] radeon 0000:01:00.0: failed initializing CP (-2).
[   15.192672] radeon 0000:01:00.0: Disabling GPU acceleration
[   15.192782] [drm] radeon: cp finalized
[   15.193956] [drm] Radeon Display Connectors
[   15.193958] [drm] Connector 0:
[   15.193959] [drm]   VGA-1
[   15.193962] [drm]   DDC: 0x7e40 0x7e40 0x7e44 0x7e44 0x7e48 0x7e48 0x7e4c 0x7e4c
[   15.193963] [drm]   Encoders:
[   15.193964] [drm]     CRT1: INTERNAL_KLDSCP_DAC1
[   15.193966] [drm] Connector 1:
[   15.193967] [drm]   LVDS-1
[   15.193969] [drm]   DDC: 0x7e60 0x7e60 0x7e64 0x7e64 0x7e68 0x7e68 0x7e6c 0x7e6c
[   15.193970] [drm]   Encoders:
[   15.193971] [drm]     LCD1: INTERNAL_LVTM1
[   15.193972] [drm] Connector 2:
[   15.193973] [drm]   DVI-I-1
[   15.193974] [drm]   HPD1
[   15.193977] [drm]   DDC: 0x7e50 0x7e50 0x7e54 0x7e54 0x7e58 0x7e58 0x7e5c 0x7e5c
[   15.193977] [drm]   Encoders:
[   15.193979] [drm]     DFP1: INTERNAL_KLDSCP_TMDS1
[   15.566150] [drm] fb mappable at 0xD8040000
[   15.566152] [drm] vram apper at 0xD8000000
[   15.566153] [drm] size 3145728
[   15.566155] [drm] fb depth is 24
[   15.566156] [drm]    pitch is 4096
[   15.566296] fbcon: radeondrmfb (fb0) is primary device
[   15.688090] [drm] Initialized radeon 2.50.0 20080528 for 0000:01:00.0 on minor 0

Lesson learned: if you’re having weird issues with Linux like this one, try updating your system’s BIOS.

Last update: Sep 19, 2023