Linux Lite Forums

Hardware - Support => Video Cards => Topic started by: babuubabuu on July 16, 2017, 09:57:50 PM

Title: Problem with xorg.conf always regenerate new one
Post by: babuubabuu on July 16, 2017, 09:57:50 PM
Hi, I have a problem with editing xorg.conf.
I notice that Linux Lite always regenerate the file every-time I restart my computer so problem is how can I enable coolbits? because it always delete
Code: [Select]
Option "Coolbits" "28"every boot-up

I have tried edit the file manually and with this command
Code: [Select]
sudo nvidia-xconfig -a --cool-bits=31 but they don't work.
Title: Re: Problem with xorg.conf always regenerate new one
Post by: Jerry on July 16, 2017, 11:04:43 PM
Assuming you already installed the nvidia video driver from Install Drivers:

1. Restart your pc.

2. Open a Terminal and enter each line:

Code: [Select]
sudo update-grub
Code: [Select]
sudo nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration
3. Restart your pc.
Title: Re: Problem with xorg.conf always regenerate new one
Post by: babuubabuu on July 17, 2017, 03:07:16 AM
Hi, Jerry

First, Thank for replying me
I did what you said step-by-step but It still regenerate new one IDK why (My monitor plugs-in to HDMI Intel on-board if it matter. and I intend to use as headless in the future)

This is xorg.conf before reboot (after using this command sudo nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration)
Code: [Select]
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 375.66  (buildmeister@swio-display-x86-rhel47-06)  Mon May  1 15:45:32 PDT 2017

Section "ServerLayout"
    Identifier     "layout"
    Screen      0  "Screen0"
    Screen      1  "Screen1" RightOf "Screen0"
    Screen      2  "Screen2" RightOf "Screen1"
    Screen      3  "Screen3" RightOf "Screen2"
    Inactive       "intel"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "keyboard"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor2"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor3"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 970"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1060 6GB"
    BusID          "PCI:2:0:0"
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1060 6GB"
    BusID          "PCI:3:0:0"
EndSection

Section "Device"
    Identifier     "Device3"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1080"
    BusID          "PCI:5:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen3"
    Device         "Device3"
    Monitor        "Monitor3"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

This is after I have restarted my PC.
Code: [Select]
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "None"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1@0:0:0"
    Option "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:2@0:0:0"
    Option "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:3@0:0:0"
    Option "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:5@0:0:0"
    Option "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection
Title: Re: Problem with xorg.conf always regenerate new one
Post by: Jerry on July 17, 2017, 03:28:16 AM
So you have 4 monitors hooked into 3 different video cards?
Title: Re: Problem with xorg.conf always regenerate new one
Post by: babuubabuu on July 17, 2017, 04:01:27 AM
So you have 4 monitors hooked into 3 different video cards?

I only have one HDMI plug into Intel on-board VGA. (Nothing plug into all Nvidia cards)
And I have 4 video cards which are GTX 1080, GTX 1060 x2, GTX 970 (and one Intel on-board, If it counts so it's 5 VGA).
Title: Re: Problem with xorg.conf always regenerate new one
Post by: Jerry on July 17, 2017, 04:13:42 AM
So one monitor and 4+1 video?
Title: Re: Problem with xorg.conf always regenerate new one
Post by: babuubabuu on July 17, 2017, 04:16:07 AM
So one monitor and 4+1 video?

Yes, It is. I just plug the HDMI just in case because I usually remote it by teamviewer.
Title: Re: Problem with xorg.conf always regenerate new one
Post by: Jerry on July 17, 2017, 04:19:19 AM
Before we start, you're going to have to decide which nvidia video card (not the Intel) you're going to use. If you're plugged into the Intel and you reboot, it makes sense that it won't keep the nvidia settings, it's naturally going to load settings for the Intel.
Title: Re: Problem with xorg.conf always regenerate new one
Post by: babuubabuu on July 17, 2017, 04:29:29 AM
Before we start, you're going to have to decide which nvidia video card (not the Intel) you're going to use. If you're plugged into the Intel and you reboot, it makes sense that it won't keep the nvidia settings, it's naturally going to load settings for the Intel.

Okey,so let me try again by plugging my monitor to one of my Nvidia card.
I will tell you my result soon. :)
Title: Re: Problem with xorg.conf always regenerate new one
Post by: babuubabuu on July 17, 2017, 05:22:11 AM
Okey,
1. I plug my monitor to GTX 970 (from the Intel, Just to be clear I have only one monitor in the system.)
2. I applied these two commands
Code: [Select]
sudo update-grub
Code: [Select]
sudo nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration3. Then I rebooted my PC

After that it can't boot into the GUI. It takes me to TTY and when I place Ctrl+Alt+F7, It show only black screen.
This is the xorg.conf that make my PC can't get to the GUI.
Code: [Select]
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 375.66  (buildmeister@swio-display-x86-rhel47-06)  Mon May  1 15:45:32 PDT 2017

Section "ServerLayout"
    Identifier     "layout"
    Screen      0  "Screen0"
    Screen      1  "Screen1" RightOf "Screen0"
    Screen      2  "Screen2" RightOf "Screen1"
    Screen      3  "Screen3" RightOf "Screen2"
    Inactive       "intel"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "keyboard"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor2"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor3"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 970"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1060 6GB"
    BusID          "PCI:2:0:0"
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1060 6GB"
    BusID          "PCI:3:0:0"
EndSection

Section "Device"
    Identifier     "Device3"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1080"
    BusID          "PCI:5:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen3"
    Device         "Device3"
    Monitor        "Monitor3"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
Title: Re: Problem with xorg.conf always regenerate new one
Post by: Jerry on July 17, 2017, 08:43:30 AM
When you get to the TTY, login. Then do:

Code: [Select]
startx
if you don't get into the desktop, make a note of where they say the log file is. Then place the log in this thread.
Title: Re: Problem with xorg.conf always regenerate new one
Post by: babuubabuu on July 17, 2017, 09:45:29 AM
This command cause login loop for me, took me for a while to fix it LOL

Well, To be honest I am very new to Linux. I am really appreciate your help, Jerry  ;D

I attached the log for you.
And this showed on my monitor before entering TTY.
http://www.mediafire.com/view/d75nv2db6c97jlh/IMG_20170717_202624.jpg
Title: Re: Problem with xorg.conf always regenerate new one
Post by: Jerry on July 17, 2017, 08:10:39 PM
Make sure you are always plugged into one nvidia card. Try the following from TTY.

Code: [Select]
sudo rm /etc/X11/xorg.conf
sudo nvidia-settings --uninstall
sudo apt-get remove --purge nvidia*

Reboot.

Code: [Select]
sudo apt-get install nvidia-common
Reboot. After this reboot you should be at the desktop. From there, you can install the nvidia driver from Install Drivers.
Title: Re: Problem with xorg.conf always regenerate new one
Post by: babuubabuu on July 17, 2017, 10:45:57 PM
It said there is no this command
Code: [Select]
nvidia-settings --uninstall neither
Code: [Select]
nvidia-xconfig --uninstall so I skip it.

Well, all the process I have only one monitor plug into GTX970 and operate directly to the system (not through Teamviewer)
1. Login TTY(from where I can't get to Linux Lite GUI)
2. apply these commands
Code: [Select]
sudo rm /etc/X11/xorg.conf
sudo apt-get remove --purge nvidia*
3. reboot
4. apply this
Code: [Select]
sudo apt-get install nvidia-common5. reboot and install Nvidia driver from Install Drivers.
6. reboot
7. Apply these command
Code: [Select]
sudo update-grub
sudo nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration
8. reboot

It's work!!! :D Thanks Jerry.
So from my understanding, The location of my HDMI turn out to be the significant factor of the problem.
One last question Can I apply a dummy plug after this to fix the resolution when in headless mode?
https://askubuntu.com/questions/453109/add-fake-display-when-no-monitor-is-plugged-in
Title: Re: Problem with xorg.conf always regenerate new one
Post by: Jerry on July 17, 2017, 10:48:32 PM
I've no experience with headless servers. You will need to start a new thread for that query. In the meantime, please mark this one as Solved as per your welcome email instructions. Thank you.