How can I change TS050 orientation in VIM3L?

I want to use TS050 with Ubuntu.
What should I do for changing orientation of TS050?

@Cent_Ra the 4.9 kernel only supports portrait orientation of the screen (presumably due to limitations in the BSP kernel)

some news was give that khadas was at work with baylibre to bring it to mainline linux with screen rotation working, but we are yet to see anything coming out soon,

if you are in urgent need to use landscape mode please consult numbqq and narmstrong

cheers

You can build the mainline kernel with CONFIG_DRM_PANEL_KHADAS_TS050=m set and the driver should be present and working. It was merged for Linux 5.12.

3 Likes

that’s awesome, I have to try it out…
do I just add that in the VIM3_defconfig ?

edit: it seems fenix still uses 5.10 rc6 kernel, how can I get the latest kernel source ?

1 Like

We will update the kernel this week, and we will also check on our side.

2 Likes

@chewitt Hello, Have you tried using ts050 on 5.12? I looked at menuconfig and it seems that only Rockchip supports this screen.I haven’t done a specific test yet, and I am not sure whether it can be used on VIM3.

@Frank I am willing to test the kernel with TS050 screen, can you share the updated kernel ?

@Electr1 I will push the code out after I finish it, and I am currently debugging

1 Like

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