Bug 973486 - Custom resolution not picked up by Gnome in xrdp/VNC session
Custom resolution not picked up by Gnome in xrdp/VNC session
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: gnome-settings-daemon (Show other bugs)
20
i686 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Bastien Nocera
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-11 23:28 EDT by Bojan Smojver
Modified: 2015-06-29 08:00 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-06-29 08:00:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Dialog box saying that no such mode exists (24.42 KB, image/png)
2013-06-12 02:11 EDT, Bojan Smojver
no flags Details

  None (edit)
Description Bojan Smojver 2013-06-11 23:28:22 EDT
Description of problem:
First, I'm reporting this against gnome-desktop3, because I am not really sure which component would really be in charge of this. Second, this is a regression since F-18.

Upgraded to F-19 current and when I connect to my xrdp session using a custom resolution (1600 x 850), Gnome tells me that this does not match any known modes (gives a big dialog box listing modes to which the only option is to exit). This disconnects xrdp session. On the next connect, Gnome is running in 1920 x 1200 mode. No drama, I issue this in the shell (modeline produced by cvt):

xrandr --newmode "1600x850_60.00"  111.75  1600 1696 1856 2112  850 853 863 883 -hsync +vsync
xrandr --addmode VNC-0 1600x850_60.00

Session gets disconnected and when I login I get 1600 x 850. Cool.

Then I go to the control panel and apply these custom display settings, which get saved into .config/monitors.xml.

However, on the next logout/login (note: note disconnect - new session), this is not picked up and I have to do all of the above again. This was not the case in F-18.

Note that Xvnc (started by xrdp) is running with the correct geometry option, just like it did in F-18.

Version-Release number of selected component (if applicable):
gnome-desktop3-3.8.2-2.fc19.i686

How reproducible:
Always.

Steps to Reproduce:
1. See above.

Actual results:
Incorrect resolution forced.

Expected results:
Worked fine in F-18.

Additional info:
Comment 1 Bojan Smojver 2013-06-12 02:11:33 EDT
Created attachment 759960 [details]
Dialog box saying that no such mode exists
Comment 2 Bojan Smojver 2013-06-19 22:54:25 EDT
Let's try setting daemon - seems like there is code in there that's supposed to do this.
Comment 3 Bojan Smojver 2013-06-20 02:01:56 EDT
Workaround: disable xrandr plugin for gnome-settings-daemon. So, something is busted there.
Comment 4 Greg Sheremeta 2013-09-11 11:21:47 EDT
Disabling xrandr worked for me too. Thanks for that.

sudo yum install -y dconf-editor
dconf-editor
browse to org -> gnome -> settings-daemon -> plugins > xrandr
and uncheck Active

I can now connect using rdesktop and force a resolution.
rdesktop -g 800x600 192.168.1.xxx
Comment 5 Bojan Smojver 2013-12-03 06:33:05 EST
That workaround does not work in F20.

For whatever reason, inside Xvnc started by xrdp, xrandr cannot see the actual resolution. So, I put dirty hack in /etc/X11/xinit/xinitrc.d:
------------------
#!/bin/bash
g=$(pgrep -af "Xvnc ${DISPLAY/\.*/}" | cut -f 5 -d ' ')
m=$(cvt $(echo $g | tr x ' ') | tail -n -1 | cut -f 2- -d ' ' | tr -d '"')
s=$(xrandr | grep connected | cut -f 1 -d ' ')
n=$(echo $m | cut -f 1 -d ' ')
xrandr --newmode ${m[@]}
xrandr --addmode $s $n
------------------
Comment 6 Bojan Smojver 2013-12-03 17:52:35 EST
(In reply to Bojan Smojver from comment #5)
>  So, I put dirty hack in /etc/X11/xinit/xinitrc.d:

Probably slightly safer hack:
-------------------
#!/bin/bash
g=$(pgrep -af "Xvnc.*${DISPLAY/\.*/}" | \
    sed -e 's/.*-geometry \+\([0-9x]\+\).*/\1/' 2>/dev/null)
if [ -n "$g" ]; then
  m=$(cvt $(echo $g | tr x ' ') | grep ^Modeline | cut -f 2- -d ' ' | tr -d '"')
  s=$(xrandr | grep connected | cut -f 1 -d ' ')
  n=$(echo $m | cut -f 1 -d ' ')
  xrandr --newmode ${m[@]}
  xrandr --addmode $s $n
fi
-------------------
Comment 7 Bojan Smojver 2013-12-10 19:38:42 EST
Note that the above hack (from comment #5 or comment #6) only works if .config/monitors.xml exists. In other words, one has to go to settings and pick that display resolution (which will write that file).
Comment 8 Henderb Rodriguez 2014-01-04 23:57:37 EST
Hello all.


I can't install dconf-editor:

[henderb@kepler ~]$ sudo yum install -y dconf-editor
....
Downloading packages:
Running transaction check
Running transaction test


Transaction check error:
  file /usr/share/glib-2.0/schemas/ca.desrt.dconf-editor.gschema.xml from install of dconf-editor-0.18.0-2.fc20.i686 conflicts with file from package dconf-0.14.1-3.fc18.i686

Resumen de errores
-------------

[henderb@kepler ~]$ 

However, i solved my screen size problems with the following commands in the remote desktop (you must do the trick in the "bad" screen size display):

[henderb@kepler ~]$ xrandr 
Screen 0: minimum 32 x 32, current NNNN x MMM, maximum 32768 x 32768
VNC-0 connected primary NNNNxMMM+0+0 0mm x 0mm
   1920x1200      60.0  
   1920x1080      60.0  
   1600x1200      60.0  
   1680x1050      60.0  
   1400x1050      60.0  
   1360x768       60.0  
   1280x1024      60.0  
   1280x960       60.0  
   1280x800       60.0  
   1280x720       60.0* 
   1024x768       60.0  
   800x600        60.0  
   640x480        60.0  
[henderb@kepler ~]$ xrandr -s 1280x720
[henderb@kepler ~]$ 

Hope this helps.
Comment 9 Bojan Smojver 2015-04-28 03:15:18 EDT
This kinda works in F-21/22. On first ever login, xrdp won't be able to connect. However, later on, a connection will be established and Gnome will suggest a custom resolution in display settings (based on VNC).

So, from my perspective, this can be closed.
Comment 10 Fedora End Of Life 2015-05-29 05:07:00 EDT
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 11 Fedora End Of Life 2015-06-29 08:00:35 EDT
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.