No external monitorvia USB-C over Dockingstation
#1
Hi @all,

i'm not totally new to Ubuntu/Linux but still far from being a pro!

Actually i run Ubuntu 22.04 (installed via ARMBIAN) with Gnome 42 on my Pinebook Pro:

Code:
$lsb_release -a
    No LSB modules are available.
    Distributor ID:    Ubuntu
    Description:    Ubuntu 22.04.2 LTS
    Release:    22.04
    Codename:    jammy
       
    $ uname -a
        Linux pinebook-pro 6.1.30-rockchip64 #3 SMP PREEMPT Wed May 24 16:32:53 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
    $ gnome-shell --version
     GNOME Shell 42.

I've tried an Dell Monitor with USB-C-Support (U3421WE) an DELL-USB-C- Dockingstation with a Lenovo-Monitor and a Lenovo Thinkpas Universal USB-C-Dock (40AY) with an Fujitsu Monitor.

 
The beahviour ist always the same: USB-Hub is Working (Mous, & Keyboard etc.) but Display is not:

The U3421WE display,: " No USB-C Signal from the Divce". The other ones yust say: "No input Signal".
It makes no difference if it is hotplugged or plugged in befor boot also not flipping the USBC plug.

Her ist (as an example from the setup with the DELL.Monitor on the Lenovo-Dockingstation) some information i imagine to be helpful:


Code:
$ lsusb
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 007 Device 015: ID 17ef:30a9 Lenovo 40AY
    Bus 007 Device 017: ID 17ef:30b0 Lenovo ThinkPad USB-C Dock Audio
    Bus 007 Device 020: ID 046d:c069 Logitech, Inc. M-U0007 [Corded Mouse M500]
    Bus 007 Device 019: ID 046a:010d Cherry GmbH MX-Board 3.0 Keyboard
    Bus 007 Device 018: ID 17ef:30ae Lenovo USB2.0 Hub            
    Bus 007 Device 016: ID 17ef:30ac Lenovo USB2.0 Hub            
    Bus 007 Device 014: ID 17ef:30af Lenovo USB2.0 Hub
    Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 003: ID 0c45:6321 Microdia HP Integrated Webcam
    Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 006 Device 002: ID 258a:001e HAILUCK CO.,LTD USB KEYBOARD
    Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


    $ lsusb -v -s 007:15
    Bus 007 Device 015: ID 17ef:30a9 Lenovo 40AY
    Couldn't open device, some information will be missing
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.01
      bDeviceClass            0
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0         8
      idVendor           0x17ef Lenovo
      idProduct          0x30a9
      bcdDevice           30.80
      iManufacturer           1 Lenovo
      iProduct                2 40AY
      iSerial                 3 1S40AY0090EUZVR01WKQ
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0029
        bNumInterfaces          2
        bConfigurationValue     1
        iConfiguration          4
        bmAttributes         0xc0
          Self Powered
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           0
          bInterfaceClass        17
          bInterfaceSubClass      0
          bInterfaceProtocol      0
          iInterface              5
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        1
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass      3
          bInterfaceProtocol      0
          iInterface              6
          Endpoint Descriptor:
            bLength                 7
           
           
      $ sudo lshw -c display
      *-graphics               
           Produkt: rockchipdrmfb
           Physische ID: d
           Logischer Name: /dev/fb0
           Fähigkeiten: fb
           Konfiguration: depth=32 resolution=1920,1080

    $ sudo dmesg -C   
    $ sudo dmesg -H
    [Jul19 12:00] usb 7-1: new high-speed USB device number 17 using xhci-hcd
    [  +0,162850] usb 7-1: New USB device found, idVendor=17ef, idProduct=30af, bcdDevice=60.90
    [  +0,000025] usb 7-1: New USB device strings: Mfr=10, Product=11, SerialNumber=0
    [  +0,000008] usb 7-1: Product: USB2.0 Hub
    [  +0,000006] usb 7-1: Manufacturer: Lenovo
    [  +0,045558] hub 7-1:1.0: USB hub found
    [  +0,000339] hub 7-1:1.0: 3 ports detected
    [  +0,287217] usb 7-1.3: new full-speed USB device number 18 using xhci-hcd
    [  +0,102859] usb 7-1.3: New USB device found, idVendor=17ef, idProduct=30a9, bcdDevice=30.80
    [  +0,000026] usb 7-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [  +0,000008] usb 7-1.3: Product: 40AY
    [  +0,000006] usb 7-1.3: Manufacturer: Lenovo
    [  +0,000006] usb 7-1.3: SerialNumber: 1S40AY0090EUZVR01WKQ
    [  +0,285455] usb 7-1.1: new high-speed USB device number 19 using xhci-hcd
    [  +0,103629] usb 7-1.1: New USB device found, idVendor=17ef, idProduct=30ac, bcdDevice=51.14
    [  +0,000026] usb 7-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [  +0,000008] usb 7-1.1: Product: USB2.0 Hub            
    [  +0,000007] usb 7-1.1: Manufacturer: VIA Labs, Inc.        
    [  +0,000006] usb 7-1.1: SerialNumber: 000000001
    [  +0,052349] hub 7-1.1:1.0: USB hub found
    [  +0,000125] hub 7-1.1:1.0: 4 ports detected
    [  +0,411473] usb 7-1.2: new full-speed USB device number 20 using xhci-hcd
    [  +0,118560] usb 7-1.2: New USB device found, idVendor=17ef, idProduct=30b0, bcdDevice= 0.42
    [  +0,000024] usb 7-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [  +0,000008] usb 7-1.2: Product: ThinkPad USB-C Dock Audio

I have also already read through the existing thread on the subject of USB monitor (https://forum.pine64.org/showthread.php?tid=10206) but did not notice a decisive hint. Or I did not recognize it...

Furthermore, I have already asked at ask-ubuntu, but got no response there.
  Reply
#2
Currently the HDMI through USB-C is broken in the mainline kernel for the pbp (iirc) but you can search for and build/install megi's kernel to restore it.
  Reply
#3
Ok. Thanks for the information. That was actually news to me!
So I know now that I have to live with it for now.
Building the kernel myself is not a option for me for now.
Maybe it will be patched in a future mainline kernel.
  Reply
#4
(07-24-2023, 08:42 AM)bnjmnhg Wrote: Ok. Thanks for the information. That was actually news to me!
So I know now that I have to live with it for now.
Building the kernel myself is not a option for me for now.
Maybe it will be patched in a future mainline kernel.


<- That was me a few weeks ago.
Now I've read al litte, tried a little, and finaly compiled a new kernell (on my destop, not on PBP).
So i feel prepeared to try it with megi's kernel.

But i didn't find a propper Tutorial yet. Yes, there are many how to build and install al kernel from linus git-repo. But megi's seams to be a little different. Huh 

I Found a already ready to Use Kernel (https://xff.cz/kernels/6.4/pbp.tar.gz) at megis current site. But the Readme isn't very exact.

Code:
Pre-built Linux 6.4 kernel for Pinebook Pro
=======================================================

How to use this
---------------

1a) Copy the kernel Image and board.dtb to a boot partition (put them in a
    subdirectory if you want)
1b) Alternatively use board.itb which combines Image and board.dtb into
    a single file.
2) Point extlinux.conf or boot.scr to these files
3) Copy modules/lib/modules to /lib directory in your root filesystem
4) Reboot

Does anyone have a little more exact guide on how to run megis kernel?
  Reply
#5
i can't recall off the top of my head, but you should have either a /BOOT folder or a BOOT partition. Disks will show you if there is a BOOT partition, if there is mount it. Look into that partition to determine if it uses an Image and board.dtb or if there's only an .itb file. You'll copy the ones in the megi archive into the BOOT partition to replace/sit next to the original files.
Next look in there for either the extlinux.conf or boot.scr file, edit it to include the paths to the megi files you copied into BOOT.
Then you'll sudo cp the modules folder content into /lib. per those instructions, i imagine this would be something like:
sudo cp [megi kernel root folder]/modules/lib/modules /lib

if everything went well, you should be able to reboot into megi's kernel. you can also try jumping into the community chat and asking megi for any clarification you may need. they've been pretty active in there lately.
  Reply
#6
>edit boot.scr
NO, this will NOT work
edit boot.cmd, then run mkimage with suitable parameters (don't remember)
----
sometimes boot.cmd is called boot.txt
  Reply
#7
I tried to continue a few days ago. However, with the worst possible outcome.

In detail: I put the board.itb (in a new subdor of /Boot) and the modules (in /lib). 

In the boot.scr, a boot.txt was referenced. So I didn't touch the former and adapted the latter.

Then I rebooted and this is what happened: Nothing

Everything was like before: the"old" kernel continued to run. I gave up for the time being.

A few days later I wanted to continue. But now the PinebookPro no longer boots. After switching on, the LED turns orange and the screen remains dark. I can't quite explain this.

I think that I haven't changed anything again after the first reboot. But maybe I am wring.  I will remove the eMMC when I'll find some time. Maybe it can be brought back to life that way. If not, I'll just have to start from scratch.
  Reply
#8
Hi @bnjmnhg,

I installed Megi's 6.5 kernel on my Pinebook Pro today to try it out and I can confirm the USB Type-C display is working, but just as before, it works only when you set the USB-C connector in one way, so if it doesn't work, you just need to flip the USB-C cable and the display should work.

Here is how I installed Megi's kernel it on my Pinebook Pro within my Manjaro KDE installation:
  • First download the Megi's kernel version you like from here https://xff.cz/kernels/, for example, I wanted Kernel 6.5 for my Pinebook Pro so I downloaded https://xff.cz/kernels/6.5/pbp.tar.gz and also it's ASC file to validate that the downloaded file wasn't corrupted.

  • Uncompress the pbp.tar.gz file wherever you like, for example, I uncompressed my pbp.tar.gz into my downloads folder and rename it megi6.5 so it the files will be uncompressed on my local /home/myuser/Downloads/megi6.5 directory.

    It should have the following files and directories:
    Quote:headers/
      include/
    modules/
      lib/
        modules/
          6.5.3-00504-gcd616e9bb06d-dirty/
    board.dtb
    board.itb
    board.its
    Image
    Image.lz4
    linux.config
    README

    Notice the 6.5.3-00504-gcd616e9bb06d-dirty sub-directory. This directory it's important and it's name will change depending on the kernel version you are installing

  • Now, cd into the uncompressed directory, for example, on my case I uncompressed the pbp.tar.gz into my downloads folder /home/myuser/Downloads/megi6.5 so the command for my computer would be:
    Code:
    cd /home/myuser/Downloads/megi6.5


  • Next, you need to merge the modules/lib sub-directory you just uncompressed into your local /lib directory (keep in mind that you will need to be root or use sudo to do this):
    Code:
    sudo cp -r ./modules/lib/modules/ /lib/

    If done right, you will now have the following directory on your computer: /lib/modules/6.5.3-00504-gcd616e9bb06d-dirty

  • Now we need to install the boot files, to do this simply create a new directory in your /boot directory and copy just the files (not the directories) from the uncompressed directory:
    Code:
    sudo mkdir /boot/megi6.5
    sudo cp ./* /boot/megi6.5/

    If done correctly (and assuming you are using Manjaro like me, other distros might vary) your local /boot directory should look similar to this:
    Quote:
    /boot/
      dtbs/
      extlinux/
      megi6.5/
        board.dtb
        board.itb
        board.its
        Image
        Image.lz4
        linux.config
        README
      idbloader.img
      Image
      initramfs-linux.img
      u-boot.itb

    (NOTE: technically speaking you could simply copy the Image and board.dtb files as far as I remember, but I like to keep it in a "better safe than sorry" way and copy every file into it :p)

  • Before we continue to the next step, you should backup your /boot/extlinux/extlinux.conf file since we are going to modify it and if done wrong, your OS won't boot, so it is always a good idea to keep a copy just in case. Simply copy this file somewhere safe.

  • The next step is to modify the /boot/extlinux/extlinux.conf file to use our /boot/megi6.5/Image and /boot/megi6.5/board.dtb files, for example my /boot/extlinux/extlinux.conf look like this before these changes:
    Quote:LABEL Manjaro ARM
    KERNEL /Image
    FDT /dtbs/rockchip/rk3399-pinebook-pro.dtb

    APPEND
    initrd=/initramfs-linux.img console=tty3 console=ttyS2,1500000 root=PARTUUID=ddc1aee8-62c8-497f-966a-7c91a00c2164 rw rootwait quiet splash plymouth.ignore-serial-consoles

    Notice the KERNEL and FDT parameters that are pointing to the files (relative to your local /boot directory) /Image and /dtbs/rockchip/rk3399-pinebook-pro.dtbd, those are the values we need to change so it points to Megi's files at /boot/megi6.5 directory, like this:
    Quote:LABEL Manjaro ARM MEGI-6.5
    KERNEL /megi6.5/Image
    FDT
    /megi6.5/board.dtb
    APPEND initrd=/initramfs-linux.img console=tty3 console=ttyS2,1500000 root=PARTUUID=ddc1aee8-62c8-497f-966a-7c91a00c2164 rw rootwait quiet splash plymouth.ignore-serial-consoles

    As you might have noticed, I have also added MEGI-6.5 on my LABEL, well that one is not required but I wanted to add it so that when my Pinebook Pro boots, it will print Manjaro ARM MEGI-6.5 and let me know that it is loading Megi's kernel instead of the one from Manjaro xD

  • Finally, the last step is to install the kernel headers. As far as I remember (please correct me if wrong) the headers should go inside /usr/local/include directory because it is a custom kernel, while the distro ones should go inside /usr/include, so you will need to copy them using this command:
    Code:
    sudo cp -r ./headers/include/ /usr/local/

And that's it, you can either shutdown/power up your Pinebook Pro or simply restart it and it will use Megi's kernel from now on. The install should also persists your OS updates unless it decides to override the /boot/extlinux/extlinux.conf file.

You should be able to use your external display now, just keep in mind that if it doesn't work at first, then simply flip the USB-C connector on the Pinebook Pro port and it should work (weird bug but that is how the current kernel patches works xD).

I hope this helps! Big Grin
  Reply
#9
(09-28-2023, 12:15 PM)bnjmnhg Wrote: A few days later I wanted to continue. But now the PinebookPro no longer boots. After switching on, the LED turns orange and the screen remains dark. I can't quite explain this.

I think that I haven't changed anything again after the first reboot. But maybe I am wring.  I will remove the eMMC when I'll find some time. Maybe it can be brought back to life that way. If not, I'll just have to start from scratch.

Your PBP is fine, the problem is that your /boot partition is broken, that is why it didn't boot nor print anything on the screen. I had this issue once long time ago while playing around with the boot files. You can fix it by simply replacing the files on your /boot partition with ones from a working image from the same distro you were using.

You can do that by either removing the eMMC stick from the PBP and use another computer to replace the files, or if you don't have an eMMC usb adapter, then you can try to install an image from the same distro into an USB-A and plug it on your PBP (I think it was the bluish port on the left) to then copy the files into the eMMC. Most of the time the PBP will boot from a live USB even if your eMMC uboot is broken :p
  Reply
#10
One more thing, it seems the compressed file doesn't include neither the kernel build sub-directory, nor the source one, so you won't be able to use dkms to build new modules nor build new modules from source manually using make for the kernel unless you download the linux kernel and applies Megi's git ref bundle to grab the linux kernel source from the right branch/tag (for example, it would be pbp-6.5 in my previous post) to then copy/paste the kernel source code inside /lib/modules/6.5.3-00504-gcd616e9bb06d-dirty/source directory.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Manjaro ARM: enabling external monitors & fixing Broadcom WiFi after updating trifleneurotic 2 1,766 11-14-2023, 10:57 AM
Last Post: trifleneurotic
  Sleep and external display - Are there any options? chris88233 7 3,268 09-04-2023, 09:03 PM
Last Post: wdt
Question External display doesn't work in TwisterOS (Armbian) TDC_PBP 0 1,827 08-21-2021, 02:46 PM
Last Post: TDC_PBP
  External USB C Monitor not working altacus 29 44,406 08-08-2021, 10:19 AM
Last Post: Dendrocalamus64
  External display stopped working, "dpcd read failed: -22" in dmesg zackw 3 6,166 05-01-2020, 03:14 AM
Last Post: Valinor

Forum Jump:


Users browsing this thread: 1 Guest(s)