Ubuntu Desktop 5.12 screen flickering issue with NVMe

I tested it with new M2X extension and without extension with newly arrived WD SN500 500Gb and old Samsung Evo 970Plus 1Tb. As soon as I access the NVMe m.2 for benchmarks or copy files, some crazy screen flickering appears.
It also randomly happens but not very often on the screen(flickering) as long as the NVMe is plugged in.

It’s happening with official focal server 5.12 and focal desktop 5.12 on both of my Vim3 Pro’s.
I have latest u-boot and OS is working from eMMC and I don’t have anything connected on USB3 port. Only USB2 port is being used on Vim3 Pro by a logitech unifying dongle.

Kbi configuration on latest Krescue has been set to “Set port mode to PCIe” to allow OS to recognized NVMe drive.

Obviously, I’m using official 24W(12V/2A) PSU and I already have several and tried them all already without success.

Update:

  • Tried with two(2) 36W PD USB-C PSU’s(12V/3A) and same flickering issue was present.

Update #2:

  • Flickering issue also happening with the following NVMe drives: Adata XPG SX8200 Pro 512GB, Mushkin Helix-L – 250GB, Sabrent Rocket Q 1TB NVMe.

I wanted to confirm seeing the same behavior on my Vim3 + “New” M2X. As one other data point, it isn’t limited to a graphical desktop; using the text-mode console without Xorg or Wayland running at all still results in severe noise & flickering, and the machine is more or less unusable for any interactive/local use.

There don’t appear to be any correlated system log messages, though I could check again if a particular subsystem seems worth checking.

yes ! i have see same sometimes - we will check it

Hello @jtremblant

Here is a solution to resolve this issue. Please edit /boot/env.txt file to add pci=pcie_bus_perf to user_kernel_args node. Just like this:

user_kernel_args=pci=pcie_bus_perf

Then save the file and reboot the system. Please tell me the result.

Thanks.

2 Likes

Thanks, I’ll check it out later and share with others from my team as well. Will let you know how does it go in 4 Vim3 Pro’s using 4 different low power NVMe drives.

你好,我们也在关注此问题,通过测试设置pci=pcie_bus_perf参数后确实写NVME不再闪屏,请问其中的原理是什么?

I ran into this issue before and lost what I had done to ‘fix,’ the issue. This looked familiar: NVMe Tuning …fiddling with the power settings and then saving the setting while it was mounted seems to have fixed things and the flickering is gone. I recklessly tried all of the options with complete abandon and then everything was fine. :man_shrugging:

# Install nvme-cli
sudo apt-get nvme-cli
# Lets see those settings Samsung...
sudo nvme id-ctrl /dev/nvme0

NVME Identify Controller:
vid       : 0x144d
ssvid     : 0x144d
sn        : wink:      
mn        : Samsung SSD 970 EVO Plus 1TB            
fr        : 4B2QEXM7
rab       : 2
ieee      : 002538
cmic      : 0
mdts      : 7
cntlid    : 0x6
ver       : 0x10300
rtd3r     : 0x30d40
rtd3e     : 0x989680
oaes      : 0x200
ctratt    : 0x10
rrls      : 0
crdt1     : 0
crdt2     : 0
crdt3     : 0
oacs      : 0x17
acl       : 7
aerl      : 3
frmw      : 0x16
lpa       : 0xf
elpe      : 63
npss      : 4
avscc     : 0x1
apsta     : 0x1
wctemp    : 355
cctemp    : 358
mtfa      : 0
hmpre     : 0
hmmin     : 0
tnvmcap   : 1000204886016
unvmcap   : 0
rpmbs     : 0
edstt     : 35
dsto      : 0
fwug      : 0
kas       : 0
hctma     : 0x1
mntmt     : 313
mxtmt     : 356
sanicap   : 0x3
hmminds   : 0
hmmaxd    : 0
nsetidmax : 0
anatt     : 0
anacap    : 0
anagrpmax : 0
nanagrpid : 0
sqes      : 0x66
cqes      : 0x44
maxcmd    : 256
nn        : 1
oncs      : 0x57
fuses     : 0
fna       : 0x5
vwc       : 0x7
awun      : 1023
awupf     : 0
nvscc     : 1
nwpc      : 0
acwu      : 0
sgls      : 0
mnan      : 0
subnqn    : nqn.1994-11.com.samsung:nvme:980PRO:M.2:S6S1NS0T506321H     
ioccsz    : 0
iorcsz    : 0
icdoff    : 0
ctrattr   : 0
msdbd     : 0
ps    0 : mp:7.54W operational enlat:0 exlat:0 rrt:0 rrl:0
          rwt:0 rwl:0 idle_power:- active_power:-
ps    1 : mp:7.54W operational enlat:0 exlat:200 rrt:1 rrl:1
          rwt:1 rwl:1 idle_power:- active_power:-
ps    2 : mp:7.54W operational enlat:0 exlat:1000 rrt:2 rrl:2
          rwt:2 rwl:2 idle_power:- active_power:-
ps    3 : mp:0.0500W non-operational enlat:2000 exlat:1200 rrt:3 rrl:3
          rwt:3 rwl:3 idle_power:- active_power:-
ps    4 : mp:0.0050W non-operational enlat:500 exlat:9500 rrt:4 rrl:4
          rwt:4 rwl:4 idle_power:- active_power:-

# Check the current power setting
sudo nvme get-feature /dev/nvme0 -f 2
# Set and save...
sudo nvme set-feature /dev/nvme0 -f 2 -v 2 -s

…it threw an angry? message about saving but then the screen was fine so I am okay with the outcome. I wrote some random data to the drive and it didn’t have any trouble. At any rate if this helps anyone great (If not, it’ll be a reminder for myself). I haven’t rebooted yet but I feel optimistic it will stick.

No flickering after reboot :laughing:

I’m having the same issue with the same drive (970 EVO Plus) but on the official Android image. Not sure if i can set the power settings on the droid?

Flickering only occurs when doing a heavy operation (copying a file) to or around the NVMe disk. Tried lots of different power supplies, including one that goes up to 65W/20V so I don’t think it’s the power supply.

Hello @paul_at_go

Which image you used? Have you tried this ?

I’m using this image: https://dl.khadas.com/products/vim3l/firmware/android/VIM3L-Android-Pie_V210906.raw.img.xz

Are those settings valid for Android? If so, I’ll give them a try. Also going to try one of the newer Android images.

Hello @paul_at_go

So you use the Android image and when you doing a heavy operation the screen flickering?

We have only flickering issue with the Ubuntu image before, and fixed with command line args pci=pcie_bus_perf.