xorg.conf overwritten by booting system

Bug #1310489 reported by Uwe Cappeller
198
This bug affects 40 people
Affects Status Importance Assigned to Milestone
Linux Mint
New
Undecided
Unassigned
ubuntu-drivers-common (Ubuntu)
Fix Released
High
Alberto Milone
Trusty
Fix Released
High
Alberto Milone

Bug Description

Description: Ubuntu 14.04 LTS
Release: 14.04

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

== SRU Request ==

There is a regression in the gpu-manager that causes it to revert user changes right before the first reboot after enabling the fglrx driver or the nvidia driver on a system with hybrid graphics (Intel+AMD or Intel+NVIDIA). This causes the gpu-manager to remove the current xorg.conf and to switch to Mesa.

[Impact]
 * This regression makes it almost impossible to use binary drivers on systems with hybrid graphics.

[Test Case]
 * Make sure to be using a hybrid system with Intel+AMD or Intel+NVIDIA GPUs.

 * Make sure that the gpu-manager is not disabled (only necessary if you disabled it manually).

 * Remove all fglrx and nvidia drivers (keep the nvidia-common and the nvidia-prime packages):
   sudo apt-get --purge remove nvidia-331
   sudo apt-get --purge remove nvidia-331
   sudo apt-get --purge remove fglrx
   sudo apt-get --purge remove fglrx-updates

 * Install ubuntu-drivers-common from trusty-proposed.

 * Restart the system.

 * Install the binary driver (either fglrx or nvidia, according to the available discrete GPU), reboot, and check that the binary driver is enabled (attach your /var/log/gpu-manager.log)
    - Expected: the (AMD or NVIDIA) discrete GPU is enabled.
    - Bad behavior: the system switches back to the intel driver and the discrete GPU is not used, despite the fact that the system was configured properly.

[Regression Potential]
 * Low. Systems that currently work will keep working as usual, the ones that currently fail should finally work.

[Other Info]
 * N/A

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

Hello,

I am using a notebook with a quadcore AMD A10 and hybrid graficcard AMD/ATI Radeon HD 8650G / AMD/ATI Sun XT Radeon HD 8670A/8670M/8690M.
After installing fglrx I generated the xorg.conf in the terminal with 'sudo aticonfig --adapter=all --initial' and it looked pretty good. Up to this point I was able to switch between the cards with the commands 'sudo aticonfig --px-dgpu' for the discrete card and 'sudo aticonfig --px-igpu' for the intigrated card to save power.
After rebooting I realized that I was no longer able to switch between the cards and found that the xorg.conf will be overwritten whenever I modified it and reboot the system. The new (by boot) generated xorg.conf contains not the relevant information for switing between the cards.
I attached both configuration in one file (xorg.conf.comparison). I will also provide the atisysteminfo-report.txt so far I will find the place where to attach.

Edit: I fixed the error --> "AIGLX error: failed to open /usr/lib64/dri/fglrx_dri.so, error[/usr/lib64/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]" but it changed not the bug of overwriting the xorg.conf.

Regards,
Uwe

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: xorg 1:7.7+1ubuntu8
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
NonfreeKernelModules: fglrx
.tmp.unity.support.test.0:

ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: None
CurrentDesktop: Unity
Date: Mon Apr 21 08:43:29 2014
DistUpgraded: Fresh install
DistroCodename: trusty
DistroVariant: ubuntu
DkmsStatus: fglrx, 13.350.1, 3.13.0-24-generic, x86_64: installed
ExtraDebuggingInterest: Yes
GraphicsCard:
 Advanced Micro Devices, Inc. [AMD/ATI] Richland [Radeon HD 8650G] [1002:990b] (prog-if 00 [VGA controller])
   Subsystem: Hewlett-Packard Company Device [103c:1985]
   Subsystem: Hewlett-Packard Company Device [103c:1985]
InstallationDate: Installed on 2014-04-20 (0 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
MachineType: Hewlett-Packard HP Pavilion 17 Notebook PC
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-24-generic.efi.signed root=UUID=fdcb1eaf-eda9-48ee-9d5b-b44e1fc06687 ro quiet splash vt.handoff=7
SourcePackage: xorg
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/26/2013
dmi.bios.vendor: Insyde
dmi.bios.version: F.22
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: 1985
dmi.board.vendor: Hewlett-Packard
dmi.board.version: 01.13
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnInsyde:bvrF.22:bd09/26/2013:svnHewlett-Packard:pnHPPavilion17NotebookPC:pvr0892100000005910000600000:rvnHewlett-Packard:rn1985:rvr01.13:cvnHewlett-Packard:ct10:cvrChassisVersion:
dmi.product.name: HP Pavilion 17 Notebook PC
dmi.product.version: 0892100000005910000600000
dmi.sys.vendor: Hewlett-Packard
version.compiz: compiz 1:0.9.11+14.04.20140409-0ubuntu1
version.fglrx-installer: fglrx-installer N/A
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.52-1
version.libgl1-mesa-dri: libgl1-mesa-dri 10.1.0-4ubuntu5
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 10.1.0-4ubuntu5
version.xserver-xorg-core: xserver-xorg-core 2:1.15.1-0ubuntu2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.8.2-1ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.3.0-1ubuntu3
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.910-0ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.10-1ubuntu2
xserver.bootTime: Mon Apr 21 08:29:06 2014
xserver.configfile: /etc/X11/xorg.conf
xserver.errors:
 open /dev/dri/card0: No such file or directory
 AIGLX error: failed to open /usr/X11R6/lib64/modules/dri/fglrx_dri.so, error[/usr/X11R6/lib64/modules/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]
 AIGLX error: failed to open /usr/lib64/dri/fglrx_dri.so, error[/usr/lib64/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]
 AIGLX error: failed to open /usr/X11R6/lib/modules/dri/fglrx_dri.so, error[/usr/X11R6/lib/modules/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]
xserver.logfile: /var/log/Xorg.0.log
xserver.version: 2:1.15.1-0ubuntu2
xserver.video_driver: fglrx

Revision history for this message
Uwe Cappeller (uwe-cappeller) wrote :
Revision history for this message
Uwe Cappeller (uwe-cappeller) wrote :

Please find attched the ati system info generated by ' sh /usr/share/fglrx/atigetsysteminfo.sh'.

Revision history for this message
Uwe Cappeller (uwe-cappeller) wrote :

Please find attached the current ati info file .

Regards,
Uwe

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in xorg (Ubuntu):
status: New → Confirmed
Revision history for this message
Nash Kaminski (nashkaminski) wrote :

gpu-manager is responsible for overwriting your X config file. Commenting out the "start on" lines at the top of gpu-manager's upstart script located at /etc/init/gpu-manager.conf will temporarily disable gpu-manager and prevent xorg.conf from being changed.

Revision history for this message
Uwe Cappeller (uwe-cappeller) wrote :

Changing the gpu-manager to let the xorg.conf unchanged caused a freeze of the system.

I tried the new beta driver from amd catalyst 14.4 (Beta) from the AMD site where explicitly my two cards are listed and it works perfectly.

Both cards HD8650G (1Gb) and the internal HD8670M are working now and the xorg.conf will not be overwritten by booting any longer.

It seems that Ubuntu 14.04 64bit is not compatible with the amd-catalyst-13.12-linux-x86.x86_64 .

I am currently using amd-driver-installer-14.10-x86.x86_64 which is a beta release and latest rc.

Changed in xorg (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
VasiaUVI (vasiauvi) wrote :

I have the same issue but on a Dell laptop, with NVIDIA GeForce GT 525M and Intel video card. On the Ubuntu 14.04 alpha and beta stages I didn't had any issue, but with the "stable" version xorg.conf is deleted after boot. Now I have some annoying behavior with my external monitor connected through HDMI.
The gpu-manager.log looks like this:
__________________________________
log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
Skipping "/dev/dri/card0", driven by "nouveau"
Found "/dev/dri/card1", driven by "i915"
output 0:
 LVDS connector
Number of connected outputs for /dev/dri/card1: 1
Does it require offloading? yes
grep dmesg status 256
dmesg status 256 == 0? No
grep dmesg status 256
dmesg status 256 == 0? No
Is nvidia loaded? no
Was nvidia unloaded? no
Is fglrx loaded? no
Was fglrx unloaded? no
Is intel loaded? yes
Is radeon loaded? no
Is nouveau loaded? yes
Vendor/Device Id: 8086:116
BusID "PCI:0@0:2:0"
Is boot vga? yes
Vendor/Device Id: 10de:df5
BusID "PCI:1@0:0:0"
Is boot vga? no
last cards number = 2
Has amd? no
Has intel? yes
Has nvidia? yes
How many cards? 2
Has the system changed? No
main_arch_path x86_64-linux-gnu, other_arch_path i386-linux-gnu
Current alternative: /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
Is nvidia enabled? no
Is fglrx enabled? no
Is mesa enabled? yes
Is pxpress enabled? no
Is prime enabled? no
Is nvidia available? yes
Is fglrx available? no
Is mesa available? yes
Is pxpress available? no
Is prime available? yes
Intel IGP detected
Desktop system detected
or laptop with open drivers
Discrete NVIDIA card detected
can't access /etc/X11/xorg.conf
Driver not enabled or not in use
Nothing to do
__________________________________

There is a fix for this?

Revision history for this message
Uwe Cappeller (uwe-cappeller) wrote :

Hi,

as written before I could fix the problem on my HP Pavilion 17-e026sg 17,3" AMD A10-5750M with Radeon HD8650G and Readon HD8670M.

Here comes what I did to install a fresh Ubuntu 14.04LTS 64bit:

I guess that you already have a USB start disc ready and will start with the first boot from this stick:

1. Start your PC end hit ESC to select from the boot menu and different boot option
2. select USB EFI HDD (or similar)
3. When UBUNTU menu comes up don't boot live disc boot directly in installation mode
4. from here on follow the instructions until the installation is finished
5. Ubuntu seems to fail on booting the first time after the installation but it's only the X-Server because it can't handle the grafic cards. It will show you that you have to reconfigure your X-server but don't proceed this!
6. Switch from error screen to terminal (strg+alt+F2) and wait until terminal screen comes up. Not sure if it is ctrl+alt+F2 for you ?!
7. When terminal is open login with your user credentials
8. Enter 'sudo nano /etc/default/grub'
9. Nano editor will open the Grub configuration. Enter there 'nomodeset' in line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" before 'quiet splash'. (please se grub.txt attached)
10. enter 'strg+O' (see menu at the bottom of nano) to save and 'strg+X' to exit
11. reconfigure Grub with command 'sudo update-grub'
12. reboot your PC and it should start in X mode
13. Download latest 64bit catalyst from amd site (latest stable is 14.4 )
14. change authorization in terminal for this file by entering 'sudo chmod 777 amd-catalyst-14-4-linux-x86-x86-64.zip'
15. unzip file and run from terminal by entering 'sudo ./amd-driver-installer-14.10.1006-x86.x86_64.run' (you must be in the same folder where the file is stored!!!!)
16. you can decide if you want to do a custom installation or default. I recommend to use the default way!
17. when installation is finished go to terminal again and remove the 'nomodeset' from grub by entering 'sudo nano /etc/default/grub' edit it and close it again. Run 'sudo update-grub'.

The installation script will do everything what is necessary. It will also create a new xorg.conf which will not be overwritten any longer

Reboot your PC. From now on everything should work as planned

You can switch between the cards by entering ' sudo aticonfig --px-igpu' for the internal device or 'sudo aticonfig --px-ggpu' for the dedicated grafic-card. After entering the command you have to reboot your machine and it will restart in this mode until you switch back.

Alternative you can use the amd control-center. Enter 'sudo amdcccle' in the terminal and you will have a graphical tool to configure your cards.

Hopefully this will help you to fix the issue. For me it worked.

Best REgards,
Uwe

Revision history for this message
academo (academo) wrote :

I can confirm the same issue, it doesn't happens every bug but time to time (not sure but I think after update)

NVIDIA Driver Version: 337.25
Graphics Processor: GeForce 210

Two screens setting.

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
Grief (iamgrief) wrote :

Please look at this beautiful log! Everything was fine, fglrx was enabled and loaded, amd card detected, no other cards are present... And gpu-manager got a great idea to completely remove xorg.conf and install mesa alternatives instead of pretty working fglrx.

This. Is. Not. Funny.
For me I decided to use 'nogpumanager' parameter as this piece of software is a trash. Sorry for my English.

log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
Skipping "/dev/dri/card0", driven by "radeon"
Does it require offloading? no
grep dmesg status 256
dmesg status 256 == 0? No
grep dmesg status 0
dmesg status 0 == 0? Yes
Is nvidia loaded? no
Was nvidia unloaded? no
Is fglrx loaded? yes
Was fglrx unloaded? yes
Is intel loaded? no
Is radeon loaded? yes
Is nouveau loaded? yes
Vendor/Device Id: 1002:6810
BusID "PCI:1@0:0:0"
Is boot vga? yes
last cards number = 1
Has amd? yes
Has intel? no
Has nvidia? no
How many cards? 1
Has the system changed? No
main_arch_path x86_64-linux-gnu, other_arch_path i386-linux-gnu
Current alternative: /usr/lib/fglrx/ld.so.conf
Is nvidia enabled? no
Is fglrx enabled? yes
Is mesa enabled? no
Is pxpress enabled? no
Is prime enabled? no
Is nvidia available? no
Is fglrx available? yes
Is mesa available? yes
Is pxpress available? yes
Is prime available? no
Single card detected
Kernel Module is not loaded
Selecting mesa
/usr/bin/update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
update-alternatives status 0
Calling ldconfig
ldconfig status 0
/usr/bin/update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/i386-linux-gnu/mesa/ld.so.conf
update-alternatives status 0
Calling ldconfig
ldconfig status 0
Removing xorg.conf. Path: /etc/X11/xorg.conf
System configuration has changed

Revision history for this message
Oleg Fritz (olefri) wrote :

Same issue on HP Pavilion 15-n031sr (F2U14EA) with Ubuntu 14.04 and lastest fglrx beta drivers.

Revision history for this message
Oleg Fritz (olefri) wrote :
Revision history for this message
Oleg Fritz (olefri) wrote :
Revision history for this message
Trev Peterson (trev-advanced-reality) wrote :

How is this not a high priority issue? Deletion of a working config file should be a high priority, period, shouldn't it? I had a working 14.04 system and ran updates with the result of breakage all over the system (intel drivers don't run in SNA mode right for me, need UXA to work properly). Note that is upgrade not dist-upgrade. I'm happy to help troubleshoot this but it really seems a bad policy to give no method of keeping a working config. Hope the comments help,

Revision history for this message
Greg Tippitt (gtippitt) wrote :

I agree that this bug should be a higher priority. I have a cluster built on Quad CPU SuperMicro H8QME2 motherboards with hex-core Opteron CPUs . With 12.04LTS, the motherboard ATI graphics worked fine as the machines are BOINC number crunchers. The motherboards also have NVIDIA Telsa GPU co-processor boards for GPU number crunching, which I have not been able to get working for several weeks since upgrading to 14.04LTS. They all worked fine with 12.04 LTS, but this "new feature" of 14.04 LTS is absurd.

I could not figure out what was happening the xorg.conf files. I have to load the NVIVIDA drivers for CUDA/OPENCL processing to work, but needed the display to be active on the motherboard ATI graphics , as these Telsa cards are strictly for crunching and have no display output capability. This "new feature" kept forcing the systems to try to display to a screen attached to the TESLA cards.

If the problem can't be fixed easily, an simple work-around for users should be provided until the problem can be fixed.

Greg

Timo Aaltonen (tjaalton)
no longer affects: xorg (Ubuntu)
Changed in ubuntu-drivers-common (Ubuntu):
importance: Undecided → High
assignee: nobody → Alberto Milone (albertomilone)
Changed in ubuntu-drivers-common (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Alberto Milone (albertomilone) wrote :

I managed to track down the original problem reported by Uwe.

@VasiaUVI: can reproduce the problem and attach your /var/log/gpu-manager.log after that please?

@Grief: there's no need to be rude, regardless of what your native language is.

@Oleg: if I understand correctly, in your case the problem is that the gpu-manager overwrites your xorg.conf but you can still use the fglrx driver, right?

@Trev: there are issues with UXA and hybrid graphics on many systems. If you file a separate bug report about SNA, and point me to it, I'll have a look at it.

@Greg: can you reproduce the problem and attach your /var/log/gpu-manager.log after that please? I'm working on some code which should only enable the GPUs that are connected to outputs. Your log could help me understand your use case.

@all: I'm working on a fix. As a workaround, you can simply pass "nogpumanager" on boot, the gpu-manager won't start. Hybrid graphics will probably fail though.

Revision history for this message
Loïc Sabio (zelik-b) wrote :

Same issue: having flgrx working nicely with an xorg.conf generated by aticontrol... but removed at each reboot and ending in "Xorg not able to autodetect your screen. Please configure it manually".

@Alberto: Please ask if more information required (logs, etc)

Revision history for this message
tbys (tbys) wrote :

This renders my system unusable every couple of boots.

Revision history for this message
Marc Defossez (defossez) wrote :

The same happens for my system (Dell M6800 with Nvidia Quadro K3100M).
I found on the web somebody who stated to have the solution.
Solution provided, remove the ~/.config/monitor.xml file.
Tried that but then the light went out completely (no graphics anymore, only a command line prompt).
Even restorting the monitor.xml file could not make it work again.

Will try the trick with the /etc/init/gpu-manager.conf file.

Kind regadrs,

Revision history for this message
dododge (dododge) wrote :

I'm another person being harassed by gpu-manager. Every couple reboots it decides the system configuration has changed and removes xorg.conf. That causes the machine to end up in an unusable state, because that xorg.conf was crucial to working around an issue with the NVIDIA driver (which I'm stuck with for various reasons), and so I'm left with blank screens and even the text consoles are trashed.

This machine is using Xen and has two video cards with one of them being "hidden" for passthrough to a VM, which may be something gpu-manager just can't make sense of. Its logs usually indicate that it thinks the number of cards has changed, even though I haven't touched the hardware.

I had already commented out the "start on" lines in gpu-manager.conf and that did *not* stop it from breaking my system configuration, so I guess now I'm going to try commenting out the entire file.

Revision history for this message
Marc Defossez (defossez) wrote :

Ok, I commented the "Start on" lines at the top of the /etc/init/gpu-manager.conf file.
This is what I did:

My Laptop has two video cards a Intel Haswell and a Nvidia Quadro K3100M
The laptop was working with the nouveau drivers on the Intel card and that worked OK.
I upgraded the Intel drivers with the latest from the Intel web site and everything still worked OK.
        Intel download site: https://01.org/linuxgraphics/downloads/2014/intelr-graphics-installer-1.0.6-linux
The gpu-manager log file reported that the was a Nvidia card but no xorg.conf file and stopped with "nothing to do"

As soon as I installed the nvidia proprietary drivers the systems dd not work in graphical mode anymore.
It booted on the command line and a popup box appeared reading "The system is running in low graphics mode - You must
configure it yourself". Examining the xserver log file reveals several complaints about the xorg.conf file.
That file is not in correct format and by that the systems doesn't boot graphically.

Modified/commented the first lines of the gpu-manager.conf file
Modified the xorg.conf file and rebooted.

Machine still starts in command line mode (with low graphics popup box).
Examining the xorg.conf file shows that something modified it again and it has a wrong format.

I'm back to zero.

Revision history for this message
dododge (dododge) wrote :

Just a comment that I never saw gpu-manager *modify* xorg.conf -- it just renamed it to xorg.conf-DATE leaving me with no xorg.conf at all (which in my case was enough to cause major problems). Commenting out all of the lines in gpu-manager.conf seems to have stopped it from running, which solved my issue for now.

If something is actually changing the content of your xorg.conf file, I'd be more suspicious of the graphics driver installer or perhaps some helper program that came with the driver.

Revision history for this message
Steve Dodd (anarchetic) wrote :

Just been hit by this. Spent all day debugging graphics problems, only now to discover that something has renamed my xorg.conf. I need 'Option "PageFlip" "false"' with nouveau to get decent performance, something decided that it knew better than me how to configure my hardware :(

Graphics card is:

01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)

Any other useful info I can include? I don't know what suddenly triggered this..

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

@all: I tracked down and fixed the issue here. I plan to deliver an update soon. In the meantime you can disable the gpu-manager by passing "nogpumanager" on boot (you can also set it permanently in /etc/default/grub).

Please do not edit the upstart job (/etc/init/gpu-manager.conf)

Revision history for this message
dododge (dododge) wrote :

BTW I'm going to second the "nogpumanager" approach, because I just rebooted and even with a completely commented-out gpu-manager.conf it still ran and decided the number of cards had changed and removed my xorg.conf leaving my system unusable. Putting "nogpumanager" into the kernel command line via /etc/default/grub did the trick. gpu-manager still runs, but now it explicitly logs that it was disabled by the kernel parameter.

Changed in ubuntu-drivers-common (Ubuntu Trusty):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Alberto Milone (albertomilone) wrote :

Just an update: I've fixed the issue in 14.10. It's still in the utopic-proposed repository and I expect it to be available in 14.10 soon.

As for 14.04, I've added a separate task for it in this bug report, and I'm working to backport the code using a stable release update (SRU).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-drivers-common - 1:0.2.98

---------------
ubuntu-drivers-common (1:0.2.98) utopic; urgency=medium

  * gpu-manager.c, gpu-manager.py:
    - Add support for testing core alternatives. This will be needed
      by fglrx.
    - Add the --backup-log parameter. This is only used for debugging
      and disabled by default.
    - Fix a regression that caused the gpu-manager to switch to mesa
      after enabling fglrx on hybrid systems (LP: #1310489). Also
      add a test case so that we don't regress in the future.
    - Check that either fglrx or nvidia is set in xorg.conf when
      xorg.conf is needed.
    - Check if kernel modules are blacklisted before choosing the
      driver (LP: #1310489).
    - Enable only GPUs with open drivers that have connected outputs.
      Attaching to GPUs that have no connected outputs would result
      in a black screen.
    - Allow RandR offloading even without bbswitch (LP: #1349282).
    - Fall back to mesa when failing to enable prime.
    - Do not try to enable prime if the nvidia driver is older than
      331.
    - Do not abort if the settings for prime cannot be found.
      Try creating the file before failing.
    - Avoid false positives of unloaded modules.
    - Use the cleanup attribute.
    - Always use snprintf instead of sprintf.
 -- Alberto Milone <email address hidden> Wed, 27 Aug 2014 10:39:17 +0200

Changed in ubuntu-drivers-common (Ubuntu):
status: In Progress → Fix Released
description: updated
description: updated
description: updated
Revision history for this message
Philipp Commans (philipp-commans) wrote : Re: [Bug 1310489] Re: xorg.conf overwritten by booting system
Download full text (13.8 KiB)

Hallo Alberto!

Thanks a lot for your work on this bug!

I have a question:
Does your solution also apply when both graphic cards are from AMD?

My laptop has both graphic cards, integrated and discrete, from AMD.

I'm asking because you wrote:
> [Test Case]
> * Make sure to be using a hybrid system with Intel+AMD or Intel+NVIDIA GPUs.

Thanks in advance!

Best regards Philipp

--
Philipp Commans
In der Silbert 21
47877 Willich
0163 6961900
PGP-Key
Threema AHZSVZ2V

> Am 04.09.2014 um 11:57 schrieb Alberto Milone <email address hidden>:
>
> ** Description changed:
>
> Description: Ubuntu 14.04 LTS
> Release: 14.04
>
> ----------------
>
> == SRU Request ==
>
> There is a regression in the gpu-manager that causes it to revert user
> changes right before the first reboot after enabling the fglrx driver or
> the nvidia driver on a system with hybrid graphics (Intel+AMD or
> Intel+NVIDIA). This causes the gpu-manager to remove the current
> xorg.conf and to switch to Mesa.
>
> [Impact]
> * This regression makes it almost impossible to use binary drivers on systems with hybrid graphics.
>
> [Test Case]
> * Make sure to be using a hybrid system with Intel+AMD or Intel+NVIDIA GPUs.
>
> * Make sure that the gpu-manager is not disabled (only necessary if you
> disabled it manually).
>
> * Remove all fglrx and nvidia drivers (keep the nvidia-common and the nvidia-prime packages):
> sudo apt-get --purge remove nvidia-331
> sudo apt-get --purge remove nvidia-331
> sudo apt-get --purge remove fglrx
> sudo apt-get --purge remove fglrx-updates
> +
> + * Install ubuntu-drivers-common from trusty-proposed.
>
> * Restart the system.
>
> * Install the binary driver (either fglrx or nvidia, according to the available discrete GPU), reboot, and check that the binary driver is enabled (attach your /var/log/gpu-manager.log)
> - Expected: the (AMD or NVIDIA) discrete GPU is enabled.
> - Bad behavior: the system switches back to the intel driver and the discrete GPU is not used, despite the fact that the system was configured properly.
>
> [Regression Potential]
> * Low. Systems that currently work will keep working as usual, the ones that currently fail should finally work.
>
> [Other Info]
> * N/A
>
> -----------------
>
> Hello,
>
> I am using a notebook with a quadcore AMD A10 and hybrid graficcard AMD/ATI Radeon HD 8650G / AMD/ATI Sun XT Radeon HD 8670A/8670M/8690M.
> After installing fglrx I generated the xorg.conf in the terminal with 'sudo aticonfig --adapter=all --initial' and it looked pretty good. Up to this point I was able to switch between the cards with the commands 'sudo aticonfig --px-dgpu' for the discrete card and 'sudo aticonfig --px-igpu' for the intigrated card to save power.
> After rebooting I realized that I was no longer able to switch between the cards and found that the xorg.conf will be overwritten whenever I modified it and reboot the system. The new (by boot) generated xorg.conf contains not the relevant information for switing between the cards.
> I attached both configuration in one file (xorg.conf.comparison). I will also provide the ...

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

@Philipp: yes, I think the problem (hence also the fix) could affect systems with multiple AMD systems, although I haven't reproduced it on such systems yet.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Uwe, or anyone else affected,

Accepted ubuntu-drivers-common into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.2.91.7 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ubuntu-drivers-common (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Verified on 201305-13649 Dell Inspiron 3537, I+A system
Intel Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 09)
AMD/ATI Sun XT [Radeon HD 8670A/8670M/8690M] [1002:6660] (rev ff)

Steps:
1. Install 14.04.1, boot to desktop
2. Enable -proposed, install ubuntu-drivers-common and reboot.
3. Install fglrx and reboot
4. Check if the driver is enabled

Actual result:
From the output of unity_support_test and gpu-manager.log, fglrx is loaded and it's using the discrete (AMD) video card.

ubuntu@201305-13649:~$ /usr/lib/nux/unity_support_test -c -p
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: AMD Radeon HD 8600M Series
OpenGL version string: 4.3.12798 Compatibility Profile Context 13.35.1005

Not software rendered: yes
Not blacklisted: yes
GLX fbconfig: yes
GLX texture from pixmap: yes
GL npot or rect textures: yes

Compiz supported: yes

Revision history for this message
Yu Ning (yuningdodo) wrote :

On A+A config I found although fglrx will not be disabled by gpu-manager, xorg.conf will still be regenerated, and with the regenerated xorg.conf there is no graphics switching option in amdcccle (amd control center).

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

The log attached by Po-Hsu shows that fglrx was correctly enabled on a system with hybrid graphics.

@Yu Ning: that is ok. If there is no switching option in amdcccle, that is a bug in the amdcccle binary (nothing I can do about it). The gpu-manager worked correctly by enabling both AMD GPUs with fglrx.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Philipp Commans (philipp-commans) wrote : Re: [Bug 1310489] Re: xorg.conf overwritten by booting system
Download full text (7.5 KiB)

Hallo Alberto,

I followed your instructions, including the installation of the
ubuntu-drivers-common from the proposed-archive.

The result was, that the xorg.conf wasn't changed anymore after reboots.

BUT the output from /var/log/gpumanager.log says: Disabled by kernel
parameter "nogpumanager"
Before that I had the gpu-manager disabled via the grub parameter
nogpumanger to prevent my xorg.conf from being overwritten. But
following your instructions, I deleted this parameter and updated grub.
I doublechecked my /etc/default/grub: There's no such parameter.
Did this happen intentionally via the new ubuntu-drivers-common-package
or did I miss something?
Is it possible that there's a lock-file somewhere not working right?

What exactly is the downside of a not-working gpu-manager when
proprietary drivers are installed?

Thanks a lot in advance

Best regards

Philipp

Am 04.09.2014 um 11:57 schrieb Alberto Milone:
> ** Description changed:
>
> Description: Ubuntu 14.04 LTS
> Release: 14.04
>
> ----------------
>
> == SRU Request ==
>
> There is a regression in the gpu-manager that causes it to revert user
> changes right before the first reboot after enabling the fglrx driver or
> the nvidia driver on a system with hybrid graphics (Intel+AMD or
> Intel+NVIDIA). This causes the gpu-manager to remove the current
> xorg.conf and to switch to Mesa.
>
> [Impact]
> * This regression makes it almost impossible to use binary drivers on systems with hybrid graphics.
>
> [Test Case]
> * Make sure to be using a hybrid system with Intel+AMD or Intel+NVIDIA GPUs.
>
> * Make sure that the gpu-manager is not disabled (only necessary if you
> disabled it manually).
>
> * Remove all fglrx and nvidia drivers (keep the nvidia-common and the nvidia-prime packages):
> sudo apt-get --purge remove nvidia-331
> sudo apt-get --purge remove nvidia-331
> sudo apt-get --purge remove fglrx
> sudo apt-get --purge remove fglrx-updates
> +
> + * Install ubuntu-drivers-common from trusty-proposed.
>
> * Restart the system.
>
> * Install the binary driver (either fglrx or nvidia, according to the available discrete GPU), reboot, and check that the binary driver is enabled (attach your /var/log/gpu-manager.log)
> - Expected: the (AMD or NVIDIA) discrete GPU is enabled.
> - Bad behavior: the system switches back to the intel driver and the discrete GPU is not used, despite the fact that the system was configured properly.
>
> [Regression Potential]
> * Low. Systems that currently work will keep working as usual, the ones that currently fail should finally work.
>
> [Other Info]
> * N/A
>
> -----------------
>
> Hello,
>
> I am using a notebook with a quadcore AMD A10 and hybrid graficcard AMD/ATI Radeon HD 8650G / AMD/ATI Sun XT Radeon HD 8670A/8670M/8690M.
> After installing fglrx I generated the xorg.conf in the terminal with 'sudo aticonfig --adapter=all --initial' and it looked pretty good. Up to this point I was able to switch between the cards with the commands 'sudo aticonfig --px-dgpu' f...

Read more...

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

@Philipp: no, I've never disabled the gpu-manager in the package (or anywhere else).

What's the output of the following command?

cat /proc/cmdline

Revision history for this message
Philipp Commans (philipp-commans) wrote :

Here's the output of cat /proc/cmdline:

BOOT_IMAGE=/boot/vmlinuz-3.13.0-24-generic
root=UUID=55db27ad-7c65-42fb-8aff-88d58c0a583b ro elevator=noop quiet
splash acpi=force "acpi_osi=!Windows 2012" vt.handoff=7

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

please also attach your /etc/init/gpu-manager.conf

Revision history for this message
Philipp Commans (philipp-commans) wrote :

Here you are.

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

The error that you see in the log was caused by this code:

if (is_disabled_in_cmdline()) {
    fprintf(log_handle, "Disabled by kernel parameter \"%s\"\n",
            KERN_PARAM);
    goto end;
}

That simply parses /proc/cmdline.

A few more things to try:

1) Maybe what you see is an old log. Try with:

sudo rm /var/log/gpu-manager.log

and reboot

See if you can still see the same gpu-manager.log (with the same error about the nogpumanager parameter)

2) Try starting the upstart job:

sudo rm /var/log/gpu-manager.log

sudo start gpu-manager

And see what /var/log/gpu-manager.log says

3) If 1) and 2) fail, try this:

sudo rm /var/log/gpu-manager.log

sudo gpu-manager --log /var/log/gpu-manager.log

Mathew Hodson (mhodson)
tags: removed: ubuntu
Changed in ubuntu-drivers-common (Ubuntu Trusty):
status: Fix Committed → Fix Released
36 comments hidden view all 116 comments
Revision history for this message
Alberto Milone (albertomilone) wrote :

@Alistair: please also include your /var/log/gpu-manager.log after your
xorg.conf is overwritten.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Alberto Milone (albertomilone) wrote :

@Alistair: the gpu-manager detected a change in the number of the available graphics cards:

"How many cards? 1
The number of cards has changed!"

It detects the following card:

Vendor/Device Id: 10de:1004
BusID "PCI:1@0:0:0"

The gpu-manager reconfigures your xorg.conf when you physically remove, add, or disable a graphics card from the BIOS. Did you do any of this?

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

No, somewhat obviously, I did not unplug my graphics card or disable it in the BIOS; this would render the system unbootable.

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

@Alistair: if the gpu-manager detected only one GPU, it means that the
other one was probably powered down (or it hadn't been powered on yet?).

Either way, you can work around the problem by passing the
"nogpumanager" kernel parameter on boot. This will disable the
gpu-manager. If that helps, you can make the parameter permanent in
GRUB.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

gpu-manager only detected one GPU because I only *have* one GPU. This hardware configuration has never changed since I built the computer.

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

Alistair: apparently, the gpu-manager detected zero GPUs on your previous boot ("last cards number = 0"). I'm not sure why that is. The number of GPUs from last boot is usually available in /var/lib/ubuntu-drivers-common/last_gfx_boot.

Is it possible that the said file was removed? As that would explain the zero GPUs statement in the log.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Download full text (7.6 KiB)

Well it wasn't removed by me.

This problem only seems to happen when there is an update for the
graphics drivers. This kicks off DKMS on next boot, so perhaps
gpu-manager is looking for the driver before DKMS has rebuilt it?

On 1 December 2014 at 11:29, Alberto Milone
<email address hidden> wrote:
> Alistair: apparently, the gpu-manager detected zero GPUs on your
> previous boot ("last cards number = 0"). I'm not sure why that is. The
> number of GPUs from last boot is usually available in /var/lib/ubuntu-
> drivers-common/last_gfx_boot.
>
> Is it possible that the said file was removed? As that would explain the
> zero GPUs statement in the log.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1310489
>
> Title:
> xorg.conf overwritten by booting system
>
> Status in ubuntu-drivers-common package in Ubuntu:
> Fix Released
> Status in ubuntu-drivers-common source package in Trusty:
> Fix Released
>
> Bug description:
> Description: Ubuntu 14.04 LTS
> Release: 14.04
>
> ----------------
>
> == SRU Request ==
>
> There is a regression in the gpu-manager that causes it to revert user
> changes right before the first reboot after enabling the fglrx driver
> or the nvidia driver on a system with hybrid graphics (Intel+AMD or
> Intel+NVIDIA). This causes the gpu-manager to remove the current
> xorg.conf and to switch to Mesa.
>
> [Impact]
> * This regression makes it almost impossible to use binary drivers on systems with hybrid graphics.
>
> [Test Case]
> * Make sure to be using a hybrid system with Intel+AMD or Intel+NVIDIA GPUs.
>
> * Make sure that the gpu-manager is not disabled (only necessary if
> you disabled it manually).
>
> * Remove all fglrx and nvidia drivers (keep the nvidia-common and the nvidia-prime packages):
> sudo apt-get --purge remove nvidia-331
> sudo apt-get --purge remove nvidia-331
> sudo apt-get --purge remove fglrx
> sudo apt-get --purge remove fglrx-updates
>
> * Install ubuntu-drivers-common from trusty-proposed.
>
> * Restart the system.
>
> * Install the binary driver (either fglrx or nvidia, according to the available discrete GPU), reboot, and check that the binary driver is enabled (attach your /var/log/gpu-manager.log)
> - Expected: the (AMD or NVIDIA) discrete GPU is enabled.
> - Bad behavior: the system switches back to the intel driver and the discrete GPU is not used, despite the fact that the system was configured properly.
>
> [Regression Potential]
> * Low. Systems that currently work will keep working as usual, the ones that currently fail should finally work.
>
> [Other Info]
> * N/A
>
> -----------------
>
> Hello,
>
> I am using a notebook with a quadcore AMD A10 and hybrid graficcard AMD/ATI Radeon HD 8650G / AMD/ATI Sun XT Radeon HD 8670A/8670M/8690M.
> After installing fglrx I generated the xorg.conf in the terminal with 'sudo aticonfig --adapter=all --initial' and it looked pretty good. Up to this point I was able to switch between the cards with the commands 'sudo aticonfig --px-dgpu' for the discrete card ...

Read more...

Revision history for this message
John (wuponeemould73) wrote :

Hi Alberto on my machine NVIDIA Optimus setup is no working even with the latest version of "ubuntu-drivers-common" i.e.:(1:0.2.91.8), although it does work with older version of this package i.e. (1:0.2.91.4). I have noticed one difference in the xorg.config file generated by the new and old versions of gpu-manager. Basically when using NVIDIA GPU as the main one i.e. "prime-select nvidia" the old gpu-manager sets the "Driver" value for the "intel" device to "modesetting", but the new gpu-manager sets the "Driver" value for the "intel" device to "intel".

As far as I can understand by looking into the X server log setting the "Driver" value to "intel" instead of "modesetting" prevents the X server from correctly identifying the screen on my laptop giving a black screen on boot.

Please see the file attached to this post for a comparison of xorg.conf files generated by the new and old gpu-managers.

Revision history for this message
Keith Helms (kfh-junk) wrote :

This problem is not fixed, or at least not fully. I am running Xubuntu 14.04 on the 3.13.0-47-generic kernel. I have Nvidia optimus graphics on my laptop with dual Intel GMA HD and Nvidia GeForce GTX 860M graphics cards. I have the ubuntu-drivers-common version 1:0.2.91.8, nvidia drivers version 331.113, and nvidia-prime version 0.6.2.

I've noticed the following:

1. When I have the Nvidia prime profile selected and reboot, the system leaves my xorg.conf alone. The gpu-manager.log says that I previously had 2 cards, I have 2 cards now, and nothing changed.

2. When I switch to the Intel prime profile from the Nvidia prime profile and reboot, the gpu-manager.log says I previously had 2 cards and I have 2 cards now and the system did not change, but IT DELETES xorg.conf anyway!

3. Whenever I reboot with the Intel prime profile in effect, the gpu-manager.log always says I previously had 1 card, I have 2 cards now, and the system has changed. Then it renames xorg.conf to xorg.conf.currentdate.

4. When I switch from the Intel prime profile to the Nvidia prime profile, the gpu-manager.log says I previously had 1 card, I now have 2 cards, and the system has changed. It then tries to remove xorg.conf, which isn't there anyway, and then regenerates xorg.conf. One weird thing is it usually says Found "/dev/dri/card0", driven by "i915", but in this case only it says Found "/dev/dri/card1", driven by "i915". Why would the card number change?

Without knowing anything about the internals here, it sure looks like there is a bug in how gpu-manager counts cards, or if it gets that info from something else, then that something has a bug.

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

@John: that sounds like a bug in the intel driver then. Please attach your /var/log/Xorg.0.log and /var/log/Xorg.0.log.old after reproducing the problem.

@Keith: I think the main problem there is that we have to re-enable the disabled GPU on shutdown in order to avoid problems with the BIOS. This is why two GPUs are detected on boot. I'll think of a workaround. As for test-case 2), I'll look into that, as gpu-manager always says in the log when it is removing or renaming the xorg.conf (and the log shows no trace of it).

Revision history for this message
Keith Helms (kfh-junk) wrote :

Thanks Alberto.

FYI, the log excerpts I included are not in the exact same order as the 4 cases I listed. I did put text above each log section indicating what I was trying at the time. Test case 2 in my posting corresponds to the 3rd block of log messages in the attachment.

So far, I've never seen a case where gpu-manager renamed the xorg.conf file without logging a message that it was doing so.

Revision history for this message
György Solymosi (george-solymosi) wrote :

Exactly the same problem:
With the latest drivers.
This bug is still affecting me. I have a desktop with two nVidia cards in an SLI configuration. I need a custom xorg.conf to support my 1440p monitor, but my xorg.conf gets renamed to xorg.conf.yyyymmdd almost every reboot.

Revision history for this message
György Solymosi (george-solymosi) wrote :
Revision history for this message
György Solymosi (george-solymosi) wrote :
Revision history for this message
Alberto Milone (albertomilone) wrote :

@György: your system is a bit of a special case, as it has 1 integrated intel GPU and 2 nvidia cards. If you file a separate bug report about your specific configuration, I'll work on a fix.

Revision history for this message
György Solymosi (george-solymosi) wrote :

Thank you Alberto, then I file a separate bug report, however I didn't found any answer to Mark's report, I hoped that will be shed a light to my issue as well:
"
 On 23-10-14 06:29:51, Mark Duncan wrote:
> This bug is still affecting me. I have a desktop with two nVidia cards
> in an SLI configuration. I need a custom xorg.conf to support my 1440p
> monitor, but my xorg.conf gets renamed to xorg.conf.yyyymmdd almost
> every reboot.

That's a separate case.

Can you attach your working xorg.conf and the file that the "sudo
nvidia-bug-report.sh" command creates, please?
"
Odds: I don't really need the integrated intel GPU, but I have to use, because the GT630 wasn't be able to start as display driver along the GTX980. I have had two options for the display section: integrated or GTX 980. I want to use GTX980 for computing only, so I had to use the integrated one. Then I faced this xorg.conf issue.

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

The problem is that, as long as a display is connected to the integrated GPU, gpu-manager will use it and offload rendering to one of the nvidia GPUs. I'm not sure how SLI works with that. You can try booting with the "nogpumanager" (from the grub menu), then generate the xorg.conf that you need and restart X, to see if that works.

Revision history for this message
György Solymosi (george-solymosi) wrote :

@Alberto
Yes, I've tried the "nogpumanager" solution same time I send you my issue and it worked.
Anyway, I tried to charge the display tasks to either the integrated Intel or the Nvidia GT 630 drive to relieve the GTX980 to achieve more resource for computing capabilities.
1. BIOS doesn't start the display with Nvidia GT 630 along the 980.
2. If I start with the integrated Intel drive, system starts virtually appropriately, but X Server charge 6-7% of memory of GTX 980, I don't know why?
Any help would be highly appreciated, and thank you for your undiminished efforts.

Revision history for this message
György Solymosi (george-solymosi) wrote :

Dear Alberto,
Previously I said "nogpumanager" solution works but it was right on 14.10!
Unfortunately when I reinstalled 14.04 LTS and modified /etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nogpumanager",
it doesn't result in any changes in manner of xorg.conf overwriting issue.
It doesn't work.

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

The "nogpumanager" parameter has been supported since ubuntu-drivers-common 1:0.2.89 in 14.04. I'm not sure why that doesn't work for you. Did you update the grub menu with "sudo update-grub" ?

Revision history for this message
György Solymosi (george-solymosi) wrote :

My bad Alberto! I did it now it works well!
Thank you for your work and efforts!
George

Revision history for this message
Jeremy Jao (myramenisgone) wrote :

I'm on Linux Mint with the 352 xorg-edgers driver (I have to go this route because of Quadro) in Linux Mint 17.2.... I have this problem, too, except it doesn't overwrite my xorg conf in /etc/X11/xorg.conf. In 17.1 I can restart and it will retain my settings, but once I turn off the monitor, the settings just reset. Now in 17.2, if I turn off the monitor and reboot, the settings reset. xorg.conf remains untouched...

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

@Jeremy: what do you mean by "settings"?

Revision history for this message
salsaman (salsaman) wrote :

Hi, I think I just got bitten by this same bug. Runing ubuntu 14.10. I installed nvidia drivers on Dell Vostro notebook. After this, any attempt to log in to Xwindows results in a loop and returns to the login window.

I tried following the suggestion here and booting with "nogpumanager". It seems to have broken something else and now the machine gets stuck in booting, even after removing it again.

Revision history for this message
salsaman (salsaman) wrote :

OK, rebooting was a red herring, it turned out there was a disk problem, fixed by fsck. Unfortunately the "nogpumanager" did not help. Is there a fix for this problem now ?

Revision history for this message
TBar (itombarrett) wrote :

It seems this Bug also affects ATI/AMD full sized graphic cards. I've had a problem on 4 different machines since 14.04 was released where it is impossible to enable both ATI GPUs. I have one machine running just 1 ATI card and that machine is functional, it has 6 xorg.conf.currentdate files in etc/X11. The other test 14.04.1 systems on spare hard drives installed yesterday have just one xorg.conf.currentdate files. I have been trying to say with AMD Catalyst 14.6 as that works best with the OpenCL Apps the machines run, however, I have the same problem with the FGLRX driver in Additional Drivers currently installing AMD-APP 1729.3. I have tried dozens of clean, fresh installs of different versions of 14.04.x, same problem in each one.

How do I fix this so it works the way it did in 12.04.x? I'm currently running 12.04.5 on my main machine with an AMD 7750 and 6970 simply because I can't get both cards enabled in any version of 14.04.x.

Revision history for this message
TBar (itombarrett) wrote :

I can confirm this Bug is indeed the reason my 4 Desktop machines can't enable the second ATI graphics card. I made the "a)" changes mentioned here, <http://askubuntu.com/questions/453902/problem-in-setting-up-amd-dual-graphics-trinity-radeon-hd-7660g-and-thames-ra/477006#477006>, copied my xorg.conf file from my working 12.04.5 machine to the 14.04.1 HDD, deleted all the rest, and upon Boot both my Cards were enabled. Both cards appear in clinfo, and I can issue commands in aticonfig without receiving an Error. What other, if any, problems will this Edit create?

I suspect if my 4 machines are suffering from this Bug then it's very probable that many more are also effected. I'd hate to generalize, however, I would guess that Most machines running some version of 14.04 are effected. This week I downloaded and installed the latest version 14.04.3 and it too has this Bug with my machines.

It would be nice if this were fixed, and I could run kernel 3.13.xxx without having to make this Edit.

Revision history for this message
TBar (itombarrett) wrote :

Over the last day I decided to try Ubuntu 14.10 to see if this Bug was still present. First attempt using the Ubuntu supplied driver in Additional Drivers was a failure. The installed driver contained AMD-APP 1526.3 which should be Catalyst 14.6. With this driver installed an incomplete xorg.conf was generated missing the Monitor/Screen sections, only the Device section was present. Only One card was present in clinfo, this also created numerous Errors using aticonfig and after a few attempts at reverting drivers and trying one from AMD the result was an unusable system claiming my password was suddenly invalid. Reading from AMD, is Cat 14.6 even compatible with 14.10? From here; http://support.amd.com/en-us/kb-articles/Pages/Latest-LINUX-Beta-Driver.aspx
System Requirements: Before attempting to install the AMD Catalyst™ Linux graphics driver, the following software must be installed:
Xorg/Xserver 7.4 and above (up to 1.15)
Linux kernel 2.6 or above (up to 3.13)
My updated 14.10 has kernel 3.16.

On the second attempt, with a fresh install, I used Catalyst 15.5 from AMD First and that system seems to work fine. Both AMD cards are enabled , both appear in clinfo, and there isn't any problems using aticonfig. It would appear this Bug isn't present in 14.10 on this machine. I haven't tested the others. Unfortunately 14.10 has reached the End of Support and is not in consideration and my experience with catalyst 15.7 while running 12.04.x was not satisfactory, so, Ubuntu 15.04 is out as well.

Revision history for this message
Rene Herman (rene.herman) wrote :

Also affected, although nothing to do with a multi-gpu system. Mint 17.3 (64-bit, Cinnamon) and a local /etc/X11/xorg.conf to slow down my crazy-fast Logitech mouse. Installing fglrx renamed xorg.conf to xorg.conf-DATE (and put nothing in its place).

Not a huge problem in this case, but certainly rather uncourteous of it. If this is an involved problem, perhaps at least this specific situation could be worked around by not moving xorg.conf out of the way if it isn't being replaced by anything. That is, I imagine it could be generally troublesome to merge a local configuration, but merging with a new /empty/ configuration is not. If a new xorg.conf is in fact generated, maybe a user warning if an old one was also found...

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

Just noticed that on Ubuntu 16.04 xorg.conf is actually removed on restart, which is why I'm always loaded with Intel driver instead of Nvidia on my laptop.
This happened within updated during last 2 days, everything worked fine before.
What happens, why file is REMOVED?

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

Looks like one more plymouth update fixed and issue, sorry for bothering.

Revision history for this message
HuaiDan (dhutchison69) wrote :

Ubuntu 15.10 x86_64
GPU Manager removes or replaces xorg.conf depending on Nvidia Prime settings.
When set to integrated graphics, xorg.conf gets deleted as expected.
When set to discrete GPU, xorg.conf gets written with failsafe values.
 gpu-manager.log:

log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
grep dmesg status 256
dmesg status 256 == 0? No
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is fglrx loaded? no
Was fglrx unloaded? no
Is fglrx blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is fglrx kernel module available? no
Is nvidia kernel module available? yes
Vendor/Device Id: 8086:416
BusID "PCI:0@0:2:0"
Is boot vga? yes
Vendor/Device Id: 10de:139a
BusID "PCI:1@0:0:0"
Is boot vga? no
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Found "/dev/dri/card0", driven by "i915"
output 0:
 eDP connector
Number of connected outputs for /dev/dri/card0: 1
Does it require offloading? yes
last cards number = 1
Has amd? no
Has intel? yes
Has nvidia? yes
How many cards? 2
The number of cards has changed!
Has the system changed? Yes
main_arch_path x86_64-linux-gnu, other_arch_path i386-linux-gnu
Current alternative: /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
Current core alternative: (null)
Is nvidia enabled? no
Is fglrx enabled? no
Is mesa enabled? yes
Is pxpress enabled? no
Is prime enabled? no
Is nvidia available? yes
Is fglrx available? no
Is fglrx-core available? no
Is mesa available? yes
Is pxpress available? no
Is prime available? yes
System configuration has changed
Intel IGP detected
Intel hybrid system
Nvidia driver version 355.11 detected
/sys/class/dmi/id/product_version="1.0"
/sys/class/dmi/id/product_name="X550JX"
1st try: bbswitch without quirks
Loading bbswitch with "load_state=-1 unload_state=1" parameters
Selecting prime
/usr/bin/update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/nvidia-355-prime/ld.so.conf
update-alternatives status 0
Calling ldconfig
ldconfig status 0
/usr/bin/update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/nvidia-355-prime/alt_ld.so.conf
update-alternatives status 0
Calling ldconfig
ldconfig status 0
Removing xorg.conf. Path: /etc/X11/xorg.conf
Moved /etc/X11/xorg.conf to /etc/X11/xorg.conf.12132015
Powering off the discrete card
Unloading nvidia-uvm with "no" parameters
Unloading nvidia with "no" parameters

Revision history for this message
HuaiDan (dhutchison69) wrote :

Ubuntu 15.10 x86_64
GPU Manager removes or replaces xorg.conf depending on Nvidia Prime settings.
When set to integrated graphics, xorg.conf gets deleted as expected.
When set to discrete GPU, xorg.conf gets written with failsafe values.
 gpu-manager.log (integrated):

log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
grep dmesg status 256
dmesg status 256 == 0? No
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is fglrx loaded? no
Was fglrx unloaded? no
Is fglrx blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is fglrx kernel module available? no
Is nvidia kernel module available? yes
Vendor/Device Id: 8086:416
BusID "PCI:0@0:2:0"
Is boot vga? yes
Vendor/Device Id: 10de:139a
BusID "PCI:1@0:0:0"
Is boot vga? no
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Found "/dev/dri/card0", driven by "i915"
output 0:
 eDP connector
Number of connected outputs for /dev/dri/card0: 1
Does it require offloading? yes
last cards number = 1
Has amd? no
Has intel? yes
Has nvidia? yes
How many cards? 2
The number of cards has changed!
Has the system changed? Yes
main_arch_path x86_64-linux-gnu, other_arch_path i386-linux-gnu
Current alternative: /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
Current core alternative: (null)
Is nvidia enabled? no
Is fglrx enabled? no
Is mesa enabled? yes
Is pxpress enabled? no
Is prime enabled? no
Is nvidia available? yes
Is fglrx available? no
Is fglrx-core available? no
Is mesa available? yes
Is pxpress available? no
Is prime available? yes
System configuration has changed
Intel IGP detected
Intel hybrid system
Nvidia driver version 355.11 detected
/sys/class/dmi/id/product_version="1.0"
/sys/class/dmi/id/product_name="X550JX"
1st try: bbswitch without quirks
Loading bbswitch with "load_state=-1 unload_state=1" parameters
Selecting prime
/usr/bin/update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/nvidia-355-prime/ld.so.conf
update-alternatives status 0
Calling ldconfig
ldconfig status 0
/usr/bin/update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/nvidia-355-prime/alt_ld.so.conf
update-alternatives status 0
Calling ldconfig
ldconfig status 0
Removing xorg.conf. Path: /etc/X11/xorg.conf
Moved /etc/X11/xorg.conf to /etc/X11/xorg.conf.12132015
Powering off the discrete card
Unloading nvidia-uvm with "no" parameters
Unloading nvidia with "no" parameters

Revision history for this message
HuaiDan (dhutchison69) wrote :

gpu_mamnger.log (discrete)
log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
grep dmesg status 256
dmesg status 256 == 0? No
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is fglrx loaded? no
Was fglrx unloaded? no
Is fglrx blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is fglrx kernel module available? no
Is nvidia kernel module available? yes
Vendor/Device Id: 8086:416
BusID "PCI:0@0:2:0"
Is boot vga? yes
Vendor/Device Id: 10de:139a
BusID "PCI:1@0:0:0"
Is boot vga? no
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Found "/dev/dri/card0", driven by "i915"
output 0:
 eDP connector
Number of connected outputs for /dev/dri/card0: 1
Does it require offloading? yes
last cards number = 1
Has amd? no
Has intel? yes
Has nvidia? yes
How many cards? 2
The number of cards has changed!
Has the system changed? Yes
main_arch_path x86_64-linux-gnu, other_arch_path i386-linux-gnu
Current alternative: /usr/lib/nvidia-355/ld.so.conf
Current core alternative: (null)
Is nvidia enabled? yes
Is fglrx enabled? no
Is mesa enabled? no
Is pxpress enabled? no
Is prime enabled? no
Is nvidia available? yes
Is fglrx available? no
Is fglrx-core available? no
Is mesa available? yes
Is pxpress available? no
Is prime available? yes
System configuration has changed
Intel IGP detected
Intel hybrid system
Nvidia driver version 355.11 detected
/sys/class/dmi/id/product_version="1.0"
/sys/class/dmi/id/product_name="X550JX"
1st try: bbswitch without quirks
Loading bbswitch with "load_state=-1 unload_state=1" parameters
intel_matches: 1, nvidia_matches: 1, intel_set: 1, nvidia_set: 2 x_options_matches: 4, accel_method_matches: 1
Check failed
Removing xorg.conf. Path: /etc/X11/xorg.conf
Regenerating xorg.conf. Path: /etc/X11/xorg.conf
No need to change the current bbswitch status

Revision history for this message
g hartog (giluxxx) wrote :

it says fix released but i see this (ultra annoying) bug still happening in a fully patched 14.04?!

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

@HuaiDan: what do you mean by "failsafe values"?

@g hartog: if you think the problem described in this bug report is still there, then please explain the situation, and attach your /var/log/gpu-manager.log after reproducing the problem.

Revision history for this message
Marzanna (marzanna) wrote :

On Ubuntu 17.04 gpu-manager overwrites xorg.conf
Does this bug still persist?

Revision history for this message
Lian Sebe (csebe) wrote :

Ubuntu 16.04.2 (installed from minimal install disk -- if it matters).

2 Nvidia gtx 1070 cards and on board intel one.

/etc/X11/xorg.cof gets rewritten at each reboot, with or without nogpumanager specified in /etc/default/grub

Revision history for this message
Lian Sebe (csebe) wrote :

Found an (idiotic but) efficient workaround!

protect /etc/X11/xorg.conf to be overwritten using:
chattr +i /etc/X11/xorg.conf

Then, don't forget to unprotect it and protect it back each time you want to modify it.

Displaying first 40 and last 40 comments. View all 116 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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