InfiniTimeOrg / InfiniSim

Simulator for InfiniTime user interface without needing a PineTime
GNU General Public License v3.0
163 stars 65 forks source link

Display is skewed during and after vertical transitions #110

Open mantasg opened 1 year ago

mantasg commented 1 year ago

I've built and tried using InfiniSim on Ubuntu 20.04 following standard instructions in README file. It builds and starts fine. However, whenever I perform vertical swipe gestures (either using mouse or arrow keys) the display gets skewed. Horizontal gestures seem to work fine.

I'm trying to debug it myself, but does anyone have any thoughts of what could be causing this?

I'm including GIF recording of the issue:

infinisim-problem

I'm happy to provide any additional information.

mantasg commented 1 year ago

Adding another preview

infinisim-problem-2

mantasg commented 1 year ago

I've managed to get it to a workable state using this change. It doesn't show vertical scroll animations, but at least the screens are not distorted. Still would be interesting to know what's going on there.

--- a/sim/displayapp/LittleVgl.cpp
+++ b/sim/displayapp/LittleVgl.cpp
@@ -141,8 +141,10 @@ void LittleVgl::InitFileSystem() {
 void LittleVgl::SetFullRefresh(FullRefreshDirections direction) {
   if (scrollDirection == FullRefreshDirections::None) {
     scrollDirection = direction;
-    if (scrollDirection == FullRefreshDirections::Down) {
+    if (scrollDirection == FullRefreshDirections::Up) {
       lv_disp_set_direction(lv_disp_get_default(), 1);
+    } else if (scrollDirection == FullRefreshDirections::Down) {
+      lv_disp_set_direction(lv_disp_get_default(), 0);
     } else if (scrollDirection == FullRefreshDirections::Right) {
       lv_disp_set_direction(lv_disp_get_default(), 2);
     } else if (scrollDirection == FullRefreshDirections::Left) {
NeroBurner commented 1 year ago

Can you provide more info about your system hardware. I'm especially interested in CPU, GPU and used drivers for the GPU

mantasg commented 1 year ago

Here's some output from info commands. The laptop I'm running this on in Dell Latitude 5420.

$ lscpu
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   39 bits physical, 48 bits virtual
CPU(s):                          8
On-line CPU(s) list:             0-7
Thread(s) per core:              2
Core(s) per socket:              4
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           140
Model name:                      11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
Stepping:                        1
CPU MHz:                         612.465
CPU max MHz:                     4800.0000
CPU min MHz:                     400.0000
BogoMIPS:                        3609.60
Virtualisation:                  VT-x
L1d cache:                       192 KiB
L1i cache:                       128 KiB
L2 cache:                        5 MiB
L3 cache:                        12 MiB
NUMA node0 CPU(s):               0-7
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Not affected
Vulnerability Retbleed:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm con
                                 stant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est 
                                 tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fa
                                 ult epb cat_l2 invpcid_single cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep 
                                 bmi2 erms invpcid rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 x
                                 saves split_lock_detect dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclm
                                 ulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2intersect md_clear ibt flush_l1d arch_capabilities

$ sudo lshw -C display
  *-display
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 01
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 mode=1920x1080 visual=truecolor xres=1920 yres=1080
       resources: iomemory:600-5ff iomemory:400-3ff irq:158 memory:6052000000-6052ffffff memory:4000000000-400fffffff ioport:3000(size=64) memory:c0000-dffff memory:4010000000-4016ffffff memory:4020000000-40ffffffff

$ lspci -k | grep -EA3 'VGA|3D|Display'
00:02.0 VGA compatible controller: Intel Corporation Device 9a49 (rev 01)
  Subsystem: Dell Device 0a20
  Kernel driver in use: i915
  Kernel modules: i915