Announcement

Collapse
No announcement yet.

amdgpu external monitor and tty

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • amdgpu external monitor and tty

    Hi there,

    I use an external monitor connected to a AMD Raven Ridge powered laptop, a Thinkpad, via HDMI. I usually only and mostly use the extenal monitor, the laptop screen is turned off with randr.

    Now, when I switch to a tty console from KDE, sometimes I get the console as expected on my external monitor. But most of the time the external monitor is just blank when switching to the tty.

    I am not able to tell when I can see the tty on my external moni and when I cannot. For example, after booting I got no tty on my external monitor, some time later I tried again and now I get the tty on my external....

    Google found hints say, this has to do with the framebuffer bound to X. According to Google lots of laptop users using external monitor have this problem to get the tty on their external showing up.

    Is there anything I can do with amdgpu related options? Or is this an Xorg issue?

    Maybe there is no solution, at least it would be nice to understand the underlying problem. Maybe there is a bad hack or workaround to get the tty on the HDMI monitor.

    Code:
    My setup:
    AMD Raven Ridge laptop
    Kernel 5.4
    Xorg 7.6.1
    X server 1.20
    KDE Plasma 5.12.8
    Thanks!
    Last edited by Fernseher; 20 January 2020, 08:55 AM.

  • #2
    well, that's a really interesting problem. at this stage the the amdgpu kms driver doesn't support multiple monitors with their own terminal shell. so every monitor or TV should at least theoretically be a clone of the same shell.

    i don't think I'm using the right terminology, but I hope you understand what I mean. anyway why you are just getting a black screen instead of a clone of the terminal shell is something strange to me.

    EDIT: another thing is that TV's are notorious for using strange resolutions or refresh rates so you may need to override your monitors edid settings with known good values. this is instructions for arch Linux but it may give a guide to get it working.
    Last edited by duby229; 20 January 2020, 11:12 AM.

    Comment


    • #3
      The console running over fbdev is handled by the fbdev emulation code in the core drm. From the driver's perspective, it generally just looks like any other mode set. fbdev emulation is a bit difficult because the old fbdev interface assumes a single monitor per device. The fbdev emulation code tries to do the right thing as much as possible and light up as many displays as possible, but depending on the display topology that is not always possible.

      Comment


      • #4
        Originally posted by duby229 View Post
        well, that's a really interesting problem. at this stage the the amdgpu kms driver doesn't support multiple monitors with their own terminal shell. so every monitor or TV should at least theoretically be a clone of the same shell.

        i don't think I'm using the right terminology, but I hope you understand what I mean. anyway why you are just getting a black screen instead of a clone of the terminal shell is something strange to me.(....)
        I was not able to clone X/KDE screen. But now I am and I found the root of the problem.
        It seems to be a refresh rate sync problem.
        When I set HDMI-A-0 to 59.9 Hz and eDP to 60 Hz I can clone the X screen and I get a tty on HDMI-A-0!

        The necessary command is:

        Code:
        xrandr --output eDP --mode 1920x1080 --rate 60  --output HDMI-A-0 --same-as eDP --mode 1920x1080 --rate 59.9
        Cool! Sometimes KDE seems to disable compositing, I just reenabled it.

        I now use this script $HOME/.config/autostart-scripts/xrandr-kde.sh

        Code:
        #!/bin/sh
        
        /usr/bin/xrandr --output HDMI-A-0 --mode 1920x1080 --rate 59.9  --primary --output eDP --off
        This enables my external HDMI-A-0 and disables the laptop screen and now I get my tty on HDMI :-)

        Should I need to clone laptop and HDMI I use this command:

        xrandr --output eDP --mode 1920x1080 --rate 60.0 --output HDMI-A-0 --same-as eDP --mode 1920x1080 --rate 59.9

        Some people recommend trying amdgpu.dcfeaturemask=2 with kernel 5.4, but this made no difference to me. The above xrandr commands now work :-)

        It seems to be a timing issue. Maybe this even is not a bug in a narrow sense, just odd behaviour.
        Last edited by Fernseher; 23 January 2020, 05:21 PM.

        Comment

        Working...
        X