Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-01-27 09:39:34

Yuri
Member
Registered: 2021-01-27
Posts: 2

xfce 4.16, ubuntu 20.04, xrandr and 2 display configuration with TV

Hi guys,

My first words must be congratulations to developers and community. Xfce4 is one of the best window manager. I really appreciate your work. Thank you guys!

------------

Now about the problem. My apologies for very long letter.

My hardware configuration is quite old:

Nvidia geforce 8600gt
  - Asus mm17d LCD display (connected to DVI)
  - Philips 26PFL3404/12       (connected to S-Video)

However I was using this configuration under ubuntu 18.04 with older Xfce4 version w/o any problem. I constructed xorg.conf manually. Asus LCD was working at 1280x1024@75 and Philips TV at 720p@60 (1280x720). I didn't use xfce4-display application to configure screen layout and TV showed me correctly by default. I was able to add icons and start applications on the second TV screen by default. The screens were separate entities and in xorg.conf they looked like this:

    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" LeftOf "Screen0"

Worked great until I installed Ubuntu 20.04 and XFCE 4.16 with Nvidia-340 driver. My xorg.conf stopped working.

Now XFCE4 shows black screen for Philips TV (the screen is black. I still can open an application on it problems using xfce4-terminal --display :0.1 but nothing else. Xfce4 doesn't see it as a screen. Also when I quit from Xfce4 session the next SFC4 session is rather strange. Xfce4-panel disappears from main Asus window so do window headers for all applications.

I tried to remove xorg.conf and let nvidia-settings do the job. No luck. Same thing. Then I tried to set up display using XFCE4 display tool. I've managed to see the TV but in lower resolution, 1024x768 (instead of 720p). Picture looks really ugly, so the real resolution is even lower I think.

I decided to add 720p mode using xrandr to let XFCE4 see the TV at full resolution. No luck. xrandr didn't allow me to add a new mode to TV-0 device (the name how the TV is connected to card).

xrandr --newmode "1280x720p" 74.250 1280 1390 1430 1650 720 725 730 750 +hsync +vsync
xrandr --addmode TV-0 "1280x720p"  <-- this is where the problem is. The error message is:
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  18 (RRAddOutputMode)
  Serial number of failed request:  33
  Current serial number in output stream:  34

I tried different modlines here with no luck. But at the same time the following command works:
xrandr --addmode DVI-I-1 "1280x720p"  (I can add this new mode to Asus LCD display w/o no problems).


How can I overcome this?

I think I have at least 3 options here

1. Make XFCE4 working with 2 screens (with xfce4-panels, window headers etc) at higher resolution with custom xorg.conf. At least I need xfce 4.16 not to break its own configuration after logout

2. Add a custom 720p mode using xrandr so the xfce-display-settings application start working with TV at its native resolution.

BTW I tried to edit ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml to replace 1024x768 with 1280x720. No lack. The xml file is re-generated on start-up

    <property name="TV-0" type="string" value="Television">
      <property name="Active" type="bool" value="true"/>
      <property name="EDID" type="string" value=""/>
      <property name="Resolution" type="string" value="1024x768"/>
      <property name="RefreshRate" type="double" value="60.001123"/>
      <property name="Rotation" type="int" value="0"/>
      <property name="Reflection" type="string" value="0"/>
      <property name="Primary" type="bool" value="false"/>
      <property name="Position" type="empty">
        <property name="X" type="int" value="0"/>
        <property name="Y" type="int" value="1024"/>
      </property>
    </property>


3. Add a custom modline for TV in xorg.conf in 1 screen configuration like this:

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DVI-I-0: 1280x1024_75 +0+0, TV-0: nvidia-auto-select +1024+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection


But how to do this? Following line doesn't work for me as I can't specify a custom 1280x720 modline for my TV when using 1 screen config:

    Option         "metamodes" "DVI-I-0: 1280x1024_75 +0+0, TV-0: 1280x720 +1024+0"

Is there a method to put modline into Screen0 section for TV only?

Last edited by Yuri (2021-01-27 10:21:11)

Offline

#2 2021-01-29 02:05:43

firstairbender
Member
From: Canada
Registered: 2020-08-28
Posts: 22

Re: xfce 4.16, ubuntu 20.04, xrandr and 2 display configuration with TV

I primarily use a laptop for Linux, and my laptop is dual (optimus) graphics (Nvidia/Intel). I use Optimus manager in hybrid mode to make it work for XFCE. Now I don't know if the same process is required on Desktop setups, but maybe you can try Optimus manager, or nvidia-prime for Ubuntu to see if they fix the problem.

Gl

Offline

#3 2021-01-29 09:24:41

Yuri
Member
Registered: 2021-01-27
Posts: 2

Re: xfce 4.16, ubuntu 20.04, xrandr and 2 display configuration with TV

firstairbender wrote:

I primarily use a laptop for Linux, and my laptop is dual (optimus) graphics (Nvidia/Intel). I use Optimus manager in hybrid mode to make it work for XFCE. Now I don't know if the same process is required on Desktop setups, but maybe you can try Optimus manager, or nvidia-prime for Ubuntu to see if they fix the problem.

Gl

Thanks for answering. This solution might be interesting. I'll consider it if I get stuck with handmade xorg.conf.

Currently I've made a new xorg.conf and managed to enable 1080i for my old good TV. I have 2 devices scheme. I start applications from main display like this

   export DISPLAY=:0.1
   vlc
  (or chrome or smplayer or xterm)

My second monitor (TV) is still blank but I can see the mouse and can control the application. Older version of XFCE4 worked great with this configuration, showed background and allowed to created icon and fire App menu. But 4.16 doesn't.

In this configuration Nvidia driver plays mpeg great. Zero CPU load. But... when I stop the application (this relates only to mpeg players (smplayer or vlc)), the CPU load jumps to 90% for xfwv4 and Xorg processes.

I found a couple of workarounds like below but none of them work for me:

   xfconf-query -c xfwm4 -p /general/vblank_mode -t string -s "xpresent" --create

or stop compositing and start again

   xfconf-query -c xfwm4 -p /general/use_compositing -s false
   vlc
   xfconf-query -c xfwm4 -p /general/use_compositing -s true

Again everything is Ok until I stop video player. Looks like a bug and I'm going to report it.

Last edited by Yuri (2021-01-29 09:30:29)

Offline

Board footer

Powered by FluxBB