Not using pageflips on recent AMD RDNA 4 gpu's on Ubuntu 24.04, Debian 13

Disclaimer
Yes, I am willing to contribute by testing with the new hardware.
Yes, I am willing to use the payed support if needed.
We do have payed licenses.

Describe the bug
New computer with new GPU “Navi RX 9060 XT”

1. Message “didn’t use pageflipping for flip” in Screen.
2. Bad syncing behaviour
3. Maybe related: message in debuglevel 10 of an unsupported (too new) GPU.

To Reproduce
Connect the Monitor to Displayport out of gpu
(Same effect occurs with multiple monitors with Zaphodheads and XOrgConfCreator and -Selector)
Ensure compositor in KDE is off and allows “block”.
Install octave (version 9.4.0) and PTB (version 3.0.22.2) from Neurodebian.
Run octave
PsychLinuxConfiguration
[win,rect]=PsychImaging('OpenWindow',max(Screen("Screens")),0)
PerceptualVBLSyncTest()

Error messages are
for PsychImaging

PTB-INFO: Advanced Micro Devices, Inc. [AMD/ATI] - Navi 44 [RX 9060 XT] GPU found. Trying to establish low-level access…

[and if debug=10, then]

PTB-INFO: Unsupported AMD gpu for low-level access tricks, either it is a new DCN gpu, or unknown to us [pciid = 0x7590].

and for VBLSynctest

PTB-WARNING: Flip nnn for window 10 didn’t use pageflipping for flip. Visual presentation timing and timestamps are likely unreliable.
PTB-WARNING: Something is misconfigured on your system, otherwise pageflipping would have been used…

Expected behavior
Proper syncing

Screenshots
If applicable → no; while PerceptualVBLSynvtest lots of jumping black lines near top of screen.

Desktop (please complete the following information):

  • OS: Debian 13.5
  • Runtime: Octave 9.4.0
  • Hardware: Graphicscard RX 9060 XT
  • Version: PsychtoolboxVersion 3.0.22 Flavor: Debian package - psychtoolbox-3 (3.0.22.2)

Additional context
In https://psychtoolbox.org/requirements states

Later generation Navi gpus seem to also work well, according to some user reports, but are not yet tested by the developers due to lack of hardware. They do lack support for some special, but rarely needed, Psychtoolbox low-level debug features.

And in the Forum in 2021 already there was a hint

but functionality-wise this gives me some confidence that older Vega gpu’s and more modern Navi gpu’s should work well.

Since syncing is not only “rarely” needed, I had expected these GPUs to be compatible.

What can I check myself?
in order to distinguish between a really “too new” issue and this GPU still is incompatible?
Are there workarounds available for proper syncing?

Thanks a lot for any suggestions!
Uli, Uni-Tuebingen

Hi Uli

My suspicion, which a standard Google AI search also suggests may be right (and gives references to Reddit threads and Phoronix to back this up), is that Debian 13.5 standard installations are just too old for that graphics card to work fully and bug free. It is supposed to work well on modern distributions, according to the wisdom of the internet. The card is “only” one year old, and Debian stable is known to be rather outdated at any given point in time when it comes to modern software and especially modern hardware support.

Debian 13.5 aka stable aka Trixie seems to ship Linux 6.12.90 and Mesa 25.0.7 atm., whereas the AI search suggests that at the minimum Linux 6.14 and Mesa 25.0 is required and better Linux 6.15 or later and Mesa 25.1 or later. For comparison, the latest Ubuntu 26.04-LTS ships Linux 7.0 and Mesa 26.0.

The “trixie backports” repo seems to have recent modern Linux 7.0 and a less outdated Mesa 25.2.6, which should be in better or good shape, so I think upgrading to that would be the first thing to try.

I do not test with Debian at all, due to lack of time and resources, but also because of its out of date state. Exception is RaspberryPi OS 13 ~ Trixie as the most modern standard distribution for RaspberryPi. Debian testing or even unstable might be a better choice if you want to use Debian on modern hardware.

The latest properly tested distro is Ubuntu 24.04-LTS.

Testing is ongoing for Ubuntu 26.04-LTS. So far without obvious trouble regarding the basics under KDE, but more testing is needed, and right now other Linux things (development as prep work for the future regarding the Linux graphics and display stack) which are on deadlines have priority. Ubuntu 26.04-LTS or Debian unstable (from which Ubuntu is derived) do have interesting improvements in graphics and sound - some of which will only be supported in a future PTB. Downside is that Ubuntu desktop and GNOME desktop are now “Wayland only” and thereby unusable with current PTB. Also Octave in those is too modern atm. to be supported by current PTB.

Hi Mario,

thanks a lot for the informations! Yes, because of Wayland, I did not consider Ubuntu.

So I installed kernel and mesa from backport and obtained new versions

glxinfo -B
Extended rendering info (GLX_MESA_query_renderer)
Device: AMD Radeon Graphics (radeonsi, gfx1200, ACO, DRM 3.64, 7.0.10+deb13-amd64) (0x7590)
Version: 25.2.6

but no luck, still the “didn’t use pageflipping” and “Unsupported AMD gpu for low-level access tricks” in verbosity 10.

Did I miss another upgrade besides all mesa* and *mesa packages, linux packages and libgbm1 and reinstalling octave and ptb?
Did I miss an additional configuration step besides PsychLinuxConfiguration and removing xorg.conf for single monitor setup?

Otherwise next step will be installing kubuntu 2024 LTS.

Now I installed Kubuntu 2024-04-LTS, upgraded to linux 6.17.0-35-generic, mesa 25.2.8, octave 8.4.0.
Ensured XDG_SESSION_TYPE=x11
PTB in ubuntu repos is available in version 3.0.19.5, so I installed version 3.0.22.2 from neurodebian.

But: the same output “didn’t use pageflipping” and “Unsupported AMD gpu”.

All other info about mesa, radeonsi, vulkan, … seems to proof everything working close to perfect.

Is there more, I could try? Thanks in advance!

That’s not good.

Does VBLSyncTest or PerceptualVBLSyncTest with the optional ‘useVulkan’ flag set to 1 work?

If you run XOrgConfCreator(1) for expert mode, and answer “Use advanced settings?” with yes and “Use modesetting driver …?” with yes and select the created xorg.conf, does that change anything?

Hi Mario,

thanks for the suggestions! Yes, modesetting changes to the good.

Background: Single monitor setup (Displayport)

XOrgConfCreator(1) provides modesetting, other I answered “don’t care”, that gave

Section "Device"
  Identifier  "Card0"
  Driver      "modesetting"
EndSection

For comparison: old behaviour before modesetting:

octave:1> VBLSyncTest([], [], [], [], [], [], [], [], 1)
PsychVulkanCore-INFO: Vulkan instance (version 1.3.275) created.
WARNING: radv is not a conformant Vulkan implementation, testing use only.

(lots of)
PTB-WARNING: Flip 57 for window 10 didn't use pageflipping for flip. Visual presentation timing and timestamps are likely unreliable!
PTB-WARNING: Something is misconfigured on your system, otherwise pageflipping would have been used by the graphics driver for reliable timing.

PTB-INFO: OpenGL-Renderer is AMD :: AMD Radeon Graphics (radeonsi, gfx1200, LLVM 20.1.2, DRM 3.64, 6.17.0-35-generic) :: 4.6 (Compatibility Profile) Mesa 25.2.8-0ubuntu0.24.04.1
PTB-INFO: Screen 0 : Window 10 : VBL startline = 1200 : VBL Endline = -1
PTB-INFO: Will try to use OS-Builtin OpenML sync control support for accurate Flip timestamping.
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.680622 ms [59.949802 Hz]. (50 valid samples taken, stddev=0.000751 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 16.680845 ms [59.949001 Hz].
PTB-INFO: Using usercode override framebuffer rect [0, 0, 1920, 1200] for image processing.
PTB-INFO: Psychtoolbox imaging pipeline starting up for window with requested imagingmode 1049601 ...
PTB-INFO: Will use 8 bits per color component framebuffer for stimulus drawing.
PTB-INFO: Will use 8 bits per color component framebuffer for any stimulus post-processing.
PTB-INFO: No image processing needed. Enabling zero-copy redirected output mode.
PsychVulkan-INFO: Positioning onscreen window at rect [0, 0, 1920, 1200] to align with display output 0 [DisplayPort-1] of screen 0.
The refresh interval reported by the operating system is 16.66667 ms.
libptbdrawtext_ftgl: External 'DrawText' text rendering plugin initialized.
libptbdrawtext_ftgl: Maximum number of cacheable fonts is 40, minimum number of supported concurrent windows is 10.
libptbdrawtext_ftgl: This plugin uses multiple excellent free software libraries to do its work:
libptbdrawtext_ftgl: OGLFT (http://oglft.sourceforge.net/) the OpenGL-FreeType library.
libptbdrawtext_ftgl: The FreeType-2 (http://freetype.sourceforge.net/) library.
libptbdrawtext_ftgl: The FontConfig (http://www.fontconfig.org) library. Version Id: 21500
libptbdrawtext_ftgl: Thanks!

Measured refresh interval, as reported by "GetFlipInterval" is 16.66667 ms. (nsamples = 1, stddev = 0.00000 ms)
PTB missed 0 out of 600 stimulus presentation deadlines.
One missed deadline is ok and an artifact of the measurement.
PTB completed 0 stimulus presentations before the requested target time.

New bahviour with modesetting and useVulkan:

octave:1> VBLSyncTest([], [], [], [], [], [], [], [], 1)
PsychVulkanCore-INFO: Vulkan instance (version 1.3.275) created.
WARNING: radv is not a conformant Vulkan implementation, testing use only.
PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under GNU/Octave 64-Bit Intel (Version 3.0.22 - Build date: Mar 17 2026).
PTB-INFO: OS support status: Linux 6.17.0-35-generic Supported.
PTB-INFO: External display method is in use for this window. Running short and lenient timing tests only.
PTB-INFO: OpenGL-Renderer is AMD :: AMD Radeon Graphics (radeonsi, gfx1200, LLVM 20.1.2, DRM 3.64, 6.17.0-35-generic) :: 4.6 (Compatibility Profile) Mesa 25.2.8-0ubuntu0.24.04.1
PTB-INFO: Screen 0 : Window 10 : VBL startline = 1200 : VBL Endline = -1
PTB-INFO: Will try to use OS-Builtin OpenML sync control support for accurate Flip timestamping.
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.680317 ms [59.950899 Hz]. (50 valid samples taken, stddev=0.003900 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 16.680845 ms [59.949001 Hz].
PTB-INFO: Using usercode override framebuffer rect [0, 0, 1920, 1200] for image processing.
PTB-INFO: Psychtoolbox imaging pipeline starting up for window with requested imagingmode 1049601 ...
PTB-INFO: Will use 8 bits per color component framebuffer for stimulus drawing.
PTB-INFO: Will use 8 bits per color component framebuffer for any stimulus post-processing.
PTB-INFO: No image processing needed. Enabling zero-copy redirected output mode.
PsychVulkan-INFO: Positioning onscreen window at rect [0, 0, 1920, 1200] to align with display output 0 [DP-2] of screen 0.
The refresh interval reported by the operating system is 16.66667 ms.
libptbdrawtext_ftgl: External 'DrawText' text rendering plugin initialized.
libptbdrawtext_ftgl: Maximum number of cacheable fonts is 40, minimum number of supported concurrent windows is 10.
libptbdrawtext_ftgl: This plugin uses multiple excellent free software libraries to do its work:
libptbdrawtext_ftgl: OGLFT (http://oglft.sourceforge.net/) the OpenGL-FreeType library.
libptbdrawtext_ftgl: The FreeType-2 (http://freetype.sourceforge.net/) library.
libptbdrawtext_ftgl: The FontConfig (http://www.fontconfig.org) library. Version Id: 21500
libptbdrawtext_ftgl: Thanks!

Measured refresh interval, as reported by "GetFlipInterval" is 16.66667 ms. (nsamples = 1, stddev = 0.00000 ms)
PTB missed 0 out of 600 stimulus presentation deadlines.
One missed deadline is ok and an artifact of the measurement.
PTB completed 0 stimulus presentations before the requested target time.

New behaviour with only modesetting, no useVulkan

octave:2> VBLSyncTest

PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under GNU/Octave 64-Bit Intel (Version 3.0.22 - Build date: Mar 17 2026).
PTB-INFO: OS support status: Linux 6.17.0-35-generic Supported.
PTB-INFO: OpenGL-Renderer is AMD :: AMD Radeon Graphics (radeonsi, gfx1200, LLVM 20.1.2, DRM 3.64, 6.17.0-35-generic) :: 4.6 (Compatibility Profile) Mesa 25.2.8-0ubuntu0.24.04.1
PTB-INFO: Screen 0 : Window 10 : VBL startline = 1200 : VBL Endline = -1
PTB-INFO: Will try to use OS-Builtin OpenML sync control support for accurate Flip timestamping.
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.680555 ms [59.950042 Hz]. (50 valid samples taken, stddev=0.003881 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 16.680845 ms [59.949001 Hz].
The refresh interval reported by the operating system is 16.66667 ms.
libptbdrawtext_ftgl: External 'DrawText' text rendering plugin initialized.
libptbdrawtext_ftgl: Maximum number of cacheable fonts is 40, minimum number of supported concurrent windows is 10.
libptbdrawtext_ftgl: This plugin uses multiple excellent free software libraries to do its work:
libptbdrawtext_ftgl: OGLFT (http://oglft.sourceforge.net/) the OpenGL-FreeType library.
libptbdrawtext_ftgl: The FreeType-2 (http://freetype.sourceforge.net/) library.
libptbdrawtext_ftgl: The FontConfig (http://www.fontconfig.org) library. Version Id: 21500
libptbdrawtext_ftgl: Thanks!
Measured refresh interval, as reported by "GetFlipInterval" is 16.68056 ms. (nsamples = 0, stddev = 0.00000 ms)
PTB missed 0 out of 600 stimulus presentation deadlines.
One missed deadline is ok and an artifact of the measurement.
PTB completed 0 stimulus presentations before the requested target time.

By the way: the graphs look alway very accurate noise-wise, despite the difference in refresh rates is visible as bias from 16.6666667. The 59.95 is also reported by xrandr -q.

So, for now I think we are safe using this setup and can hopefully enjoy the accurate timing of PTB.

Thanks a lot, Mario, for your help!
PS: If you like, come along and test :wink:

Update: the Debian machine with backports works well with the additional modesetting in Zaphodheads-configuraion, too.

Output looks good. Should work as desired.

Btw. the “no low level hardware tricks” thing is normal on all modern AMD gpu’s with a DCN display engine - any AMD Ryzen integrated gpu and anything released since the RX 5700 in July 2019. Only the older DCE display engines are compatible with PTB’s low level tricks - Vega, Polaris, …

Background for debugging:

Testing with the Vulkan display backend bypasses any display server and goes directly to the kernel, so it is a good way to narrow down the troublemaker to userspace (Desktop environment (e.g., KDE), X-Server or xorg-video driver) vs. kernel space (low level kms driver). → Vulkan works → Problem in userspace (X-Server / Wayland / xorg-video drivers and other plumbing). The xorg-video-modesetting driver aka modesetting-ddx is a “one size fits all” generic driver that should work with any graphics card from any manufacturer, so it is a backup and a way to test if the vendor specific xorg-video-amdgpu amdgpu-ddx is the culprit, which it seems to be, which is why switching to it solved the problem.

You could also remove the xorg-video-amdgpu package instead of using a custom xorg.conf to force use of modesetting-ddx, as that is the automatic fallback if no vendor specific driver is installed.

General background info:

The modesetting-ddx nowadays is pretty much on par with the vendor specific driver in functionality, quality etc., after myself and a few others spent a lot of time in fall 2020 + early 2021 to spice it up and make it catch up with amdgpu wrt. neuroscience relevant functionality. I also spiced up amdgpu in 2022, so those drivers should be on par wrt. functionality since then.

The area where amdgpu-ddx may have an edge is slightly higher performance, due to AMD specific tuning. Pretty much all known graphics cards from other vendors nowadays just use the modesetting driver, only AMD still puts a bit of work into their own driver, although that has slowed down to more of a trickle recently.

Further diagnosis:

I think the reason for the pageflip failure may be an outdated xorg-video-amdgpu ddx in both the latest Debian 13 and the latest Ubuntu 24.04.4-LTS. Both ship v23.0.0 of the driver from February 2023, and not the recent v25.0.0 from July 2025, so the shipping drivers are over two years older than your graphics card, which was introduced in June 2025. Seems somebody dropped the ball on both the Debian and Ubuntu release team. Not surprising for Debian, but I’d have expected Ubuntu 24.04.4-LTS should have gotten that update in February this year, when it got the hardware enablement stack from Ubuntu 25.10 - which shipped with an outdated driver as well…

Looking at commit logs, I suspect the fix needed for latest generation AMD gpu’s (Gfx Ip 12 family, marketing name for these cards is RDNA4) brought to market in late February 2025, is this driver commit from 14th July 2024, part of amdgpu driver version 25.0.0, but not 23.0.0:

So AMD’s driver was supposedly ready for RDNA4 gpu’s on the X-Server, but Debian and Ubuntu weren’t picking up the new driver in time.

That said, only testing on Ubuntu 26.04-LTS with a RDNA 4 gpu would confirm if that was really the reason for pageflip failure and if the driver works again. Could also be something else. I don’t have any RDNA class gpu, my most modern AMD iGPU is a Raven Ridge Vega gpu class with DCN 1.0 display engine from early 2018 as part of a AMD Ryzen 5 2400-G cheap but good price for value “ALDI Sued special sales action offer” PC from early 2019…

Outlook for AMD gpu buyers:

The “maybe proper” driver v25.0.0 is shipping starting with Ubuntu 26.04.0-LTS and Debian unstable and testing though. A Google AI search suggests that all AMD “Ryzen AI Max”, “Strix Halo” branded bits, and RX 8000M series laptop gpu’s and RX 9000 series desktop gpu’s and later are RDNA4 and would need the v25.0.0 driver.

So I guess it is either use the modesetting ddx with the fix explained in this post, or upgrade to (K)Ubuntu 26.04-LTS for the latest amdgpu v26.0.0 driver to hopefully fix the problem.

That said, Ubuntu 26.04-LTS default desktop GUI “Ubuntu” desktop and also “GNOME” desktop are now Wayland only, and thereby unusable with Psychtoolbox or any other vision science software. The optionally installable KDE 6.6 desktop (or simply what KUbuntu 26.04 would provide) however still supports a native X11 session, and testing so far suggests it is working fine. My notes from testing a Ubuntu 26.04 live system from a USB drive on a laptop with AMD Polaris 11 gpu from the year 2017 on a KDE desktop installed manually say this:

"Ubuntu 26.04.0-LTS:

KDE/KWin/X11:

  • All seems fine, both single display, and dual-display (single X-Screen dual-display and dual-X-Screen dual-display tested). Both OpenGL and Vulkan.
  • Also Vulkan direct display 8/10/16 bpc unorm and fp16.
  • Also 10 bpc DefaultDepth 30 mode under X11/GLX
  • Also mirroring modes.

→ Again needs compositor disable on any multi-display setup, just like on Ubuntu 20/22/24.04 LTS.
→ ALT+Tabbing for window switching broken, timezone selection broken!! Manual switch to sddm login manager → Now works, as XDG_SESSION_TYPE is now properly set to “x11”, whereas GDM left it wrongly at “wayland”.

TODO: HDR, VRR testing, other gpu’s, other devices, sound"

Current PTB will not work with Octave 11 from Ubuntu 26.04, and NeuroDebian is not shipping 26.04 packages yet, and Ubuntu ships utterly outdated/unsupported packages from early 2024. So only the up to date Matlab version from us directly would likely work - untested yet.

Ubuntu 26.04-LTS libportaudio, and thereby our PsychPortAudio driver when running on Ubuntu 26.04, has supposedly improved sound support, thanks to the work of an independent contributor, GitHub user illuusio Tuukka Pasanen, with contributions to testing/improvement/bug fixing by myself), which is not yet used/enabled by current PTB, as testing is pending. In principle, once fully enabled by PTB, it should allow PsychPortAudio to play nicely with other sound applications and GStreamer movie playback in parallel, while still having good audio timing precision. Only if one needs absolutely highest precision and lowest latency, would one need to use the mode where PsychPortAudio fully takes over a soundcard, shutting down anything else audio on the system.

Also, thanks to a lot of work by others and myself since mid 2025 and early this year, substantially improved support for HDR, WCG, ultra-deep color precision framebuffers (up to 12 bpc on modern AMD gpu’s with suitable DisplayPort or HDMI displays, likely up to 11 bpc on modern Intel gpu’s - not tested for Intel due to lack of any modern Intel gpu). Thanks to many improvements to the Mesa OSS Vulkan drivers, all HDR/WCG/deep color capable gpu’s should now be supported, not only modern AMD gpu’s, e.g., Intel, likely some Qualcomm Snapdragon Adreno, and even the RaspberryPi 4 and 5.

So Ubuntu 26.04 can be a good upgrade, as long as one avoids any Wayland desktop environment, but extensive testing and fully making use of it will take quite a while longer, only the limited basic testing so far doesn’t point to problems on X11 desktop environments.