agi: Samsung devices w/ Qualcomm GPU fails validation (needs to be rooted to access GPU counters)
Environment information:
- AGI version: Version 2022-3.0.1
- Host OS: [e.g. Linux] macOS If tracing on Android:
- Device model: Samsung S21 SM-G991U1 and SM-G996U1
- Android Version: Android 12 (One UI 4.1, Build SP1A.210812.016.G991U1UEU5CVDC)
Bug description
Device validation fails:
Check failed for counter: {1 Clocks / Second 0x46e6a20}
Reproduction steps Steps to reproduce the behavior: Attempt to use AGI w/ these devices
Additional debugging information
- Please attach the generated gapis.log and gapic.log files you will find in the temp folder (e.g. /tmp/ on linux).
- If using Android: Please attach a full logcat dump (
adb logcat -d > logcat-full.txt) that contains logs since AGI was started. gapis.log gapic.log logcat-full.txt
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 27 (12 by maintainers)
Apologize for the delay in getting this resolved, I’ve communicated the issue with folks at Samsung and am hoping to get this resolved as soon as possible.
In the future, we’ve added tests in Android 14 to ensure that we don’t get this kind of regression again.
Apologies for the delay, here’s a workaround to get around issues with getting GPU counters on Adreno GPUs:
It’s worth noting that you may want to set the contents of
/sys/class/kgsl/kgsl-3d0/perfcounterback to0as a precaution after profiling, so that other apps/processes cannot access GPU counters.I’m working on a change that runs these commands before profiling, will notify once it’s in the new release.
I’m not a certain of a way to track this issue publicly, but we’ve communicated this problem to them via internal channels previously. I can try to ping this issue again to try to understand the timeline on getting this fixed.
It looks like there was a breaking change in the driver recently (not sure if it was included in the May 17 update or the one before that). Unfortunately, reverting the AGI version will not fix this issue, and I don’t have an easy workaround for this at the moment. We’re working on getting this sorted out and will update once we have something.
and still, they didn’t fix this!
Pinged the folks at Samsung – will update this thread once I receive a response
All good - kgsl drivers/counters have been a nightmare since A7, so wasn’t really surprised 😃
I’m actually not using AGI (I’ve got my own IOCTL communication to the driver), but I’ve confirmed that Snapdragon Profiler is also blocked by this root gate issue as well