Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ubuntu 14.04 - How to change SYSTEM, not user, resolution and refresh rate

517 views
Skip to first unread message

Java Jive

unread,
Feb 9, 2016, 9:50:09 PM2/9/16
to
I have two Ubuntu 14 based PCs using a Viewsonic VG712s monitor via
KVM. One of the 'features' of this monitor is that the 'default'
monitor refresh rate of 60Hz loses up to about a cm's worth of screen
content off the left and right screen margins, whereas the 75Hz choice
displays correctly.

Unfortunately, whenever I install any flavour of Linux it always
chooses the 60Hz option as the systemwide setting, and usually, as in
Ubuntu 14, doesn't give the option of correcting this at installation
time, however in most previous versions of Linux I've been able to
work out how to correct it post installation, but not in Ubuntu 14.

I can set it manually for one session by ...
xrandr --output VGA1 --mode 1280x1024 --rate 75.0
... and I've also put this command in a script and checked that the
script is runnable and runs correctly. However of course this doesn't
correct the login screen or other users, neither does it survive a
reboot.

How in U14 can I *permanently* set the *systemwide* monitor resolution
and refresh rate? As a result of various internet searches, I've
tried:

1) Creating /etc/lightdm/lightdm.conf ...
[SeatDefaults]
display-setup-script=<above script>
... but no change.

2) Editing /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf to add a
line ...
display-setup-script=<above script>
... but this seems to replace the entire GUI configuration, so there
is no real functionality, and one is left navigating around system
alerts, and can never get to the login screen.

3) Editing /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf
to add a line ...
xserver-command=<above command>
... but the login screen never appears.

4) Installing compiz and making changes in there, but this seems to
have no effect even on the current session, let alone the system
defaults.

Other hits suggest, for example, editing xorg.conf, but these appear
to apply to older versions of Ubuntu, and in this version there is no
such file.

I've tried to work out how the GUI is initialised, but one ends up in
a maze of scripts calling other scripts, and finding the right
'pressure point' to insert a command such as the above is like
searching for the proverbial needle in a haystack.

I've been tearing out my hair about this in a struggle which has
lasted on and off for months or more. I can't believe that such a
trivial change, which is so simple to do in Windows, can be so
difficult/impossible in Ubuntu. Is anyone here knowledgeable enough
about the configuration path that is followed in bringing up X/lightdm
to know whereabouts a command such as the above could be effectively
called, and so preserve my rapidly vanishing sanity?
--
========================================================
Please always reply to ng as the email in this post's
header does not exist. Or use a contact address at:
http://www.macfh.co.uk/JavaJive/JavaJive.html
http://www.macfh.co.uk/Macfarlane/Macfarlane.html

Dave Farrance

unread,
Feb 10, 2016, 3:09:13 AM2/10/16
to
Java Jive <ja...@evij.com.invalid> wrote:

>I've been tearing out my hair about this in a struggle which has
>lasted on and off for months or more. I can't believe that such a
>trivial change, which is so simple to do in Windows, can be so
>difficult/impossible in Ubuntu. Is anyone here knowledgeable enough
>about the configuration path that is followed in bringing up X/lightdm
>to know whereabouts a command such as the above could be effectively
>called, and so preserve my rapidly vanishing sanity?

I'm using Debian but I presume that Ubuntu is the same for this:

/etc/xdg/autostart/ contains ".desktop" application launch files that
start with the x-server. Create one to call your script.

Dave Farrance

unread,
Feb 10, 2016, 3:28:16 AM2/10/16
to
Dave Farrance <DaveFa...@OMiTTHiSyahooANDTHiS.co.uk> wrote:

>/etc/xdg/autostart/ contains ".desktop" application launch files that
>start with the x-server. Create one to call your script.

Oh, and make sure that the 'other' read and execute bits are set on the
.desktop file and the script, because although root owned, they will be
executed by the user being logged in.

crankypuss

unread,
Feb 10, 2016, 4:39:02 AM2/10/16
to
Java Jive wrote:

> I've been tearing out my hair about this in a struggle which has
> lasted on and off for months or more. I can't believe that such a
> trivial change, which is so simple to do in Windows, can be so
> difficult/impossible in Ubuntu. Is anyone here knowledgeable enough
> about the configuration path that is followed in bringing up X/lightdm
> to know whereabouts a command such as the above could be effectively
> called, and so preserve my rapidly vanishing sanity?

1. I don't know the specifics of Ubuntu 14.04, I went from Ubuntu 11.10
to Debain-wheezy and now to Debian-jessie where I expect to stay put for
a while.

2. I'm not very knowledgable with regard to linux configuration.

3. I did manage to insert a "global profile run as root" into my Ubuntu
11.10 install. I don't know whether 14.04 is still using upstart; if it
is, the following might help. It runs "localBootInit" as root after
fstab has been processed but before the greeter (display-manager) is
invoked:

<start-code>

/* this program is invoked by the following pre-start script which
is
stored as: /etc/init/local_boot_init.conf

it modifies files in /usr/share/unity-greeter

------------------------------------------------------------------------------
# local_boot_init.conf

description "perform any local processes appropriate at system startup"

start on ((filesystem and runlevel [!06] and started dbus)
or runlevel PREVLEVEL=S)

script
/USERDATA/lnk/appsReleasedStable/localBootInit
stop
end script

------------------------------------------------------------------------------
*/

<end code>

hth.

--
http://totally-portable-software.blogspot.com
[Sun Nov 22: "Total Portability is not binary"]

Jim Price

unread,
Feb 10, 2016, 4:45:14 AM2/10/16
to
On 10/02/16 02:50, Java Jive annoyingly crossposted:
<xpost removed>
> I have two Ubuntu 14 based PCs using a Viewsonic VG712s monitor via
> KVM.

VGA or DVI/HDMI?

> One of the 'features' of this monitor is that the 'default'
> monitor refresh rate of 60Hz loses up to about a cm's worth of screen
> content off the left and right screen margins, whereas the 75Hz choice
> displays correctly.

Probably VGA then. If so, adjust your monitor to display 60Hz correctly.
That is the native refresh rate of your monitor, and there is nothing to
be gained by sending it a signal at 75Hz and having it convert it to 60.
All that gets you is a fractional drop in display quality, which might
not be noticeable, but is not desirable. It does not give you an actual
75Hz picture.
If you want to continue fighting the design of the hardware and software
in order to make it work slightly less well then try disabling KMS or
messing with a custom EDID. I do not recommend this approach - do so at
your own risk. Don't blame me if you break your monitor. If documented
changes to lightdm still don't work, you could check that it is actually
the dm being used, as if it isn't, that's another reason you might be
chasing your tail. All that is moot until you fix your monitor settings.

--
JimP

Adrian Caspersz

unread,
Feb 10, 2016, 6:03:19 AM2/10/16
to
On 10/02/16 02:50, Java Jive wrote:
> I have two Ubuntu 14 based PCs using a Viewsonic VG712s monitor via
> KVM. One of the 'features' of this monitor is that the 'default'
> monitor refresh rate of 60Hz loses up to about a cm's worth of screen
> content off the left and right screen margins, whereas the 75Hz choice
> displays correctly.
>
> Unfortunately, whenever I install any flavour of Linux it always
> chooses the 60Hz option as the systemwide setting, and usually, as in
> Ubuntu 14, doesn't give the option of correcting this at installation
> time, however in most previous versions of Linux I've been able to
> work out how to correct it post installation, but not in Ubuntu 14.
>

Most of what you are doing is built into the driver setup. I spent a lot
of time in a similar way, but then I used to be king of the modelines.

I'm using nvidia on two monitors (1 VGA, the other HDMI) with Ubuntu 14.04

Connect them directly to your machine (i.e no VGA switchbox) and they
will configure. You just need to find the driver setup utils for your
graphics card.

(like windows....)

--
Adrian C

marrgol

unread,
Feb 10, 2016, 7:36:56 AM2/10/16
to
On 2016-02-10 03:50, Java Jive wrote:
> Other hits suggest, for example, editing xorg.conf, but these appear
> to apply to older versions of Ubuntu, and in this version there is no
> such file.

Then create one - either

/etc/X11/xorg.conf

or

/etc/X11/xorg.conf.d/anyname.conf

with just the "Monitor" section, e.g. (might need tuning):

Section "Monitor"
Identifier "Default Monitor"
HorizSync 30.0 - 82.0
VertRefresh 75.0
Option "DPMS"
EndSection

Read 'man corg.conf' for details.

--
mrg

Java Jive

unread,
Feb 10, 2016, 3:03:31 PM2/10/16
to
On Wed, 10 Feb 2016 13:36:55 +0100, marrgol <mar...@address.invalid>
wrote:
>
> Then create one - either
>
> /etc/X11/xorg.conf

[snip]

> with just the "Monitor" section, e.g. (might need tuning):
>
> Section "Monitor"
> Identifier "Default Monitor"
> HorizSync 30.0 - 82.0
> VertRefresh 75.0
> Option "DPMS"
> EndSection
>
> Read 'man corg.conf' for details.

No change, login screen is still at 60Hz.

Java Jive

unread,
Feb 10, 2016, 5:39:56 PM2/10/16
to
Tried the following in monitor.desktop to no avail:

[Desktop Entry]
Type=Application
Name=Monitor Mode
Comment=Set the correct monitor mode
Exec=/usr/bin/xrandr --output VGA1 --mode 1152x864 --rate 75.0
NotShowIn=Unity
NoDisplay=true
StartupNotify=false
Terminal=false

Andy Furniss

unread,
Feb 10, 2016, 6:10:11 PM2/10/16
to
Java Jive wrote:
> On Wed, 10 Feb 2016 08:28:14 +0000, Dave Farrance
> <DaveFa...@OMiTTHiSyahooANDTHiS.co.uk> wrote:
>
>> Dave Farrance <DaveFa...@OMiTTHiSyahooANDTHiS.co.uk> wrote:
>>
>>> /etc/xdg/autostart/ contains ".desktop" application launch files that
>>> start with the x-server. Create one to call your script.
>>
>> Oh, and make sure that the 'other' read and execute bits are set on the
>> .desktop file and the script, because although root owned, they will be
>> executed by the user being logged in.
>
> Tried the following in monitor.desktop to no avail:
>
> [Desktop Entry]
> Type=Application
> Name=Monitor Mode
> Comment=Set the correct monitor mode
> Exec=/usr/bin/xrandr --output VGA1 --mode 1152x864 --rate 75.0

http://www.viewsoniceurope.com/uk/products/archive/VG712s.php#pSpecs

says optimum 1280x1024 - accepting you may want to run lower.

Personally I would first go for trying to "teach" the monitor to look
right with the mode it is using as already suggested.

Unless restricted by GPU outputs I would also prefer DVI over VGA it
certainly looks better on my monitor.

marrgol

unread,
Feb 10, 2016, 8:08:24 PM2/10/16
to
On 2016-02-10 21:03, Java Jive wrote:
>> /etc/X11/xorg.conf
>> with just the "Monitor" section, e.g. (might need tuning):
>>
> No change, login screen is still at 60Hz.

OK, seems that a minimal "Screen" section is required too - to force
Xorg to use the monitor from "Monitor" section. Try adding:

Section "Screen"
Identifier "Default Screen"
Monitor "Default Monitor"
EndSection


--
mrg

Java Jive

unread,
Feb 11, 2016, 8:43:18 AM2/11/16
to
On Thu, 11 Feb 2016 02:08:23 +0100, marrgol <mar...@address.invalid>
wrote:
>
> OK, seems that a minimal "Screen" section is required too - to force
> Xorg to use the monitor from "Monitor" section. Try adding:
>
> Section "Screen"
> Identifier "Default Screen"
> Monitor "Default Monitor"
> EndSection

At last! Something that actually works! Many thanks!

Now, another few wasted hours trying to find out how to ...
Set the SYSTEM-WIDE keyboard layout to be UK
Remove the keyboard indicator SYSTEM-WIDE
Remove the accessibility indicator SYSTEM-WIDE
Change the date and time format in the taskbar SYSTEM-WIDE

I'm currently struggling with the last of the above, and rapidly
losing the will to live. Why, with every new version of any OS you
care to name, do these formerly simple customisations become less and
less possible? Why do they keep 'fixing' - in other words
'breaking' - what formerly used to work?

I propose that Unity should be renamed Orwell 1984. In fact, why
bother to go to the trouble and expense of creating Unity at all? Why
even Ubuntu? Perhaps I should just try another distribution that
doesn't have ideas above its station as a plain, common-or-garden
operating system that 'just works' in the manner that we have now
become to regard as 'traditional'.

Sorry about the rant, but I'm getting old, have less time to waste
than when I was younger, and bitterly resent the ever-increasing waste
of that precious resource that just keeping PCs going seems to require
nowadays. Time was, when you turned on a PC, you could get to work
soon afterwards, but it seems no longer!

Davey

unread,
Feb 11, 2016, 11:55:35 AM2/11/16
to
On Thu, 11 Feb 2016 13:43:16 +0000
Java Jive <ja...@evij.com.invalid> wrote:

> I'm currently struggling with the last of the above, and rapidly
> losing the will to live. Why, with every new version of any OS you
> care to name, do these formerly simple customisations become less and
> less possible? Why do they keep 'fixing' - in other words
> 'breaking' - what formerly used to work?
>
> I propose that Unity should be renamed Orwell 1984. In fact, why
> bother to go to the trouble and expense of creating Unity at all? Why
> even Ubuntu? Perhaps I should just try another distribution that
> doesn't have ideas above its station as a plain, common-or-garden
> operating system that 'just works' in the manner that we have now
> become to regard as 'traditional'.
>
> Sorry about the rant, but I'm getting old, have less time to waste
> than when I was younger, and bitterly resent the ever-increasing waste
> of that precious resource that just keeping PCs going seems to require
> nowadays. Time was, when you turned on a PC, you could get to work
> soon afterwards, but it seems no longer!

As a user rather than a Linux expert, I sympathise. Personally, ever
since the ghastly 'Unity' came along, I have reverted to the Classic
theme, which does me just fine, and is familiar. Many others have given
up on Ubuntu and prefer plain Debian, although I tried it, once, and it
wouldn't work for me, so I stayed with Ubuntu. But I am fully prepared
for Ubuntu to one day be so terrible that I will follow the Debian
crowd, and try it again.

When I started to use Ubuntu, I saw many claims that it 'would just
work', except that it didn't work with my laptop's modem, which of
course was the fault of the modem, not a failure of Linux to 'just
work', so I was repeatedly told. There are other instances too, such
as my TV Capture device, which works just fine with its Win7
programme, but I can't get it to work with Ubuntu, nor would it when I
asked for knowledgeable help. It MIGHT be possible for it to work, but
why spend an unknown amount of time, when I can just boot into Windows
on those odd occasions when I need to use it?

--
Davey.

Chris

unread,
Feb 11, 2016, 1:28:19 PM2/11/16
to
Davey <da...@example.invalid> Wrote in message:
I like Xubuntu. It has the advantages of Ubuntu, but with a
useable interface.

> When I started to use Ubuntu, I saw many claims that it 'would just
> work', except that it didn't work with my laptop's modem, which of
> course was the fault of the modem, not a failure of Linux to 'just
> work', so I was repeatedly told. There are other instances too, such
> as my TV Capture device, which works just fine with its Win7
> programme, but I can't get it to work with Ubuntu, nor would it when I
> asked for knowledgeable help. It MIGHT be possible for it to work, but
> why spend an unknown amount of time, when I can just boot into Windows
> on those odd occasions when I need to use it?

Problem is many devices are made as cheaply as possible which
often means functionality is built into the software drivers
instead of the hardware. This makes the device Windows-only as
it's the only system manufacturers support.


--


----Android NewsGroup Reader----
http://usenet.sinaapp.com/

crankypuss

unread,
Feb 11, 2016, 1:31:59 PM2/11/16
to
Java Jive wrote:

> On Thu, 11 Feb 2016 02:08:23 +0100, marrgol <mar...@address.invalid>
> wrote:
>>
>> OK, seems that a minimal "Screen" section is required too - to force
>> Xorg to use the monitor from "Monitor" section. Try adding:
>>
>> Section "Screen"
>> Identifier "Default Screen"
>> Monitor "Default Monitor"
>> EndSection
>
> At last! Something that actually works! Many thanks!
>
> Now, another few wasted hours trying to find out how to ...
> Set the SYSTEM-WIDE keyboard layout to be UK
> Remove the keyboard indicator SYSTEM-WIDE
> Remove the accessibility indicator SYSTEM-WIDE
> Change the date and time format in the taskbar SYSTEM-WIDE
>
> I'm currently struggling with the last of the above, and rapidly
> losing the will to live. Why, with every new version of any OS you
> care to name, do these formerly simple customisations become less and
> less possible? Why do they keep 'fixing' - in other words
> 'breaking' - what formerly used to work?

Yes, it happens with "any OS you care to name". And it sucks.

> I propose that Unity should be renamed Orwell 1984. In fact, why
> bother to go to the trouble and expense of creating Unity at all? Why
> even Ubuntu? Perhaps I should just try another distribution that
> doesn't have ideas above its station as a plain, common-or-garden
> operating system that 'just works' in the manner that we have now
> become to regard as 'traditional'.

You're likely to run into the same issues on any other distro but there
are likely to be different solutions to the same problems. I'm running
Debian-jessie and don't plan to change that until 2020 when the jessie
repos turn into pumpkins.

> Sorry about the rant, but I'm getting old, have less time to waste
> than when I was younger, and bitterly resent the ever-increasing waste
> of that precious resource that just keeping PCs going seems to require
> nowadays.

I agree 100%.

> Time was, when you turned on a PC, you could get to work
> soon afterwards, but it seems no longer!

Depends on what you want to do. If you're computer-illiterate and just
poke the buttons and watch the videos and listen to the tunes maybe it's
not so bad. If you want to write your own applications you're stuck
with some crap of one flavor or another until you've found something
that will hold still underneath your work. I've given up on looking,
I'm building my own. Old farts need hobbies, otherwise we'd just sit
around and mold into sludge, and I'm not about to take up golf at this
age. <g>

Dave Farrance

unread,
Feb 11, 2016, 2:02:43 PM2/11/16
to
Java Jive <ja...@evij.com.invalid> wrote:

>Tried the following in monitor.desktop to no avail:

Well, if you're using Unity, this line would explain it:

>NotShowIn=Unity

So delete that.

I've just tried it on my system, and the syntax that works is simply:

Exec=xrandr -r 75

I've also got Kubuntu 14.04 in a separate partition, and it works there
too.

I suggest that you have another go at getting this working because
xrandr *is* the recommended way to tweak the x-server, not xorg.conf
which is badly documented and deprecated.
0 new messages