gpu-manager's xorg.conf generation should be configurable

Bug #1394653 reported by solazs
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

There is no way to edit xorg.conf permanently, for any modification will be removed by gpu-manager.
This is not the same issue az bug #1310489.
My system is a Dell Inspiron N7110 with nvidia optimus.
I use the closed-source nvidia drivers.
The problem:
After a switch with prime-select intel my xorg.conf is removed, which is required to make the intel config operational.
Upon switching back to nvidia (prime-select nvidia) gpu-manager regenerates my xorg.conf
The problem is, that the default xorg.conf is broken (does not enable me to use the internal laptop screen), so it needs to be modified.
This, however, can not be done now, as changes will always be overwritten.

Note the difference from #1310489: We need a way to configure the generation, not just be able to preserve an already present file.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: ubuntu-drivers-common 1:0.2.98.4
Uname: Linux 3.16.1-031601-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
CurrentDesktop: KDE
Date: Thu Nov 20 17:37:49 2014
InstallationDate: Installed on 2014-03-11 (254 days ago)
InstallationMedia: Kubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140311)
SourcePackage: ubuntu-drivers-common
UpgradeStatus: Upgraded to utopic on 2014-11-20 (0 days ago)

Revision history for this message
solazs (solazs) wrote :
Revision history for this message
Alberto Milone (albertomilone) wrote :

Can you please attach a xorg.conf that works for you (and a /var/log/Xorg.0.log), so that I can see what's going on?

Revision history for this message
solazs (solazs) wrote :

I've figured out (by looking through the xorg.0.log) that there's a config directory: /usr/share/X11/xorg.conf.d/ where I can put config snippets, so this bug report in the present form is invalid, as there is a way to configure X besides the autogenerated xorg.conf.

I've created a file in the xorg.conf.d directory: 90-force-crt to force a virtual display to be recognized by the nvidia card, so i can align my laptop's internal screen to cover this virtual crt, thus being able to the internal screen.
90-force-crt content:
Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" ""
EndSection

Revision history for this message
solazs (solazs) wrote :

I must mention that to make things work, I've written a bash script to add and set 1600x900 mode to the virtual crt screen at login, so it matches the resolution of my laptop's screen.

The script is the following:
(VGA-0 is the non-existent display recognized by the nvidia driver)
#!/bin/bash

if prime-select query | grep -q "nvidia"; then
 if xrandr | grep -q "HDMI-0 connected"; then
  xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
  xrandr --addmode VGA-0 "1600x900"
  xrandr --output VGA-0 --mode "1600x900"
 fi
fi

Changed in ubuntu-drivers-common (Ubuntu):
importance: Undecided → Wishlist
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-drivers-common (Ubuntu):
status: New → Confirmed
Revision history for this message
Paul Kenyon (rixoff) wrote :

I've been struggling with this for the past year, but never thought to file a bug report. My use case is a little different, but the base request - allow customization of the Xorg config - is the same.

My system is an Intel Skull Canyon NUC with Iris Pro integrated graphics. I also have an external GPU box with an Nvidia 1080 Ti that connects to the system with a Thunderbolt interface. Two displays are connected - one to the main system's port, and one to external video card's port.

The Nvidia driver requires an option added to the Xorg config to use the external GPU:

    Option "AllowExternalGpus" "True"

If this is not set, the Nvidia section of the Xorg config will fail, and this cascades to Xorg not starting (i.e. login screen immediately drops back to login screen.) Currently I work around this by editing /usr/share/X11/xorg.conf.d/11-nvidia-prime.conf, which is generated by gpu-manager. The problem comes when a system update occurs, and gpu-manager is run again, re-generating the config file. Thus, it would be beneficial to have a way to save customizations of gpu-manager's configs.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.