How can I change TS050 orientation in VIM3L?

I’m not sure how much has gone upstream at this point - @narmstrong is the person to comment on status. You might want to see how much of this branch of his is in the kernel now:

I don’t have a TS050 sample so can’t test or help much, sorry…

2 Likes

@chewitt Thank you . I will try to test it . And I have another question , is your VIM1 sound card normal? My VIM1 sound card can no longer be used normally

The audio card name changed recently so you might need to update alsa confs, but nothing else has touched audio AFAIK. I’ve just booted a VIM1 using my current private LE branch (5.11.7) and I have working audio at least.

1 Like

and retested with 5.11.10 … still working :slight_smile:

@chewitt I had change the audio card name . But I don’t seem to be very lucky .

I find something . In my VIM1 board , when I run amixer, I get this

$ amixer 
Simple mixer control 'AIU HDMI CTRL SRC',0
  Capabilities: enum
  Items: 'DISABLED' 'PCM' 'I2S'
  Item0: 'I2S'
Simple mixer control 'AIU SPDIF SRC SEL',0
  Capabilities: enum
  Items: 'SPDIF' 'I2S'
  Item0: 'SPDIF

This is very abnormal, is it also like this on 5.11?

VIM1:~ # amixer
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'AIU HDMI CTRL SRC',0
  Capabilities: enum
  Items: 'DISABLED' 'PCM' 'I2S'
  Item0: 'I2S'
Simple mixer control 'AIU SPDIF SRC SEL',0
  Capabilities: enum
  Items: 'SPDIF' 'I2S'
  Item0: 'SPDIF'

VIM1:~ # aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=KHADASVIM
    KHADAS-VIM, 
    Default Audio Device
sysdefault:CARD=KHADASVIM
    KHADAS-VIM, 
    Default Audio Device
front:CARD=KHADASVIM,DEV=0
    KHADAS-VIM, 
    Front output / input
surround40:CARD=KHADASVIM,DEV=0
    KHADAS-VIM, 
    4.0 Surround output to Front and Rear speakers
surround41:CARD=KHADASVIM,DEV=0
    KHADAS-VIM, 
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=KHADASVIM,DEV=0
    KHADAS-VIM, 
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=KHADASVIM,DEV=0
    KHADAS-VIM, 
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=KHADASVIM,DEV=0
    KHADAS-VIM, 
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

VIM1:~ # aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: KHADASVIM [KHADAS-VIM], device 0: fe.dai-link-0 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

^ This is what I see. Audio seems to work fine. I don’t claim to understand ALSA though…

1 Like

Here is how I have rotated the TS050 screen and touch to landscape mode on the VIM3 Ubuntu Focal with legacy kernel (4.9.x) fenix build. Should work on the VIM3L as well.
WARNING: This will also rotate HDMI output. No guarantees but I will rework the config to restrict to TS050 only.
Add the following to /etc/X11/xorg.conf.d/10-ts050-fbdev-rotate.conf

Section "Device"
        Identifier      "Configured Video Device"
        # Rotate Right
        Option "Rotate" "CW"
EndSection

Section "InputClass"
        Identifier "Coordinate Transformation Matrix"
        MatchIsTouchscreen "on"
        MatchProduct "EP0000M09"
        MatchDriver "libinput"
        # Rotate Right
        Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
EndSection
3 Likes

I am testing this out, just waiting for the Desktop environment to get installed,

@numbqq there is this problem when using the TS050 with SD/USB boot media, the horizontal lines are displaced (maybe signal timing error), is there any fix for this ?

Here is the rotated screen

3 Likes

@shyAm well done!
please tag the khadas team, and see if this can be posted in the docs, :slightly_smiling_face:

Hello @shyAm @Electr1

Wow, thanks for your information, we will also check on our side. :wink:

2 Likes

Hello @shyAm

What Ubuntu version you used to test?

I checked on my side that after add the xorg configuration, the display is landscape on lightdm interface, and works well, but once login the display is not correct.

Do you have other modifications?

Thanks.

Update:

After execute:

$ xrandr --output "default" --mode "1920x1088"

The display is ok now.

1 Like

Let me review, if I overlooked any other changes. Before xorg conf solution, I played with overlay file, /etc/rc.local and khadas_init.sh.

I am using the Ubuntu focal from fenix build.

~$ cat /etc/fenix-release
BOARD=VIM3
VENDOR=Amlogic
VERSION=1.0.4
ARCH=arm64
INITRD_ARCH=arm64
INSTALL_TYPE=EMMC
IMAGE_VERSION=V1.0.4-210330
################ GIT VERSION ################
UBOOT_GIT_VERSION=khadas-vims-v1.0.4-release
LINUX_GIT_VERSION=khadas-vims-v1.0.4-release
FENIX_GIT_VERSION=v1.0.4
#############################################

~$ DISPLAY=:0 xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1088 x 1088, current 1920 x 1088, maximum 1920 x 1920
default connected 1920x1088+0+0 0mm x 0mm
1088x1920 0.00
1920x1088 0.00*

A snippet from my Xorg.0.log

[ 13.171] (II) LoadModule: “modesetting”
[ 13.171] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 13.173] (II) Module modesetting: vendor=“X.Org Foundation”
[ 13.173] compiled for 1.20.9, module version = 1.20.9
[ 13.173] Module class: X.Org Video Driver
[ 13.173] ABI class: X.Org Video Driver, version 24.1
[ 13.173] (II) LoadModule: “fbdev”
[ 13.173] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 13.174] (II) Module fbdev: vendor=“X.Org Foundation”
[ 13.174] compiled for 1.20.1, module version = 0.5.0
[ 13.174] Module class: X.Org Video Driver
[ 13.174] ABI class: X.Org Video Driver, version 24.0
[ 13.174] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 13.174] (II) FBDEV: driver for framebuffer: fbdev
[ 13.184] (WW) Falling back to old probe method for modesetting
[ 13.184] (EE) open /dev/dri/card0: No such file or directory
[ 13.184] (WW) Falling back to old probe method for fbdev
[ 13.184] (II) Loading sub module “fbdevhw”
[ 13.184] (II) LoadModule: “fbdevhw”
[ 13.184] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 13.187] (II) Module fbdevhw: vendor=“X.Org Foundation”
[ 13.187] compiled for 1.20.9, module version = 0.0.2
[ 13.187] ABI class: X.Org Video Driver, version 24.1
[ 13.187] (II) FBDEV(0): using default device
[ 13.187] (II) FBDEV(0): Creating default Display subsection in Screen section
“Default Screen Section” for depth/fbbpp 24/32
[ 13.187] (==) FBDEV(0): Depth 24, (==) framebuffer bpp 32
[ 13.187] (==) FBDEV(0): RGB weight 888
[ 13.187] (==) FBDEV(0): Default visual is TrueColor
[ 13.188] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[ 13.188] (II) FBDEV(0): hardware: OSD FB (video memory: 77312kB)
[ 13.188] (DB) xf86MergeOutputClassOptions unsupported bus type 0
[ 13.188] () FBDEV(0): Option “Rotate” “CW”
[ 13.188] (
) FBDEV(0): rotating screen clockwise
[ 13.188] (II) FBDEV(0): checking modes against framebuffer device…
[ 13.188] (II) FBDEV(0): checking modes against monitor…
[ 13.188] (II) FBDEV(0): Virtual size is 1088x1920 (pitch 1088)
[ 13.188] () FBDEV(0): Built-in mode “current”
[ 13.188] (==) FBDEV(0): DPI set to (96, 96)
[ 13.188] (II) Loading sub module “fb”
[ 13.188] (II) LoadModule: “fb”
[ 13.189] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 13.190] (II) Module fb: vendor=“X.Org Foundation”
[ 13.190] compiled for 1.20.9, module version = 1.0.0
[ 13.190] ABI class: X.Org ANSI C Emulation, version 0.4
[ 13.190] (
) FBDEV(0): using shadow framebuffer
[ 13.190] (II) Loading sub module “shadow”
[ 13.190] (II) LoadModule: “shadow”
[ 13.191] (II) Loading /usr/lib/xorg/modules/libshadow.so
[ 13.192] (II) Module shadow: vendor=“X.Org Foundation”
[ 13.192] compiled for 1.20.9, module version = 1.1.0
[ 13.192] ABI class: X.Org ANSI C Emulation, version 0.4
[ 13.192] (II) UnloadModule: “modesetting”
[ 13.192] (II) Unloading modesetting
[ 13.214] (II) FBDEV(0): display rotated; disabling DGA
[ 13.214] (II) FBDEV(0): using driver rotation; disabling XRandR
[ 13.214] (==) FBDEV(0): Backing store enabled
[ 13.215] (==) FBDEV(0): DPMS enabled


1 Like

I haven’t see any difference from the xorg log file.

I use the default gnome desktop, and after add the configuration file, after login the default mode is 1088x1920, and I have to execute xrandr --output "default" --mode "1920x1088" to set the mode to 1920x1088, after that the display is correct.

I wasn’t paying attention that you were trying on the GNOME desktop. I can reproduce the issue on the GNOME desktop as well.
My suspicion is either the gnome settings daemon or the org.gnome.Mutter.DisplayConfig changing the settings. Will be investigating this further.

The screen rotates fine on a freshly built XFCE desktop eliminating the possibility that I may have modified some script.

Meanwhile could you please try the following using autostart file .config/autostart/rotate-ts050.desktop

[Desktop Entry]
Type=Application
Name=TS050 in Landscape Mode
Exec=xrandr --output "default" --mode "1920x1088"
Terminal=false
X-GNOME-Autostart-enabled=true
3 Likes

Yes, that’s my solution. :wink:

2 Likes

@numbqq @Frank any update of the TS050 in mainline ?

Still have no luck to make it work with mainline kernel .

@numbqq I am encountering this error with eMMC images as well, Its the v200530 image and after I did sudo apt update && apt upgrade I seem to be having a torn screen like I had previously (but that was in SD/USB image, this is eMMC image)

this is the plymouth boot splash I guess, it seems to be fine when booting up for a couple of seconds, then immediately after entering tty, it is shows a torn screen… :confused:

I guess you use the server image, right? We have fixed this issue and will release new image this week.

And you can try to upgrade the package manually:

$ wget https://dl.khadas.com/test/linux-board-package-focal-vim3_1.0.4_arm64.deb
$ sudo dpkg -i linux-board-package-focal-vim3_1.0.4_arm64.deb
$ sudo reboot
1 Like