I've been having an awful problem with AMD's GPU drivers with Ubuntu 24.04 and the various derivatives such as Linux Mint. I also saw it in Fedora 40, though getting ROCm even to properly work was an uphill battle in itself there (it doesn't setup /opt/rocm.) This also applies to alternate windowing systems such as KDE Plasma and even X11, not just Wayland. When I install the official drivers to get ROCm (which is only available as 6.2 on these versions) I get a horrible flickering white box at the top of the screen. On its own it isn't too bad and it seems to kind of disappear after a while in some configurations (but not all!) but it can flicker at a really high rate sometimes and is giving me problems. People who are prone to seizures would likely have one if they had this particular bug too (thankfully I don't, but I'm not joking that this is actually dangerous.) This ONLY occurs once I install ROCm 6.2. Unfortunately I do use ROCm for LLM/ML stuff such as KoboldCPP, so I do need this to work. (And inb4, no, I have not tried 6.1.x on Ubuntu 24.04 and derivatives because no package exists for those versions and the package for 22.04 fails to install due to broken dependencies. Which, I might add, kind of sucked because when Ubuntu 24.04 came out there was no way to install ROCm for a while...) On Fedora 40, I had ROCm 6.1.2 installed then installed 6.2 and the flickering started with it. (If I recall, Fedora had it the worst of them all, almost causing me physical pain.)
This issue occurs from the login screen (LightDM/whatever) on into after I log in and continues for a while. The white bar flickers in visibility on and off a bit randomly and mostly seems to correspond to mouse movements (but I think I recall seeing some other animations trigger it as well.) Starting up programs and moving them around a bit seems to make it go away, but certain things (such as xrandr) can trigger it to start again. I forget which ones (I think Fedora?) but on some it wouldn't go away even after a while and no matter how much I moved things around. One interesting thing is it does seem like it is at least partially connected to cursor handling. Moving the mouse cursor is the easiest way to trigger the flickering. However, I think I have seen some animations trigger it too. (It's getting hard to remember after reinstalling so many different distros and re-reinstalling some of the same trying to figure this all out.)
Now, I've been distro hopping, trying to find the right balance of being able to have stuff like ROCm 6.2 AND have stuff like Wayland and gaming and so far not having a lot of luck (really Manjaro gave me the best results, but has zero support from AMD and the only ROCm version available to it is the ancient 6.0.2 in the AUR. As far as I can tell, 6.1.2 and 6.2 are fairly big releases overall with a lot of things possibly expecting to use them these days -- heck, Windows just got 6.1.2 and may be about to get 6.2...) So I've lost track of a few things, but I'm pretty sure that Fedora 40 actually had no flickering until after I installed ROCm 6.2 specifically. I'm pretty sure it was fine on 6.1.2... I really wish AMD supported more of the extremely popular USER distros like Arch and Fedora. (Really, the whole handling of ML stuff has been a hot mess with inconsistent updates, lack of full support for the majority of cards that could do it, lack of good Windows support, and of course the lack of proper Linux support. I get that they think their biggest customers are enterprise systems, but ask those using CUDA in enterprise systems how many are doing so because they were able to actually use it at home... Many of your enterprise users are home users too.)
Right now I'm leaning towards Linux Mint 22 being my best hope for the right balance of things, but with that awful flashing box I can't use it. It actually physically bothers me that much. So I would like to really figure this out. I'm really tempted to go back to Manjaro, but the fact that the community maintained packages for ROCm are so far behind is kind of a problem. (Plus I really kind of want something a bit more stable. Manjaro is a bit better than purer distros for stability, but it still has done stuff like introducing an update that failed to boot for me. Arch is not a stibility line...) If possible I would rather anything other than Ubuntu itself. (I cannot tolerate its horrible interface.) Kubuntu, Xubuntu, etc would be better, but I wanted Wayland which is not a thing in Xubuntu and I still had the flickering issue in Kubuntu. (Didn't test Xubuntu for flickering.)
Now, here is one oddity that I have no clue if it could be related or not: my monitor isn't showing the correct refresh rates in several of the problem distros, but, on the other hand, shows them just fine in Manjaro and Windows. For example, its maximum resolution is 1920x1080 at 144Hz, but in these problem systems it's showing up at 143.83 or 143.98 or any number of different values (seems to change.) I see similarly weird numbers for 120 and 75. Windows and Manjaro correctly show 144, 120, and 75. It seems like possibly it could be reading the EDID wrong from what I could tell, but why do these other systems read it fine? I've tried doing an EDID override with a bit of help of wxedid, but it did not seem to help. Linux Mint 21.3 in plain X11 (not Wayland) is able to use xrandr (or xorg.conf) to add and set modified modelines that set the full 144 and 120. I thought perhaps the fact those weren't proper integer values might be the issue, but I tried forcing it in Linux Mint 22 with my fingers crossed and the issue still occurred, so I guess it's not that simple even if it is related (and it may not be.) Mostly I just wondered if it could somehow be related to FreeSync, but then FreeSync defaults to off apparently and in X11 it must be manually enabled via manually editing configuration files (uhm, why?) so maybe not. I have also tried setting 60Hz, though of course this is not what I want and 60 did not fix the issue. In 21.3 I can't even use wayland since it has some weird buffering issue or something. (Sort of like the hall of mirrors effect, but not quite. I think it's flicking back and forth in a buffer that isn't handled right or something.) Wayland in 21.3 was also unable to set 144, 120, or 75 directly and had those odd values.
For reference, my GPU is a 7800XT and the monitor is a LG Ultragear. And yes, the cable is fine (which is why it works fine in Windows and Manjaro, but I just know someone is going to ask anyway...) My CPU is a 5600X which does not have IGP (graphics) cores and the motherboard does not have anything either.
I had pictures and a video, but accidentally deleted them. If absolutely necessary I can make new ones (I'll try going back to Linux Mint 22 soon I guess, but for now I need a working computer for a day or two.) The bar is maybe 1/8th of the screen in height, it fills it completely in width, and it is completely white. It flickers on and off but it seems to be either an overlay or something to do with the monitor because I can click and do things through it as if it is not there.
PS. Is there any REASONABLE way to get ROCm 6.1.x to install in Mint 22/Ubuntu 24.04? (Like I'd really like to not have to build the entire 30 something gigabytes of libraries from source.) I have seen a few things fail to build with 6.2 due to some changes. I think most are getting fixed, but possibly not all. It would be nice to have both, despite all the space it takes up. Heck, I can live with 6.1.2 or 6.1.3 for a while until whatever is going on with 6.2 stops trying to give me seizures. If possible I'd rather not manually install packages without repos since that can screw with all sorts of things. (I think people were manually installing the packages for 23.04 for a while, but they did so without the repo.) Most packages don't want to work because of the Python handling changes. (God I hate Python...)
PPS. No there is no TL;D[n]R version because there's no point in wasting weeks going back over the things I've already done or providing details I already could have provided in the first post.