LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Graphic drivers doesen't work, broken desktop, strange resolution (https://www.linuxquestions.org/questions/ubuntu-63/graphic-drivers-doesent-work-broken-desktop-strange-resolution-4175455637/)

firekage 03-26-2013 05:29 AM

Graphic drivers doesen't work, broken desktop, strange resolution
 
1 Attachment(s)
I would like ask for your help.

Since the begining of using Ubuntu i can't use it with nvidia drivers - doesen't matter if i download it from nvidia website as a binary driver or from ubuntu repos either. PPA drivers from x-swat and xorg-eadgers also doesen't work.

I use Ubuntu with only one flat LCD screen. As soon as i install new drivers - for my nvidia graphic card, GTX260 - i have many problems with Ubuntu. Drivers detects that i have few screens, when in fact i have only one - HP228h. Also at almost every boot there is either black screen or after logging my monitor switches off. If i succesily boot and log into X, i have broken desktop. The resolution for my one flat LCD screen is divided for two screens that's been detected and randomly one of the fakes one acts as a primary. I should have 1680x1050 but when driver detects something that is not present...don't know how, resolution is set to 1024x768 for CRT screen - i don't have it.

Is there a fix for it? Don't understand why all drivers for Ubuntu with Unity doesen't work with my graphic card.

I have few screens, it shows how it looks like with this strange behaviour. Look at the purple screen - there is, nvidia drivers detected two screen, one "fake crt" and one flat lcd. I have only one, i don't use twinview, but it keeps turing on - i think that.

Maybe someone that is more advanced in linux could help me - i tried it on Slackware and it works. I tried it on Kubuntu - it works. I tried it on Ubuntu with Unity and on a fresh installation of 12.04.2LTS and 12.10 - it doesen't.

I can't use ubuntu with nvidia because either i don't have screen at all, black screen, have to kill Xorg and restarting gdm/lightdm, after it either i could normally boot but then screen is broken just like on those screens, but most frequent behaviour is that after boot, log into X...screen goes black, monitor has "no input signal" and i have to switch to tty1, kill xorg, restaty gdm/lightdm and the problem happens from the beginnging.

Help. I'm frustrated. Don't know what to do in order to nvidia driver works. Don't know what to add, remove, change.


BTW - nouveau drivers work ok, but i want to have nvidia.

273 03-26-2013 05:46 AM

You could try running nvidia-settings as root by typing the following:
Code:

sudo nvidia-settings
Then make the necessary changes and press "Save to X Configuration File" -- that should save the settings.

tommcd 03-26-2013 06:23 AM

Quote:

Originally Posted by firekage (Post 4919073)
Since the begining of using Ubuntu i can't use it with nvidia drivers - doesen't matter if i download it from nvidia website as a binary driver or from ubuntu repos either. PPA drivers from x-swat and xorg-eadgers also doesen't work.

The nvidia drivers from the Ubuntu repositories generally work well in most cases. They have always worked for me.
Those PPA repos, however, are unsupported by Ubuntu. You use those PPA repos at your own risk.

You have tried to install the nvidia driver from multiple sources. You should only have one version of the nvidia driver installed at one time to avoid potential conflicts.
Are you sure that you have completely purged all of the previous nvidia drivers before installing a new nvidia driver??
Your problem could possibly be due to having conflicting drivers simultaneously installed on your system.

To uninstall the nvidia drivers from the Ubuntu repos:
Code:

sudo apt-get remove --purge nvidia*
To remove the driver from the nvidia website:
Code:

sudo sh NVIDIA-XXX.run --uninstall
where XXX is the version of the nvidia driver that you have installed.
I would also reboot after purging these nvidia drivers to be sure that no parts of them are still running on your system before you install yet another nvidia driver.
Here is how I install the nvidia driver from the Ubuntu repos:
Code:

sudo apt-get install nvidia-current nvidia-settings mesa-utils
Then I reboot the computer:
Code:

sudo reboot
Then to enable the nvidia driver once the computer comes back up:
Code:

sudo nvidia-xconfig
This procedure has always worked for me.

To test if the nvidia driver is working:
Code:

glxinfo | grep -i render
The output should look something like this:
Code:

bash-4.2$ glxinfo | grep -i render
direct rendering: Yes
OpenGL renderer string: GeForce 8400 GS/PCIe/SSE2
    GL_NV_complex_primitives, GL_NV_conditional_render,
    GL_NV_path_rendering, GL_NV_pixel_data_range, GL_NV_point_sprite,
    GL_NVX_conditional_render, GL_NVX_gpu_memory_info,
    GL_OES_depth_texture, GL_OES_element_index_uint, GL_OES_fbo_render_mipmap,

The salient parts of that output are the direct rendering: Yes as well as having your graphics card listed on the
OpenGL renderer string line.

firekage 03-26-2013 07:11 AM

Quote:

Originally Posted by 273 (Post 4919081)
You could try running nvidia-settings as root by typing the following:
Code:

sudo nvidia-settings
Then make the necessary changes and press "Save to X Configuration File" -- that should save the settings.


Tried it many times - doesen't work. I save it and after reboot situation is the same - broken resolution, 2 or even more screens detected when there is only one, wrong resolution. This just doesen't work for me.

firekage 03-26-2013 07:15 AM

Quote:

Originally Posted by tommcd (Post 4919105)
Those PPA repos, however, are unsupported by Ubuntu. You use those PPA repos at your own risk.

It just doesen't matter. Those from Ubuntu repos also doesen't work for me. The only driver that works is nouveau.


Quote:

You have tried to install the nvidia driver from multiple sources. You should only have one version of the nvidia driver installed at one time to avoid potential conflicts.
After installation when i see the same problem i wipe them out completly - ppa-purge or aptitude purge and so on.

Quote:

Are you sure that you have completely purged all of the previous nvidia drivers before installing a new nvidia driver??
Your problem could possibly be due to having conflicting drivers simultaneously installed on your system.
Yes, im sure. The same thing happen on a fresh system with only one driver, for example: from ubuntu repos.

Quote:

To uninstall the nvidia drivers from the Ubuntu repos:
Code:

sudo apt-get remove --purge nvidia*
To remove the driver from the nvidia website:
Code:

sudo sh NVIDIA-XXX.run --uninstall
where XXX is the version of the nvidia driver that you have installed.
I would also reboot after purging these nvidia drivers to be sure that no parts of them are still running on your system before you install yet another nvidia driver.
Here is how I install the nvidia driver from the Ubuntu repos:
Code:

sudo apt-get install nvidia-current nvidia-settings mesa-utils
Then I reboot the computer:
Code:

sudo reboot
Then to enable the nvidia driver once the computer comes back up:
Code:

sudo nvidia-xconfig
This procedure has always worked for me.

To test if the nvidia driver is working:
Code:

glxinfo | grep -i render
The output should look something like this:
Code:

bash-4.2$ glxinfo | grep -i render
direct rendering: Yes
OpenGL renderer string: GeForce 8400 GS/PCIe/SSE2
    GL_NV_complex_primitives, GL_NV_conditional_render,
    GL_NV_path_rendering, GL_NV_pixel_data_range, GL_NV_point_sprite,
    GL_NVX_conditional_render, GL_NVX_gpu_memory_info,
    GL_OES_depth_texture, GL_OES_element_index_uint, GL_OES_fbo_render_mipmap,

The salient parts of that output are the direct rendering: Yes as well as having your graphics card listed on the
OpenGL renderer string line.
I tried it many times - dosen't work. The result is always the same - detected "CRT" screens as a primary with 1024x768 resolution - fake crt and real flat LCD. This is also the same for fresh ubuntu with nvidia drivers from repo.

273 03-26-2013 08:18 AM

What does your xorg.conf look like? In the past I've changed what X sees as the primary display by swapping around the numbers assigned to displays in xorg.conf. Perhaps you could do something similar and remove the settings for the non-existent display?

firekage 03-26-2013 09:17 AM

Quote:

Originally Posted by 273 (Post 4919168)
What does your xorg.conf look like? In the past I've changed what X sees as the primary display by swapping around the numbers assigned to displays in xorg.conf. Perhaps you could do something similar and remove the settings for the non-existent display?

In ubuntu after nvidia-installation, there is no xorg. In xorg, in fact, after generating one, there is only one display...I can't even log into X with nvidia drivers, after log in screen switchs off, goes blank.

Ubuntu with nouveau also doesen't need xorg.conf, with nvidia it doesen't wokr.

Could you post what you changed in primary display and how it looks like?

273 03-26-2013 09:27 AM

How did you generate the xorg.conf and what does it look like?
When you didn't have an xorg.conf then what happened when you pressed "Save to X Configuration File" whilst running nvidia-settings as root?

firekage 03-26-2013 09:31 AM

Quote:

Originally Posted by 273 (Post 4919205)
How did you generate the xorg.conf and what does it look like?

By typing in terminal sudo nvidia-xconfig

Quote:

then what happened when you pressed "Save to X Configuration File" whilst running nvidia-settings as root?
It was generated and saved in /etc/X11 as xorg.conf and a blank xorg.conf.failsafe.nvidia. I did it in terminal, can't do it in X because screen goes off as soon as i log in.

Code:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 304.64  (buildmeister@swio-display-x86-rhel47-01.nvidia.com)  Tue Oct 30 12:19:38 PDT 2012

Section "ServerLayout"
    Identifier    "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
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 "InputDevice"
    # generated from default
    Identifier    "Keyboard0"
    Driver        "kbd"
EndSection

Section "Monitor"
    Identifier    "Monitor0"
    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"
EndSection

Section "Screen"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
    Option "UseDisplayDevice" "DFP"
    EndSubSection
EndSection

I added Option "UseDisplayDevice" "DFP" but it doesen't work either.

firekage 03-26-2013 07:11 PM

I just don't have strenght for this. As soon as i generated xorg with nvidia-xconfig, and tried to log in...either the screen goes black/blank, there is no signal, or im log out and see lightdm greeter - it just kicks me automatically after log in.

As soon as i removed nvidia drivers...and installed nouveau, everything works. Could anybody tell me why it just doesen't work?

273 03-26-2013 07:14 PM

I suspect that Unity doesn't play properly with normal X, you did mention that KDE works properly?

firekage 03-27-2013 04:24 AM

Quote:

Originally Posted by 273 (Post 4919557)
I suspect that Unity doesn't play properly with normal X, you did mention that KDE works properly?

Yes. But the question is why? What is wrong with xorg or xorg.conf in my case.Also, other people, that i know, use nvidia and unity and it works.

firekage 04-03-2013 12:01 PM

Thanks to Polish linux users from pclab.pl i figured what is going on with my Ubuntu system, nvidia drivers, xorg.conf and what is wrong with nvidia-settings. No more broken resolution, desktop, black screen while using nvidia-drivers.

The problem is rather strange. At fault was and is file called monitors.xml. Don't know why the settnings from xorg.conf are being omitted and monitors.xml is a step higher in importance to a system but renaming monitors.xml to monitors.xml.bak solved my problem. I have now generated xorg.conf (there is something more: don't know why after renaming monitors.xml xorg.conf is not named xorg.conf after using nvidia-xconfig but now XF86Conf - but it works also when i rename it to xorg.conf), everythings works with only one detected in nvidia-settings flat screen with my desired resolution - 1680x1050 for 22 inch HP flat lcd screen.

I haven't checked yet if other debian based linux systems, like kubuntu or mint, have this file but under mint or kubuntu there was no problem at all with nvidia drivers.


Now i'm glad.

273 04-03-2013 12:11 PM

Glad you got it sorted and that you reported back in case others have the same issue.
Where is the monitors.xml file located, is it in /etc/X11?

firekage 04-03-2013 12:47 PM

Quote:

Originally Posted by 273 (Post 4924424)
Glad you got it sorted and that you reported back in case others have the same issue.
Where is the monitors.xml file located, is it in /etc/X11?

In fact, people from pclab.pl didn't have this file. It was created as soon as they used system settings for lcd/screens (in my case, having nvidia-drivers, nvidia xorg.conf caused monitors.xml to override settings from nvidia-settings, even from xorg.conf and caused this problem). This files is placed in /home/yourprofile/.config. in short: ~/.config/monitors.xml.


All times are GMT -5. The time now is 12:39 PM.