X server problem story

I’m using Opensuse 12.3 x86_64 with gigabyte nvidia geforce 6200 graphics card, using nvidia drivers.
One day last week I turn on the computer and I got no graphics. I thought taht something have gone wrong with graphics initialization so I logged in to a text console and I did

init 3
init 5

but again no graphics.

Then I tried startx but I got an error reporting that I had to use a display manager or adjust /etc/permission.local, so I edited /ets/permission.local


#
# /etc/permissions.local
#
# This file is used by SuSEconfig and chkstat to check or set the modes
# and ownerships of files and directories in the installation.
#
# In particular, this file will not be touched during an upgrade of the
# installation. It is designed to be a placeholder for local
# additions by the administrator of the system to reflect filemodes
# of locally installed packages or to override file permissions as
# shipped with the distribution.
#
# Format:
# <file> <owner>:<group> <permission>
#
# Please see the file /etc/permissions for general usage hints of the
# /etc/permissions* files.
# Please remember that logfiles might be modified by the logfile
# rotation facilities (e.g. logrotate) so settings entered here might
# be overridden. Also devices files (/dev/*) are not static but
# managed via udev so this file can't be used to modify device
# permissions either.
#

#
# suexec is only secure if the document root doesn't contain files
# writeable by wwwrun. Make sure you have a safe server setup
# before setting the setuid bit! See also
# https://bugzilla.novell.com/show_bug.cgi?id=263789
# http://httpd.apache.org/docs/trunk/suexec.html
#
#/usr/sbin/suexec2            root:root       4755

# setuid bit on Xorg is only needed if no display manager, ie startx
# is used. Beware of CVE-2010-2240.
#
#/usr/bin/Xorg                 root:root       4711

discommenting the last line

I tried startx again … no graphics

Then I thought some packet had crashed so I got the OS 12.3 DVD and I reinstall the OS (update option) … no graphics

Then I removed kdm and install xdm … no graphics

Then I removed all nvidia packets … some thing changed. A xdm login appears. When I log in I got a basic X window system with a terminal (the most basic system). Surprinsingly It is located on Alt-F3 instead ALt-F7

Then I reinstalled nvidia drivers through one click install and I got the X system and KDE working again. … but resolution is now 1280x1024 while my monitor is capable 1920x1080 and in system settings I can’t change it (well I can but 1280x1024 is the maximun resolution allowed).

In the meantime I remembered I had an “old” installation of Opensuse 12.2 on another partition an some space unused in the hardisk so I installed Kubuntu on the free space (always I am pissed off with Opensuse I give I try to kubuntu or other distribution but I never like them) and I use the 12.3 DVD to make an upgrade of the “old” OS12.2 installation.

As I have a separated /home partition I thought I could boot with any of the three systems with no problem with the same /home.

But, my surprise: my plasma desktop has 6 desktop looking like http://ubuntuone.com/5zPefwXTXLLgR4fBZ8YqqU

But when booting kubuntu the desktop has just one desktop and all my stuff have dissapear… I thought KDE should use the same profile :\

Booting both Opensuse partitions keep my desktop but one (the updated installation) woks fine (1920x1080 resolution) and the other one (the one I had the graphics problem) just woks at 1280x1024 resolution.
Both of them are using:

nvidia-compute-G02 304.88
nvidia-gfx-kmp-default 304.88
x11-vide-nvidiaG02
xorg-X11-server 7.6_1

Actually I’ve solved my problem because I’m using the updated installation wich works fine but I still don’t know why did the problem appeared.

regards

Did you upgrade to KDE 4.10.3? Kdm was broken, last Tuesday, IIRC. See this thread. Maybe it was the root of your problem.

No I haven’t. I have kdebase4 4.10.2 on both installations.
I am not using the kde repo but the OSS repo
I think the problem must appear after an automatic update. I think I switched of the system working on Thursday night and I switched it on Friday mornign and it didn’t work

First thing to do to exclude that you did run into the kdm bug (AFAICT this bug hit the 4.10.2 packages as well, in the meantime it’s been fixed):

At the konsole login prompt, login with your username and password, and do


su -c 'zypper ref && zypper up'

When it’s done, reboot and see what happens.

If this doesn’t change anything, please tell us what your videocard is. Depending on how often you update you may have hit a kernel update.

Uncommenting is not enough, you should run SuSEconfig --module permissions (though i think this no longer exists with 12.3, it certainly doesn’t with current Factory)or chkstat --system. Just note it imposes a security issue then.

AFAIK, kubuntu/debian are using ~/.kde as $KDEHOME, and we are using ~/.kde4

The bug appeared first with 4.10.3 update. Though i still recommend a full update before proceeding further :wink:

Another thing: an update to xorg-x11-server could be the cause. It overwrites some part of the nvidia driver. A reinstall of the driver should fix that.


andromeda:~ # zypper ref && zypper up
Repository 'nVidia Graphics Drivers' is up to date.
Repository 'openSUSE-12.3-Non-Oss' is up to date.
Repository 'openSUSE-12.3-Oss' is up to date.
Repository 'openSUSE-12.3-Update' is up to date.
Repository 'openSUSE-12.3-Update-Non-Oss' is up to date.
All repositories have been refreshed.
Loading repository data...
Reading installed packages...

The following package updates will NOT be installed:
  PackageKit-browser-plugin unison 

Nothing to do.
andromeda:~ # 


mi video card is gigabyte nvidia ge-force 6200

It’s working fine (full resolution) on another installation on another partition in the same computer with the same OS (Opensuse 12.3)

I removed all nvidia packages, even the repository and the reinstalled them via one-click-install.
Everything seems to be fine except resolution.

regards

You can change the resolution by running “nvidia-settings”.

I’ve tried. I’m running the Xserver with not full resolution. I run nvidia-settings:


andromeda:~# nvidia-settings

You do not appear to be using the NVIDIA X driver.  Please edit your X configuration file (just run `nvidia-xconfig` as root), and restart the X server.



andromeda:~ # nvidia-xconfig

WARNING: Unable to locate/open X configuration file.

New X configuration file written to '/etc/X11/xorg.conf'




My new Xorg.conf


# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 304.88  (buildmeister@swio-display-x86-rhel47-06)  Wed Mar 27 15:32:58 PDT 2013

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
    EndSubSection
EndSection



I restart Xserver and… no graphics again.

Because your nvidia driver is not working.
Please post the output of:

rpm -qa | grep nvidia
rpm -qa | grep kernel
uname -a


fernando@andromeda:~> rpm -qa |grep nvidia
nvidia-texture-tools-2.0.6-21.1.1.x86_64
x11-video-nvidiaG02-304.88-25.1.x86_64
oyranos-monitor-nvidia-0.9.1-2.1.1.x86_64
nvidia-gfxG02-kmp-default-304.88_k3.7.10_1.1-24.1.x86_64
nvidia-computeG02-304.88-25.1.x86_64

fernando@andromeda:~> rpm -qa |grep kernel
kernel-default-3.7.10-1.4.1.x86_64
kernel-devel-3.7.10-1.4.1.noarch
kernel-desktop-devel-3.7.10-1.4.1.x86_64
kernel-desktop-3.7.10-1.4.1.x86_64
kernel-devel-3.7.10-1.1.1.noarch
kernel-firmware-20130114git-1.2.1.noarch
kernel-default-devel-3.7.10-1.1.1.x86_64
kernel-desktop-devel-3.7.10-1.1.1.x86_64
kernel-default-devel-3.7.10-1.4.1.x86_64
kernel-source-3.7.10-1.1.1.noarch
kernel-desktop-3.7.10-1.1.1.x86_64
kernel-source-3.7.10-1.4.1.noarch
kernel-default-3.7.10-1.1.1.x86_64
nfs-kernel-server-1.2.7-2.1.1.x86_64

fernando@andromeda:~> uname -a
Linux andromeda.samara.com.es 3.7.10-1.4-default #1 SMP Fri Apr 19 12:06:34 UTC 2013 (8ef74f8) x86_64 x86_64 x86_64 GNU/Linux
fernando@andromeda:~> 


And on the installation which is working on the other partition (from wich I’m typing) I have:


fernando@andromeda:~> rpm -qa |grep nvidia
nvidia-gfxG02-kmp-desktop-304.88_k3.7.10_1.1-24.1.x86_64
nvidia-computeG02-304.88-25.1.x86_64
x11-video-nvidiaG02-304.88-25.1.x86_64
fernando@andromeda:~> rpm -qa |grep kernel
kernel-source-3.7.10-1.4.1.noarch
kernel-desktop-3.7.10-1.1.1.x86_64
kernel-source-3.7.10-1.1.1.noarch
kernel-desktop-devel-3.7.10-1.1.1.x86_64
kernel-desktop-3.7.10-1.4.1.x86_64
kernel-devel-3.7.10-1.1.1.noarch
kernel-devel-3.7.10-1.4.1.noarch
kernel-desktop-devel-3.7.10-1.4.1.x86_64
nfs-kernel-server-1.2.7-2.1.1.x86_64
kernel-firmware-20130114git-1.2.1.noarch
fernando@andromeda:~> uname -a
Linux andromeda.samara.com.es 3.7.10-1.4-desktop #1 SMP PREEMPT Fri Apr 19 12:06:34 UTC 2013 (8ef74f8) x86_64 x86_64 x86_64 GNU/Linux                                              
fernando@andromeda:~>  


The main difference I see is that in the working installation I’m using the desktop kernel ant the desktop nvidia and in the not workink installation I’m using both default

In the logs during boot (alt-F11):


[kdm] X server died during startup
[kdm] X server form display :0 cannot be started, session diabled

and using startx reports:


FATAL: module nvidia not found

OK, so please do this and it should work after a reboot:

sudo zypper rm kernel-default kernel-default-devel nvidia-gfxG02-kmp-default x11-video-nvidiaG02
sudo zypper in -f nvidia-gfxG02-kmp-desktop x11-video-nvidiaG02

And you should also remove /etc/X11/xorg.conf again.

I saw I had 4 kernels installed ready to be selected at boot time by grub:

default 3.7.10-1.4
desktop 3.7.10-1.4
default 3.7.10-1.1
desktop 3.7.10-1.1

so tried first just to install nvidia-gfxG02-kmp-desktop without unistalling anything

Then I tried to boot one by one the 4 kernels
default 3.7.10-1.4 → no graphics
desktop 3.7.10-1.4 → no graphics
default 3.7.10-1.1 → no graphics
desktop 3.7.10-1.1 → graphics OK, ndivia driver at full resolution

Then I did what you said


andromeda:~ # zypper rm kernel-default kernel-default-devel nvidia-gfxG02-kmp-default x11-video-nvidiaG02
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following packages are going to be REMOVED:
  kernel-default kernel-default kernel-default-devel kernel-default-devel nvidia-gfxG02-kmp-default x11-video-nvidiaG02 

6 packages to remove.
After the operation, 496.2 MiB will be freed.
Continue? [y/n/?] (y): 
(1/6) Removing nvidia-gfxG02-kmp-default-304.88_k3.7.10_1.1-24.1 ............................................................................................................[done]
Additional rpm output:
make: Entering directory `/usr/src/kernel-modules/nvidia-304.88-default'
make: Leaving directory `/usr/src/kernel-modules/nvidia-304.88-default'
WARNING: //lib/modules/3.7.10-1.1-default/misc/vmblock.ko needs unknown symbol putname
Warning: /lib/modules/3.7.10-1.1-default is inconsistent
Warning: weak-updates symlinks might not be created
WARNING: /lib/modules/3.7.10-1.1-default/misc/vmblock.ko needs unknown symbol putname
WARNING: //lib/modules/3.7.10-1.4-default/misc/vmblock.ko needs unknown symbol putname
Warning: /lib/modules/3.7.10-1.4-default is inconsistent
Warning: weak-updates symlinks might not be created


(2/6) Removing x11-video-nvidiaG02-304.88-25.1 ..............................................................................................................................[done]
(3/6) Removing kernel-default-devel-3.7.10-1.4.1 ............................................................................................................................[done]
(4/6) Removing kernel-default-devel-3.7.10-1.1.1 ............................................................................................................................[done]
(5/6) Removing kernel-default-3.7.10-1.4.1 ..................................................................................................................................[done]
(6/6) Removing kernel-default-3.7.10-1.1.1 ..................................................................................................................................[done]
There are some running programs that use files deleted by recent upgrade. You may wish to restart some of them. Run 'zypper ps' to list these programs.

During the unistallation I saw it was removing nvidia-gfxG02-kmp-default-304.88_k3.7.10_1.1-24.1

So I thought that was the reason It was working with kernel 3.7.10-1.1 and not with 3.7.10-1.4

Then I did the installation


andromeda:~ # zypper in -f nvidia-gfxG02-kmp-desktop x11-video-nvidiaG02
Loading repository data...
Reading installed packages...
Forcing installation of 'x11-video-nvidiaG02-304.88-25.1.x86_64' from repository 'nVidia Graphics Drivers'.
Forcing installation of 'nvidia-gfxG02-kmp-desktop-304.88_k3.7.10_1.1-24.1.x86_64' from repository 'nVidia Graphics Drivers'.
Resolving package dependencies...

The following NEW package is going to be installed:
  x11-video-nvidiaG02 

The following package is going to be reinstalled:                                                                                                                                  
  nvidia-gfxG02-kmp-desktop                                                                                                                                                        
                                                                                                                                                                                   
1 new package to install, 1 to reinstall.                                                                                                                                          
Overall download size: 36.3 MiB. After the operation, additional 152.0 MiB will be used.
Continue? [y/n/?] (y): 
Retrieving package nvidia-gfxG02-kmp-desktop-304.88_k3.7.10_1.1-24.1.x86_64                                                                   (1/2),   3.4 MiB ( 33.4 MiB unpacked)
Retrieving: nvidia-gfxG02-kmp-desktop-304.88_k3.7.10_1.1-24.1.x86_64.rpm ......................................................................................[done (131.7 KiB/s)]
Retrieving package x11-video-nvidiaG02-304.88-25.1.x86_64                                                                                     (2/2),  33.0 MiB (152.0 MiB unpacked)
Retrieving: x11-video-nvidiaG02-304.88-25.1.x86_64.rpm ........................................................................................................[done (130.9 KiB/s)]
(1/2) Installing: nvidia-gfxG02-kmp-desktop-304.88_k3.7.10_1.1-24.1 ......................................................................................................<100%>/]
(1/2) Installing: nvidia-gfxG02-kmp-desktop-304.88_k3.7.10_1.1-24.1 .........................................................................................................[done]
Additional rpm output:
make: Entering directory `/usr/src/linux-3.7.10-1.4-obj/x86_64/desktop'
  CC [M]  /usr/src/kernel-modules/nvidia-304.88-desktop/nv.o
In file included from /usr/src/linux-3.7.10-1.4/include/linux/kernel.h:10:0,
                 from /usr/src/linux-3.7.10-1.4/include/linux/sched.h:15,
                 from /usr/src/linux-3.7.10-1.4/include/linux/utsname.h:5,
                 from /usr/src/kernel-modules/nvidia-304.88-desktop/nv-linux.h:40,
                 from /usr/src/kernel-modules/nvidia-304.88-desktop/nv.c:13:
/usr/src/linux-3.7.10-1.4/include/linux/bitops.h: In function ‘hweight_long’:
/usr/src/linux-3.7.10-1.4/include/linux/bitops.h:66:41: warning: signed and unsigned type in conditional expression -Wsign-compare]
In file included from /usr/src/linux-3.7.10-1.4/arch/x86/include/asm/uaccess.h:594:0,
                 from /usr/src/linux-3.7.10-1.4/include/linux/poll.h:11,
                 from /usr/src/kernel-modules/nvidia-304.88-desktop/nv-linux.h:111,
                 from /usr/src/kernel-modules/nvidia-304.88-desktop/nv.c:13:
/usr/src/linux-3.7.10-1.4/arch/x86/include/asm/uaccess_64.h: In function ‘copy_from_user’:
/usr/src/linux-3.7.10-1.4/arch/x86/include/asm/uaccess_64.h:62:6: warning: comparison between signed and unsigned integer expressions -Wsign-compare]
  CC [M]  /usr/src/kernel-modules/nvidia-304.88-desktop/nv-acpi.o
In file included from /usr/src/linux-3.7.10-1.4/include/linux/kernel.h:10:0,
                 from /usr/src/linux-3.7.10-1.4/include/linux/sched.h:15,
                 from /usr/src/linux-3.7.10-1.4/include/linux/utsname.h:5,
                 from /usr/src/kernel-modules/nvidia-304.88-desktop/nv-linux.h:40,
                 from /usr/src/kernel-modules/nvidia-304.88-desktop/nv-acpi.c:15:
/usr/src/linux-3.7.10-1.4/include/linux/bitops.h: In function ‘hweight_long’:
/usr/src/linux-3.7.10-1.4/include/linux/bitops.h:66:41: warning: signed and unsigned type in conditional expression -Wsign-compare]
In file included from /usr/src/linux-3.7.10-1.4/arch/x86/include/asm/uaccess.h:594:0,

..................................................................



/usr/src/linux-3.7.10-1.4/include/linux/bitops.h: In function ‘hweight_long’:
/usr/src/linux-3.7.10-1.4/include/linux/bitops.h:66:41: warning: signed and unsigned type in conditional expression -Wsign-compare]
  ld -r -m elf_x86_64 -T /usr/src/linux-3.7.10-1.4/scripts/module-common.lds --build-id  -o /usr/src/kernel-modules/nvidia-304.88-desktop/nvidia.ko /usr/src/kernel-modules/nvidia-304.88-desktop/nvidia.o /usr/src/kernel-modules/nvidia-304.88-desktop/nvidia.mod.o
make[1]: Leaving directory `/usr/src/linux-3.7.10-1.4'
NVIDIA: left KBUILD.
/
WARNING: //lib/modules/3.7.10-1.1-desktop/misc/vmblock.ko needs unknown symbol putname
Warning: /lib/modules/3.7.10-1.1-desktop is inconsistent
Warning: weak-updates symlinks might not be created
WARNING: /lib/modules/3.7.10-1.1-desktop/misc/vmblock.ko needs unknown symbol putname
WARNING: //lib/modules/3.7.10-1.4-desktop/misc/vmblock.ko needs unknown symbol putname
Warning: /lib/modules/3.7.10-1.4-desktop is inconsistent
Warning: weak-updates symlinks might not be created


(2/2) Installing: x11-video-nvidiaG02-304.88-25.1 ...........................................................................................................................[done]
Additional rpm output:
Using MD5DIR="/var/adm/SuSEconfig/md5"...
No changes for /etc/X11/xdm/Xservers
No changes for /etc/X11/xdm/xdm-config


andromeda:~ #

Again it installs: nvidia-gfxG02-kmp-desktop-304.88_k3.7.10_1.1-24.1
but as we can see during the installation the nvidia driver is compiled against kernel 3.7.10-1.4

I did a reboot and then tried to boot again with the different kernels: both kernels default had dissapeared (i removed them)
kernel desktop 3.7.10-1.4 -> boot with no graphics
kernel desktop 3.7.10-1.1 -> boot with graphics OK, ndivia driver at full resolution

Why if the driver is now compiled for kernel 3.7.10-1.4?

Something is not working well in compilation?

Yes it is compiled against kernel 3.7.10-1.4 and the compilation goes well.

Did you run kernel 3.7.10-1.4 when installing it? (it seems the weak-updates symlink got created for both kernels)

Please post the output of:

ls -l /lib/modules/3.7.10-1.4-desktop/weak-updates/updates/

No, I was running kernel 3.7.10-1.1

I’going to do it again running kernel 3.7.10-1.4


andromeda:~ # ls -l /lib/modules/3.7.10-1.4-desktop/weak-updates/updates/
total 0
lrwxrwxrwx 1 root root 49 May  4 08:32 hdj_mod.ko -> /lib/modules/3.7.6-1.2-desktop/updates/hdj_mod.ko
andromeda:~ # 


The symlink to the nvidia kernel module is missing. You could create it yourself and call depmod:

ln -s /lib/modules/3.7.10-1.1-desktop/updates/nvidia.ko /lib/modules/3.7.10-1.4-desktop/weak-updates/updates/nvidia.ko
depmod -a

Then it should also work for the 3.7.10-1.4 kernel.

For explanation:
nvidia-gfxG02-kmp-desktop installs the kernel module only for the 3.7.10-1.1 kernel (in the updates directory).
For other installed kernels a symlink to that module is created (in weak-updates), so that the module itself only has to be there once.
On a kernel update, this link is also created for the new kernel, so the driver should still work after a kernel update.
The script that does this is called “weak-updates”.

AFAIK this should also work for the other kernels you are not running at installation time.
But I guess for you the symlinks didn’t get created because of these warnings:

WARNING: //lib/modules/3.7.10-1.1-desktop/misc/vmblock.ko needs unknown symbol putname
Warning: /lib/modules/3.7.10-1.1-desktop is inconsistent
**Warning: weak-updates symlinks might not be created
**WARNING: /lib/modules/3.7.10-1.1-desktop/misc/vmblock.ko needs unknown symbol putname
WARNING: //lib/modules/3.7.10-1.4-desktop/misc/vmblock.ko needs unknown symbol putname
Warning: /lib/modules/3.7.10-1.4-desktop is inconsistent
**Warning: weak-updates symlinks might not be created
**