I hope it's not making much difference that I'm posting my question here even if I'm using Pop!_OS. The problem also occurs on a Manjaro live usb.
I'm using a
- Ryzen 1500x CPU,
- 16GB of RAM,
- MSI B350m Gaming Pro motherboard with an RX 580 8GB version,
- Monitor is AOC G2260VWQ6 1920x1080x75hz.
After booting and logging in everything is fine, however, after turning the screen off and then on, going back from a screensaver, changing display settings that makes the screen "restart" or anything similar while being on a refresh rate over 60hz, which is ~75hz for my screen, the weird flicker starts happening.
Here are links with videos for different situations:
Everything being fine after login: https://streamable.com/am3kp
Screen starts flickering after locking (turns off the screen after a second) and then logging back in: https://streamable.com/meeiz
Fixing the flicker by changing the resolution and reverting: https://streamable.com/5l5z2
Sometimes it still works fine, but it only happened once, restarting the screen multiple times didn't begin the flicker, until reboot.
I tested it using both DisplayPort and HDMI, with higher refresh rates on lower resolutions the problem still occurs. When switching to a different resolution and still using ~75hz the flicker doesn't go away.
It happens on both Mesa version 18 and 19, on Manjaro it still happened on even when switching to kernel version 5. Of course, the problem doesn't occur in Windows.
I'm not that advanced in Linux so I really don't know how to fix it. Please help.
EDIT: After searching a bit more I found a workaround. I had to change "auto" to "high" in file /sys/class/drm/card0/device/power_dpm_force_performance_level. Link to the thread I found the workaround on: https://bbs.archlinux.org/viewtopic.php?id=244398
A good explanation on arch wiki: https://wiki.archlinux.org/index.php/AMDGPU#Screen_artifacts_and_frequency_problem
To quickly temporarily (you'll have to run command every boot) fix the problem run in terminal:
OR
To fix it permanently (this will work even after reboots):
Run in terminal:
echo '[Unit] Description=Fix amd flickering on high Hz monitors.
[Service] ExecStart=/usr/bin/amdfix_script.sh
[Install] WantedBy=multi-user.target' | sudo tee /etc/systemd/system/amdfix_service.service
Run in terminal:
sudo chmod 644 /etc/systemd/system/amdfix_service.service
Run in terminal (change 'low' to 'high' if you want. Personally I choose 'low': gpu is less noisy and I don't see any performance decrease.):
echo '#!/bin/bash echo 'low' | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level' | sudo tee /usr/bin/amdfix_script.sh
Run in terminal:
sudo chmod +x /usr/bin/amdfix_script.sh
Run in terminal:
sudo systemctl enable amdfix_service.service
Run in terminal:
sudo systemctl start amdfix_service.service
To check if its working run in terminal:
the output should have text "amdfix_service.service: Succeeded."
All done.
To change performance level after you did all the steps, run command inside "3)" step again with wanted performance level 'low' or 'high' And then run
I am totally new to Linux, but I have the same issue... I am using Ubuntu 20.04 and my gpu is ADM Radeon rx 5700 xt.
The script works if i start it with
But it doesn't work after reboot. I always have to run the command after boot. If I check the status with
before running the script, i get the following output:
So it seems like, amdfix_script.sh does not have permission to write
Do you have any idea how to fix that?