Changing GPU clock by writing to pp_od_clk_voltage cause the voltage to be lower after a suspend/resume with crash and instability
Brief summary of the problem:
Whenever I touch the pp_od_clk_voltage to set the GPU clocks, and in my case this is to set it to a lower frequency or 2600Mhz, instead of the default 2669Mhz of my GPU, and if I then put my computer in suspend mode, then resume, after it resumes the GPU voltages will be much lower than they were before, the observed total power in watts will be very low even in intense 3d games, and eventually the display freeze and crash and I have to reboot. I set the frequency by doing this on my GPU: echo "s 1 2600" > /sys/class/drm/card0/device/pp_od_clk_voltage
Changing the maximum power (using power1_cap) does not create this problem, so for now I am using this to limit the power of my GPU.
Hardware description:
- CPU: AMD Ryzen 9 5950X
- GPU: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT / 6800M] [1002:73df] (rev c0) (in reality RX 6750 XT from Gigabyte model GV-R675XTGAMING OC-12GD)
- System Memory: 64GB ECC @ 3200MHz
- Display(s): Samsung 65" Oled TV
- Type of Display Connection: HDMI 2.0 @ 1920x1080 120Hz
System information:
- Distro name and Version: Pop_OS 22.04 (Ubuntu 22.04 based)
- Kernel version: Linux 6.0.6-76060006-generic #202210290932~1667401208~22.04~d2df702 SMP PREEMPT_DYNAMIC Wed N x86_64 x86_64 x86_64 GNU/Linux
- Custom kernel: Not applicable
- AMD official driver version: N/A
How to reproduce the issue:
- Set clock frequency using 'echo "s 1 2600" > /sys/class/drm/card0/device/pp_od_clk_voltage'
- Play some intensive 3D games, everything should be fine and 100% stable
- Observe your maximum GPU voltage and power when the GPU clock is high (to get a baseline, in my case it was around 1.15 to 1.2 V, getting to 180-220 watts was easy, I use corectl window set to always on top to monitor in full screen)
- Exit the game (many games on linux won't resume very well if they are running while in suspend)
- Put the computer in suspend/sleep mode
- Later on (I don't think you need to wait at all), resume the computer from standby
- Play some game again (again, the same intensive 3D game)
- Observe the GPU voltages and power again, in my case I noticed it was more around 900mv or under 1V even at 2600MHz, which seemed pretty low, and overall power consumption in watts was also very low compared to normal (it was hard or impossible to hit 180W at all)
- Eventually, there will be some graphic freezes or corruption and crash, then I needed to reboot.