Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How I Solved My Xorg Freezing Problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
billydv
l33t
l33t


Joined: 22 Dec 2006
Posts: 911
Location: Mount Vernon, NY

PostPosted: Sat Aug 18, 2007 9:32 pm    Post subject: How I Solved My Xorg Freezing Problems Reply with quote

This has driven me crazy for a long time and I have spent many a night trying to get my system worked out where I could run beryl and have the screensaver show me a login box and immediate return to my desktop, well it seems that Ive finally gotten it to go away and since last night I no longer have any delays returning to my desktop. I run an Asus a8n32sli-deluxe with an x24200 dual core socket 939 cpu, evga 8800 gts graphics card. When I had gentoo running on a socket A abit mboard I never had any problems, it always ran great, I thought to myself could you imagine this system on a super fast dual core processor, well little did I know that desire would give me about 6 weeks of grief trying to get it to run right.

(for those of us who find some of these steps silly, I am just trying to be thorough for the newbies who may have to get the freezing to stop on their boxes)


1- Lets start with the kernel, If your running a desktop environment and not a server, choose those options in your kernel, In processor types and features, be sure to choose your exact processor, if you have a multicore be sure to choose all the same features I have, IO scheduler should default to cfq but build them all in so that you can change it with a boot option if need be, timer frequency should be 1000, memory should be sparse, this is a part of my kernel config from an amd64 but many of the same options are there in x86


CONFIG_X86_64=y
CONFIG_64BIT=y
CONFIG_X86=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_ZONE_DMA32=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_X86_CMPXCHG=y
CONFIG_EARLY_PRINTK=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_DMI=y
CONFIG_AUDIT_ARCH=y
CONFIG_GENERIC_BUG=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32

#
# General setup
#
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
# CONFIG_IPC_NS is not set
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
# CONFIG_TASKSTATS is not set
# CONFIG_UTS_NS is not set
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
CONFIG_CPUSETS=y
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_EMBEDDED=y
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y

#
# Block layer
#
CONFIG_BLOCK=y
# CONFIG_BLK_DEV_IO_TRACE is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"

#
# Processor type and features
#
CONFIG_X86_PC=y
# CONFIG_X86_VSMP is not set
CONFIG_MK8=y
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_GENERIC_CPU is not set
CONFIG_X86_L1_CACHE_BYTES=64
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_INTERNODE_CACHE_BYTES=64
CONFIG_X86_TSC=y
CONFIG_X86_GOOD_APIC=y
# CONFIG_MICROCODE is not set
CONFIG_X86_MSR=m
CONFIG_X86_CPUID=m
CONFIG_X86_IO_APIC=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_MTRR=y
CONFIG_SMP=y
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_PREEMPT_BKL=y
CONFIG_NUMA=y
CONFIG_K8_NUMA=y
CONFIG_NODES_SHIFT=6
CONFIG_X86_64_ACPI_NUMA=y
# CONFIG_NUMA_EMU is not set
CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_SELECT_MEMORY_MODEL=y
# CONFIG_FLATMEM_MANUAL is not set
# CONFIG_DISCONTIGMEM_MANUAL is not set
CONFIG_SPARSEMEM_MANUAL=y
CONFIG_SPARSEMEM=y
CONFIG_NEED_MULTIPLE_NODES=y
CONFIG_HAVE_MEMORY_PRESENT=y
# CONFIG_SPARSEMEM_STATIC is not set
CONFIG_SPARSEMEM_EXTREME=y

#
# Memory hotplug is currently incompatible with Software Suspend
#
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_MIGRATION=y
CONFIG_RESOURCES_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
CONFIG_NR_CPUS=2
CONFIG_HOTPLUG_CPU=y
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_HPET_TIMER=y
CONFIG_IOMMU=y
# CONFIG_CALGARY_IOMMU is not set
CONFIG_SWIOTLB=y
CONFIG_X86_MCE=y
# CONFIG_X86_MCE_INTEL is not set
CONFIG_X86_MCE_AMD=y
CONFIG_KEXEC=y
# CONFIG_CRASH_DUMP is not set
# CONFIG_RELOCATABLE is not set
CONFIG_PHYSICAL_START=0x200000
CONFIG_SECCOMP=y
# CONFIG_CC_STACKPROTECTOR is not set
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_K8_NB=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_ISA_DMA_API=y
CONFIG_GENERIC_PENDING_IRQ=y


2- Now lets reboot and get into the bios, the instructions I am giving are from an asus but the same stuff should be available in your computer, start with going to the section where you can load defaults, load default settings to start. Now go to your cpu overclocking. If your mboard is similar to mine the default setting for overclocking is to auto overclock, we dont want that. Set the sytem to standard with no overclocking whatsoever. If you have peg graphics, disable this. If you have things on your board such as a game port that you dont want to use disable it, In my bios I also disabled apm power management (not acpi!!!), you will have to try it both ways and see if it makes a difference for you, most important!!!, make sure you have disabled anything that suggests overclocking, turbo settings and the like, now that youve done all this reset your boot settings to be sure you have the priorities correct and reboot.


3- On to our xorg.conf, if yours is like mine, you may have multiple mouse entries , some of which can cause problems. Make a copy of your xorg.conf and now go to a virtual terminal ctrl + alt + f1 and issue /etc/init.d/xdm stop (login as root first). Now issue X -configure. This will leave you with a new xorg.conf in the root folder. Issue /etc/init.d/xdm start and this will put you back at your desktop. Compare the new xorg.conf with the one in /etc/X11/xorg.conf. You will see many changes. Its important to have only one mouse entry and get rid of modules and font directories that dont exist.
Here you can compare what I did.

xorg.conf.new


Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
RgbPath "/usr/share/X11/rgb"
ModulePath "/usr/lib64/xorg/modules"
FontPath "/usr/share/fonts/misc/"
FontPath "/usr/share/fonts/TTF/"
FontPath "/usr/share/fonts/OTF"
FontPath "/usr/share/fonts/Type1/"
FontPath "/usr/share/fonts/100dpi/"
FontPath "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
Load "glx"
Load "extmod"
Load "wfb"
Load "xtrap"
Load "record"
Load "GLcore"
Load "dbe"
Load "dri"
Load "freetype"
Load "type1"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection

Section "Device"
Identifier "Card0"
Driver "nvidia"
VendorName "nVidia Corporation"
BoardName "Unknown Board"
BusID "PCI:3:0:0"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection





And here is my correct and usable xorg.conf



Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerFlags"
Option "AllowMouseOpenFail" "True"
Option "AIGLX" "True"
#Option "standby time" "10"
#Option "suspend time" "20"
#Option "off time" "30"
EndSection

Section "Files"
RgbPath "/usr/share/X11/rgb"
ModulePath "/usr/lib64/xorg/modules"
FontPath "/usr/share/fonts/100dpi"
FontPath "/usr/share/fonts/75dpi"
FontPath "/usr/share/fonts/corefonts"
FontPath "/usr/share/fonts/cyrillic"
FontPath "/usr/share/fonts/default"
FontPath "/usr/share/fonts/default/ghostscript"
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/ttf-bitstream-vera"
FontPath "/usr/share/fonts/Type1"
FontPath "/usr/local/share/fonts"
EndSection

Section "Module"
Load "dbe"
#Load "dri"
Load "extmod"
Load "freetype"
#Load "GLcore"
Load "glx"
Load "record"
Load "type1"
Load "wfb"
Load "xtrap"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbOptions" "grp:toggle,grp_led:scroll"
Option "XkbVariant" ",winkeys"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
Identifier "Monitor0"
HorizSync 30.0 - 96.0
VertRefresh 50.0 - 160.0
Option "DPMS" "True"
EndSection

Section "Device"
Driver "nvidia"
VendorName "nVidia Corporation"
BoardName "All"
#BusID "PCI:3:0:0"
Identifier "Card0"
### Available Driver options are:-
# sw_cursor is needed for some ati and radeon cards
#Option "sw_cursor"
#Option "hw_cursor" "off"
#Option "NoAccel"
#Option "ShowCache"
#Option "ShadowFB"
#Option "UseFBDev"
#Option "Rotate"
#Option "NvAGP" "1"
#Option "NoLogo" "True"
Option "Coolbits" "1"
#Option "VertRefresh" "50-160"
#Option "RenderAccel" "true"
#Option "AllowGLXWithComposite" "true"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultColorDepth 24
#Option "RenderAccel" "False"
#Option "DamageEvents" "True"
#Option "UseEvents" "True"
#Option "TripleBuffer" "True"
#Option "BackingStore" "True"
Option "DynamicTwinView" "False"
Option "AddARGBGLXVisuals" "True"
#Option "DisableGLXRootClipping" "true"
SubSection "Display"
Depth 1
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 4
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 32
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Section "Extensions"
Option "Composite" "Enable"
EndSection

#Section "DRI"
# Mode 0666
#EndSection









After making the adjustments, make sure after restarting X that you check your /var/log/xorg.log for errors, if it tells you about non existent font dirctories or modules that couldnt be loaded fix it, restart X and check again until you have a log file that shows x starting without any problems whatsoever. If you are going to run beryl be sure to put in all the relevant xorg options.


4- Install or reinstall the latest nvidia drivers. Yes currently the testing .11 drivers or whatever the newest drivers are when you are reading this. Prior to emerging it be sure to delete the nvidia file in modules.d. Let the new install write a new module file for nvidia, if you have a pci graphics card you can leave it alone, if you are running an agp card try enabling fast writes and side band addressing only after you have a stable system, for now LEAVE IT ALONE!!!!!.


5-If you are running kde create this file

/usr/kde/3.5/env/start_dbus_session_bus.sh


and enter the following text:



# test for an existing bus daemon, just to be safe
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
# if not found, launch a new one
eval `dbus-launch --sh-syntax --exit-with-session`
fi




Now finally make it executable by all.


6- On to nvidia-settings, check both your root and user directories and be sur that nvidia-settings-rc doesnt exist. If they do, delete them. Now as your user ( you will follow this step as user and then login as root and do it again) run nvidia-settings, go through all the screens and wherever it has a button to restore hardware defaults, click it and then when done, click quit at the bottom and you will have a new nvidia-settings-rc in your home folder. Now to get your setting to load when you login, open up your bashrc file (you may have to create it)
heres mine with the relevant addition to ensure nvidia-settings are loaded at login


# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !


# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi


# Put your fun stuff here.
if [ $DISPLAY ] && [ $TERM == "dumb" ]; then
# Load nvidia-settings
nvidia-settings -load-config-only > /dev/null 2>&1
fi



7- Uninstall all beryl, emerald, heliodor, and aquamarine packages and then reboot


8- Emerge all the beryl, emerald, heliodor, and aquamarine packages now (dbus is only available on the older beryl , its not necessary)

9- Delete .beryl folder and .beryl-managerrc from your home directory and then start beryl-manager and let it create a new one for now.

10- Reboot one last time and see what happens, hopefully you will have eliminated any possible problems, it worked for me.
_________________
Billy DeVincentis
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7729
Location: Underworld

PostPosted: Wed Aug 22, 2007 10:00 pm    Post subject: Reply with quote

Moved from Desktop Environments to Documentation, Tips & Tricks.
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
bludger
Guru
Guru


Joined: 09 Apr 2003
Posts: 389

PostPosted: Tue Aug 28, 2007 2:34 pm    Post subject: Reply with quote

You seem to have re-configured a lot of things.
So what do you think was actually causing the freezing problems? The old Nvidia drivers?
Back to top
View user's profile Send private message
billydv
l33t
l33t


Joined: 22 Dec 2006
Posts: 911
Location: Mount Vernon, NY

PostPosted: Thu Aug 30, 2007 12:07 am    Post subject: Reply with quote

Bludger, I have come to realize there are so many things that cause freezing when you run kde with an nvidia card and even more so when you use composite. First off the gentoo installer had originally caused me a lot of grief as it inserted numerous mouse entries that were causing my screen to freeze, Later after correcting my xorg.conf, I realized that my kde config folder was somehow screwed, possibly from too many things having been updated and I started fresh with a new home folder. All got better and no more freezing at all without beryl but with is another story, its a random thing, at times coming back from screensaver will freeze it and sometimes not.
_________________
Billy DeVincentis
Back to top
View user's profile Send private message
bludger
Guru
Guru


Joined: 09 Apr 2003
Posts: 389

PostPosted: Fri Sep 14, 2007 6:11 am    Post subject: Reply with quote

I suspect that it might be due to the nvidia upgrade. I upgraded my nvidia drivers shortly after posting to this thread and it so far it seems to be stable. Of course it has only been 2 weeks so far, so the jury is still out.
_________________
Modolingo - International Language Center
Quality Language School for Business and General English, German and all living languages.
Munich and Germany wide.
Back to top
View user's profile Send private message
Lord Spector
Guru
Guru


Joined: 28 Oct 2003
Posts: 304

PostPosted: Fri Sep 14, 2007 3:57 pm    Post subject: Reply with quote

My system broke within a good month. I did a fresh install of gentoo amd64 about a motnth back using xfce 4.4 and everything was fine.
Well I haven't changed ONE THING in my PC (no bios changes no nothing) and I did a fresh install a few days ago(again xfce 4.4) and X would freeze in about 5 mins every time. The only thing I can think of would be nvidia... I don't think anything else could be the problem. Unfortunately I was in a hurry to get a working system with opengl support so I reverted back to windows until the problem was fixed... so I didn't try any older nvidia drivers, but both the stable and the latest drivers froze X for me.

And it works just fine with the NV driver so... :evil: NVIDIA :evil:
(too bad I was too stupid to realize this back when I had the chance to fix it 8O )
_________________
It's all about open source
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum