# A04 screen display vertical offset

**URL:** <https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829>\
**Category:** DevTerm\
**Created:** [January 6, 2022, 10:20pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829 "2022-01-06T22:20:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![intelliarm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/intelliarm/32/411_2.png) [@intelliarm](https://forum.clockworkpi.com/u/intelliarm)\
**Post date:** [January 6, 2022, 10:20pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/1 "2022-01-06T22:20:49Z")

</div>

At first sight, the very top part of the screen is a bit weird to me, but I don’t know why.  
(maybe due to the icon of chromium is not full circle 😂)

After some fiddling on the first day with my A04 devterm, I noticed that the very top of the screen is actually flipped to the very bottom of the display. (may be just 1/2 pixel lines)

Carefully, you can see in the big red box, the active window blue shadow shows on the bottom, even the mouse cursor tip…

 ![2](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/7/76430855410a46f9dc9bbb09e45b1ebea11f2599.jpeg)

Gathered links from replies:

1. [https://forum.clockworkpi.com/t/screen-issues-was-display-damaged-from-factory-bad-luck-or-common-flaw/7344/4](https://forum.clockworkpi.com/t/screen-issues-was-display-damaged-from-factory-bad-luck-or-common-flaw/7344/4)
2. [https://forum.clockworkpi.com/t/help-getting-started-with-devterm/7392/15](https://forum.clockworkpi.com/t/help-getting-started-with-devterm/7392/15)

---

<div class="post-metadata">

**Author:** ![ghostwerk](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/ghostwerk/32/4602_2.png) [@ghostwerk](https://forum.clockworkpi.com/u/ghostwerk)\
**Post date:** [January 6, 2022, 10:45pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/2 "2022-01-06T22:45:02Z")

</div>

i also have this issue on a06

---

<div class="post-metadata">

**Author:** ![henryhu](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/henryhu/32/4456_2.png) [@henryhu](https://forum.clockworkpi.com/u/henryhu)\
**Post date:** [January 7, 2022, 2:10am UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/3 "2022-01-07T02:10:13Z")

</div>

Yeah, I have exactly the same issue. I thought that I got a slightly bad screen… Good (?) to know that I’m not alone.

---

<div class="post-metadata">

**Author:** ![adcockm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/adcockm/32/1664_2.png) [@adcockm](https://forum.clockworkpi.com/u/adcockm)\
**Post date:** [January 7, 2022, 3:24am UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/4 "2022-01-07T03:24:58Z")

</div>

There’s another thread on this, which @Godzil responded to. The response was basically “good luck” though, since apparently no one knows how the screen is supposed to work, it’s not documented, and it seems to be a driver issue.

> [@Screen Issues (Was: Display Damaged from Factory - Bad Luck or Common Flaw?)](https://forum.clockworkpi.com/t/screen-issues-was-display-damaged-from-factory-bad-luck-or-common-flaw/7344/4):
>
> I’ve spotted another issue with the screen, and like before this one’s subtle - but once you notice it, it’s impossible not to notice it: the top few rows of pixels are missing. Yes, missing. Easiest way to see it: right-click on the clock, choose Properties, and switch to “LCD”. Note that the entire top segment of the simulated 7-segment LED displays are… not there. At least, they’re not there on my screen. By positioning the cursor at the exact top of my visible screen and taking a screensh…

More information is here, along with source:

> [@Help Getting Started with DevTerm](https://forum.clockworkpi.com/t/help-getting-started-with-devterm/7392/15):
>
> Then to further investigate this and possibly fix it (if comes from software) we would need to ask for the source of the panel, I couldn’t find it [DevTerm/devterm-4.19\_v0.1.patch at main · clockworkpi/DevTerm · GitHub](https://github.com/clockworkpi/DevTerm/blob/main/Code/kernel/devterm-4.19_v0.1.patch#L481) panel-cwd686.c should be called. This kind of struct should be the thing we should check [linux/panel-simple.c at master · torvalds/linux · GitHub](https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/panel/panel-simple.c#L706) Thats my guesses, never went that deep into the kernel, but would be fun. EDIT: I was looking at the wrong path, apparently the patc…

I’m kinda hoping someone working on the Manjaro port ends up fixing this. Sounds like they’ve already fixed the issue with DevTerm not properly waking up from sleep, and they seem to be making amazing progress in general. I’m not sure if they’re aware of the issue though. Perhaps I should ping them here (hope you don’t mind!): @spikerguy @m4xm4n @veritazz

---

<div class="post-metadata">

**Author:** ![adcockm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/adcockm/32/1664_2.png) [@adcockm](https://forum.clockworkpi.com/u/adcockm)\
**Post date:** [January 7, 2022, 3:29am UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/5 "2022-01-07T03:29:35Z")

</div>

As a side note there’s also a less driver-dependent issue involving the screen – its weird size. In some cases, windows get cut off and are unusable since they weren’t created with a max 480 pixel height in mind. One (easy) way around this is to scale the screen to 1.5x in the display settings, but other options would certainly be welcome.

> [@Review of recently recieved A04](https://forum.clockworkpi.com/t/review-of-recently-recieved-a04/7803/25):
>
> This is potentially a major problem. Software does not expect this screensize and gets cut off. There is no way to scroll. This is the first severe example I’ve found, but not the first instance of settings being cut-off. I don’t know if there’s such a thing as a pager-like program for X11/Wayland, but it should be looked into. As a result of the error, I can not select to confirm the settings in this program. Using the keyboard to attempt to select the save settings option (not on screen) fails…

---

<div class="post-metadata">

**Author:** ![m4xm4n](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/m4xm4n/32/5487_2.png) [@m4xm4n](https://forum.clockworkpi.com/u/m4xm4n)\
**Post date:** [January 7, 2022, 3:45am UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/6 "2022-01-07T03:45:53Z")

</div>

> I’m kinda hoping someone working on the Manjaro port ends up fixing this.

if I see it myself, I’ll take a look. But can’t say I’ve seen it yet (but I also wear glasses, might be too small for me to notice. tbh I can’t really even tell from the screenshot)

> Sounds like they’ve already fixed the issue with DevTerm not properly waking up from sleep

clarification: we didn’t do any of the actual fixing on that, I just happened to find a patchset from someone else that submitted patches to the Rockchip SoC kernel subtree to fix the Rockchip MIPI DSI driver suspend/resume issues. Just happy timing/coincidence 🙂 after lots of searching

---

<div class="post-metadata">

**Author:** ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)\
**Post date:** [January 7, 2022, 3:51am UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/7 "2022-01-07T03:51:13Z")

</div>

The panel drivers are `Code/patch/armbian_build_a06/patch/kernel-004-panel.patch` and `Code/patch/armbian_build_a04/userpatches/kernel/sunxi-current/kernel_005_panel.patch` in the `DevTerm` repo for the A06 and A04 respectively. Hopefully there isn’t much difference between them…I haven’t taken a close look. The A06 and A04 are very different SoCs but the panel is the same in both models.

The code doesn’t look too promising at first glance - lots of magic numbers in init sequences with not a lot in the way of `#defines` for command IDs or anything, and I don’t have a lot of experience with hacking on graphics drivers so I can’t tell if something’s funny with the mode parameters in `default_mode` or anything.

---

<div class="post-metadata">

**Author:** ![adcockm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/adcockm/32/1664_2.png) [@adcockm](https://forum.clockworkpi.com/u/adcockm)\
**Post date:** [January 7, 2022, 4:08am UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/8 "2022-01-07T04:08:07Z")

</div>

Research still counts! It’s been great to see the progress you all have been making on Manjaro. I’ve never actually used that distribution myself, but I’ve enjoyed quietly following along. And it’s given me more hope for the Devterm platform, as if it’s officially supported by Manjaro that will be another stable and maintained OS option. (And while I’m comfortable with Debian/Ubuntu, I’m always keen to learn new stuff.)

---

<div class="post-metadata">

**Author:** ![henryhu](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/henryhu/32/4456_2.png) [@henryhu](https://forum.clockworkpi.com/u/henryhu)\
**Post date:** [January 7, 2022, 4:16am UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/9 "2022-01-07T04:16:18Z")

</div>

I’m playing with `xrandr` and at least you seem to be able to get a 475x1280 display with  
`xrandr --newmode test 50.00 475 560 580 620 1280 1330 1332 1360 -hsync -vsync`  
Warning: this may be risky; use at your own risk. I tried some other values and it made the display blank until restarted.  
The top 5 pixels are cut off; the bottom extra pixels are still there.  
The modeline reported in Xorg.log is  
50.0 480 560 580 620 1280 1330 1340 1360 -hsync -vsync

---

<div class="post-metadata">

**Author:** ![Godzil](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/godzil/32/60_2.png) [@Godzil](https://forum.clockworkpi.com/u/Godzil)\
**Post date:** [January 7, 2022, 1:22pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/10 "2022-01-07T13:22:11Z")

</div>

Well I would love to help more, but until we have more documentation about the LCD panel itself it’s going to be hard to know what all of these black magic register pokery is doing.

I suspect that looking at some value in decimal instead of hex may give a hint on some of them, but from my own experience working with video signal without proper documentation can be really really tricky. You can guess/find some value, try to change them and get results that are completely out of what you would expect them to do (or do nothing visible, also happened to me a lot of time)

I was not answering what I was saying as in “I don’t care” but more in “without doc, I fear this is just black magic”…

---

<div class="post-metadata">

**Author:** ![m4xm4n](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/m4xm4n/32/5487_2.png) [@m4xm4n](https://forum.clockworkpi.com/u/m4xm4n)\
**Post date:** [January 7, 2022, 6:05pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/11 "2022-01-07T18:05:31Z")

</div>

I asked Hal from ClockworkPi about it in relation to some other stuff, and he was able to get the datasheet posted: [DevTerm/ICNL9707\_Datasheet.pdf at main · clockworkpi/DevTerm · GitHub](https://github.com/clockworkpi/DevTerm/blob/main/Schematics/ICNL9707_Datasheet.pdf)

very similar to the ICNL9706 datasheet I found earlier doing the Manjaro work and suspected might be the IC. the ICNL9707 one might better explain some of the init sequence stuff I couldn’t find in the ICNL9706 one, but haven’t had a chance to read it yet

Edit: the more I stare at the init sequence though…. the more it seems like it _is_ actually the ICNL9706 😕 unless there’s missing commands from ICNL9707 datasheet that are present in the ICNL9706 datasheet

---

<div class="post-metadata">

**Author:** ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)\
**Post date:** [January 7, 2022, 6:33pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/12 "2022-01-07T18:33:05Z")

</div>

@m4xm4n , I’m happy to provide code review help, but I don’t think I can offer any additional aid in actually adjusting the driver; this isn’t quite my field.

Do make sure you’re using the Armbian kernel (or whatever you’re using for Manjaro) plus the 5.x patches from the `DevTerm` repo rather than the 4.19 one that was mentioned earlier.

---

<div class="post-metadata">

**Author:** ![omgmog](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/omgmog/32/3553_2.png) [@omgmog](https://forum.clockworkpi.com/u/omgmog)\
**Post date:** [January 7, 2022, 7:07pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/13 "2022-01-07T19:07:43Z")

</div>

You can apply an `xrandr --transform` to offset the screen which seems to solve this:

```auto
# the -1 value below is the y-offset
xrandr --output None-1 --transform 1,0,0,0,1,-1,0,0,1

```

---

<div class="post-metadata">

**Author:** ![hobby\_grade](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@hobby\_grade](https://forum.clockworkpi.com/u/hobby_grade)\
**Post date:** [January 7, 2022, 7:36pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/14 "2022-01-07T19:36:05Z")

</div>

This works for me, thank you! Will this persist after a reboot?

---

<div class="post-metadata">

**Author:** ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)\
**Post date:** [January 7, 2022, 7:56pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/15 "2022-01-07T19:56:33Z")

</div>

No, `xrandr` only affects the current running session. There may be some way to transform that into an `/etc/X11/xorg.conf.d` snippet, or you can put it in a script in `/etc/X11/Xsession.d/`

---

<div class="post-metadata">

**Author:** ![intelliarm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/intelliarm/32/411_2.png) [@intelliarm](https://forum.clockworkpi.com/u/intelliarm)\
**Post date:** [January 7, 2022, 7:57pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/16 "2022-01-07T19:57:40Z")

</div>

Nice! -4 shifts best for me.

---

<div class="post-metadata">

**Author:** ![intelliarm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/intelliarm/32/411_2.png) [@intelliarm](https://forum.clockworkpi.com/u/intelliarm)\
**Post date:** [January 7, 2022, 8:08pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/17 "2022-01-07T20:08:42Z")

</div>

![image](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/a/a05c40f3e8d42fa4ee43e24783f10b8fca518887.jpeg)

This makes it apply upon boot.

---

<div class="post-metadata">

**Author:** ![hobby\_grade](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@hobby\_grade](https://forum.clockworkpi.com/u/hobby_grade)\
**Post date:** [January 7, 2022, 8:36pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/18 "2022-01-07T20:36:23Z")

</div>

I appreciate the assistance! Do you know if using cron and the `@reboot` argument will work?

---

<div class="post-metadata">

**Author:** ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)\
**Post date:** [January 7, 2022, 9:38pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/19 "2022-01-07T21:38:17Z")

</div>

No. It needs to run after Xorg has started.

---

<div class="post-metadata">

**Author:** ![hobby\_grade](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@hobby\_grade](https://forum.clockworkpi.com/u/hobby_grade)\
**Post date:** [January 7, 2022, 9:43pm UTC](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829/20 "2022-01-07T21:43:04Z")

</div>

Beautiful, thank you!

[Next page](https://forum.clockworkpi.com/t/a04-screen-display-vertical-offset/7829.md?page=2)
