Remote display detection breaks VDPAU video display on Fedora (at least)

Started by eumagga0x2a, November 20, 2016, 11:33:46 AM

Previous topic - Next topic

eumagga0x2a

I've missed an elephant in the room. It turned out that I actually never used VDPAU video output in Avidemux because the condition

        if(strcmp(displ,":0") && strcmp(displ,":0.0"))
        {
                printf("Looks like remote display, no Xv :%s\n",displ);
                return RENDER_GTK;
        }


in the function UI_getPreferredRender in avidemux/common/gui_main.cpp:1564 disables hwaccel on Fedora, where $DISPLAY is :1 for local display by default (probably due to X running as user and the first display occupied by display manager?). The check if $DISPLAY is :0 is a bad idea, unfortunately. What should we do? Dump the check completely or advertise a downstream patch for Fedora to bump the expected value?

Unfortunately. displaying a video via VDPAU doesn't reduce CPU load  :(

Jan Gruuthuse

vdpau works here on both screens/monitors (nv-control version 1.29)


eumagga0x2a

I'm sorry, Jan, but this is not what this topic is about. If you run

echo $DISPLAY

and the returned value is not :0 or :0.0, Avidemux assumes that it is running in a remote session and disables VDPAU display (VDPAU decoding is a different thing and doesn't suffer). If the X server is running as user, the local $DISPLAY is not :0 and VDPAU output gets wrongly disabled.

Jan Gruuthuse

thanks for explaining, here it says
echo $DISPLAY
Quote:0
on each monitor

eumagga0x2a

This means you are not affected by the issue. Could you please post the output of

ps -el | grep -i xorg

?

Jan Gruuthuse

ps -el | grep -i xorg
Quote4 S     0  1323  1283  9  80   0 - 502997 -     tty7     00:13:01 Xorg

eumagga0x2a

Thanks, you have just one Xorg process (running as root). On Fedora there are two (on different TTYs, of course): the first one for the display manager (gdm) and the second for the user.

Hoping for a feedback from Mean which course should be taken. For me, it is better if Avidemux comes down in pieces for 0.01% of users who launch it in a remote session than it withholds hwaccel from 99.99% of the total number of Linux users  ;)

mean

The check can indeed be removed
It should boost the speed of VDPAU for you :)

eumagga0x2a

I've submitted a pull request. Yes, the performance boost /CPU usage drop is impressive on condition of not using the default "gtk" Qt theme  :)

With the "gtk" Qt style I get ~30% CPU, with "fusion" mostly below 12%.