Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 08-22-08, 05:41 PM   #1
spectred
Registered User
 
Join Date: Jun 2008
Posts: 51
Default nvidia-settings crashes X

Since i started using a more recent x-server (X.Org X Server 1.5.99.1, built 2 days ago) starting nvidia-settings immediately crashes X.
'nvidia-settings -q all' runs fine.

I know that i can't expect everything to work with a not released and maybe not stable x-server. Just want you to be aware of this problem, the driver itself runs fine.
spectred is offline   Reply With Quote
Old 08-23-08, 04:47 AM   #2
wsun013
Registered User
 
Join Date: Aug 2008
Posts: 6
Default Re: nvidia-settings crashes X

I had the same problem. However, I found out that you can try to remove the
~/.nvidia-settings-rc
it will run again. Remember to back up that file.
wsun013 is offline   Reply With Quote
Old 08-23-08, 04:57 AM   #3
wsun013
Registered User
 
Join Date: Aug 2008
Posts: 6
Default Re: nvidia-settings crashes X

It will crash once that file is generated again. The following log is from the Xorg.0.log.

Code:
(WW) NVIDIA(0): This server has an unsupported input driver ABI version (have
(WW) NVIDIA(0):     3.1, need < 3.0).  The driver will continue to load, but
(WW) NVIDIA(0):     may behave strangely.
(II) NVIDIA(0): Initialized GPU GART.
(II) NVIDIA(0): ACPI display change hotkey events enabled: the X server is new
(II) NVIDIA(0):     enough to receive ACPI display change hotkey events.
(EE) NVIDIA(GPU-0): EVO Push buffer channel allocation failed
(EE)  *** Aborting ***
(EE) NVIDIA(GPU-0): Failed to allocate EVO DMA push buffer
(EE)  *** Aborting ***
(II) NVIDIA(0): Setting mode "1680x1050+0+0"
(EE) NVIDIA(GPU-0): Failed to allocate CURSOR PIO for CRTC 0
wsun013 is offline   Reply With Quote
Old 08-24-08, 01:36 PM   #4
spectred
Registered User
 
Join Date: Jun 2008
Posts: 51
Default Re: nvidia-settings crashes X

Quote:
Originally Posted by wsun013 View Post
I had the same problem. However, I found out that you can try to remove the
~/.nvidia-settings-rc
it will run again. Remember to back up that file.
Confirmed, works. Strange that the crash is caused by a configuration file.

btw. thanks
spectred is offline   Reply With Quote
Old 08-27-08, 02:28 PM   #5
spectred
Registered User
 
Join Date: Jun 2008
Posts: 51
Default Re: nvidia-settings crashes X

ok i guess that the configuration file is not the problem. When i try to actually use nvidia-settings (swtich screens, etc.) it crashes X.
spectred is offline   Reply With Quote
Old 09-07-08, 10:57 PM   #6
SmSpillaz
Registered User
 
Join Date: Jul 2008
Posts: 15
Default Re: nvidia-settings crashes X

I have some experience in X coding, I suppose it would be possible to find where X is crashing (if the driver was failing, I think the system would hang), and if possible, use the old input ABI version commands to send to the driver. It's getting a backtrace which is difficult with X, because you can't access memory on the graphics hardware.
SmSpillaz is offline   Reply With Quote
Old 09-08-08, 05:08 AM   #7
SmSpillaz
Registered User
 
Join Date: Jul 2008
Posts: 15
Default Re: nvidia-settings crashes X

Here is the backtrace

(gdb) bt full
#0 0x0809721f in TryClientEvents (client=0x83feb90, dev=0xbfc5ea1c,
pEvents=0x1, count=0, mask=0, filter=0, grab=0x0) at events.c:1983
i = <value optimized out>
type = <value optimized out>
#1 0xb6a371c2 in ?? ()
from /opt/xserver-xir-install/lib/xorg/modules/drivers//nvidia_drv.so

I'll have a look at TryClientEvents from this version of X and the previous version (server 1.4.0)
SmSpillaz is offline   Reply With Quote
Old 09-08-08, 05:14 AM   #8
SmSpillaz
Registered User
 
Join Date: Jul 2008
Posts: 15
Default Re: nvidia-settings crashes X

Here is TryClientEvents from Server 1.4

Code:
1614	
1615	/**************************************************************************
1616	* The following procedures deal with delivering events *
1617	**************************************************************************/
1618	
1619	/**
1620	* Deliver the given events to the given client.
1621	*
1622	* More than one event may be delivered at a time. This is the case with
1623	* DeviceMotionNotifies which may be followed by DeviceValuator events.
1624	*
1625	* TryClientEvents() is the last station before actually writing the events to
1626	* the socket. Anything that is not filtered here, will get delivered to the
1627	* client.
1628	* An event is only delivered if
1629	* - mask and filter match up.
1630	* - no other client has a grab on the device that caused the event.
1631	*
1632	*
1633	* @param client The target client to deliver to.
1634	* @param pEvents The events to be delivered.
1635	* @param count Number of elements in pEvents.
1636	* @param mask Event mask as set by the window.
1637	* @param filter Mask based on event type.
1638	* @param grab Possible grab on the device that caused the event.
1639	*
1640	* @return 1 if event was delivered, 0 if not or -1 if grab was not set by the
1641	* client.
1642	*/
1643	_X_EXPORT int
1644	TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
1645	Mask filter, GrabPtr grab)
1646	{
1647	int i;
1648	int type;
1649	
1650	#ifdef DEBUG_EVENTS
1651	ErrorF("Event([%d, %d], mask=0x%x), client=%d",
1652	pEvents->u.u.type, pEvents->u.u.detail, mask, client->index);
1653	#endif
1654	if ((client) && (client != serverClient) && (!client->clientGone) &&
1655	((filter == CantBeFiltered) || (mask & filter)))
1656	{
1657	if (grab && !SameClient(grab, client))
1658	return -1; /* don't send, but notify caller */
1659	type = pEvents->u.u.type;
1660	if (type == MotionNotify)
1661	{
1662	if (mask & PointerMotionHintMask)
1663	{
1664	if (WID(inputInfo.pointer->valuator->motionHintWindow) ==
1665	pEvents->u.keyButtonPointer.event)
1666	{
1667	#ifdef DEBUG_EVENTS
1668	ErrorF("\n");
1669	ErrorF("motionHintWindow == keyButtonPointer.event\n");
1670	#endif
1671	return 1; /* don't send, but pretend we did */
1672	}
1673	pEvents->u.u.detail = NotifyHint;
1674	}
1675	else
1676	{
1677	pEvents->u.u.detail = NotifyNormal;
1678	}
1679	}
1680	#ifdef XINPUT
1681	else
1682	{
1683	if ((type == DeviceMotionNotify) &&
1684	MaybeSendDeviceMotionNotifyHint
1685	((deviceKeyButtonPointer*)pEvents, mask) != 0)
1686	return 1;
1687	}
1688	#endif
1689	type &= 0177;
1690	if (type != KeymapNotify)
1691	{
1692	/* all extension events must have a sequence number */
1693	for (i = 0; i < count; i++)
1694	pEvents[i].u.u.sequenceNumber = client->sequence;
1695	}
1696	
1697	if (BitIsOn(criticalEvents, type))
1698	{
1699	#ifdef SMART_SCHEDULE
1700	if (client->smart_priority < SMART_MAX_PRIORITY)
1701	client->smart_priority++;
1702	#endif
1703	SetCriticalOutputPending();
1704	}
1705	
1706	WriteEventsToClient(client, count, pEvents);
1707	#ifdef DEBUG_EVENTS
1708	ErrorF( " delivered\n");
1709	#endif
1710	return 1;
1711	}
1712	else
1713	{
1714	#ifdef DEBUG_EVENTS
1715	ErrorF("\n");
1716	#endif
1717	return 0;
1718	}
1719	}
Here is TryClientEvents from Server 1.5.999

Code:
_X_EXPORT int
TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents,
                 int count, Mask mask, Mask filter, GrabPtr grab)
{
    int i;
    int type;

#ifdef DEBUG_EVENTS
    ErrorF("[dix] Event([%d, %d], mask=0x%x), client=%d",
	pEvents->u.u.type, pEvents->u.u.detail, mask, client->index);
#endif
    if ((client) && (client != serverClient) && (!client->clientGone) &&
	((filter == CantBeFiltered) || (mask & filter)))
    {
	if (grab && !SameClient(grab, client))
	    return -1; /* don't send, but notify caller */
	type = pEvents->u.u.type;
	if (type == MotionNotify)
	{
	    if (mask & PointerMotionHintMask)
	    {
		if (WID(dev->valuator->motionHintWindow) ==
		    pEvents->u.keyButtonPointer.event)
		{
#ifdef DEBUG_EVENTS
		    ErrorF("[dix] \n");
	    ErrorF("[dix] motionHintWindow == keyButtonPointer.event\n");
#endif
		    return 1; /* don't send, but pretend we did */
		}
		pEvents->u.u.detail = NotifyHint;
	    }
	    else
	    {
		pEvents->u.u.detail = NotifyNormal;
	    }
	}
	else
	{
	    if ((type == DeviceMotionNotify) &&
		MaybeSendDeviceMotionNotifyHint
			((deviceKeyButtonPointer*)pEvents, mask) != 0)
		return 1;
	}
	type &= 0177;
	if (type != KeymapNotify)
	{
	    /* all extension events must have a sequence number */
	    for (i = 0; i < count; i++)
		pEvents[i].u.u.sequenceNumber = client->sequence;
	}

	if (BitIsOn(criticalEvents, type))
	{
#ifdef SMART_SCHEDULE
	    if (client->smart_priority < SMART_MAX_PRIORITY)
		client->smart_priority++;
#endif
	    SetCriticalOutputPending();
	}

	WriteEventsToClient(client, count, pEvents);
#ifdef DEBUG_EVENTS
	ErrorF("[dix]  delivered\n");
#endif
	return 1;
    }
    else
    {
#ifdef DEBUG_EVENTS
	ErrorF("[dix] \n");
#endif
	return 0;
    }
}

/**
 * Deliver events to a window. At this point, we do not yet know if the event
 * actually needs to be delivered. May activate a grab if the event is a
 * button press.
 *
 * Core events are always delivered to the window owner. If the filter is
 * something other than CantBeFiltered, the event is also delivered to other
 * clients with the matching mask on the window.
 *
 * More than one event may be delivered at a time. This is the case with
 * DeviceMotionNotifies which may be followed by DeviceValuator events.
 *
 * @param pWin The window that would get the event.
 * @param pEvents The events to be delivered.
 * @param count Number of elements in pEvents.
 * @param filter Mask based on event type.
 * @param grab Possible grab on the device that caused the event.
 * @param mskidx Mask index, depending on device that caused event.
 *
 * @return Number of events delivered to various clients.
 */
The problem lies here AFAIK:

Server 1.4
TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
Mask filter, GrabPtr grab)

Server 1.5.99999
TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents,
int count, Mask mask, Mask filter, GrabPtr grab)

The problem is that there are a) Too few arguments for the function and b) DeviceIntPtr and xEvent aren't compatible with each other =)

NVIDIA's fix:

Use XQueryInputVersion (XI2_Major, XI2_Minor); to find out which function to call:

My fix:
I guess I could remove DeviceIntPtr from TryClientEvents and use the xEvent itself through a patch, not so sure how well that would work.

AaronP, any ideas?

-Sm

Last edited by SmSpillaz; 09-08-08 at 05:28 AM. Reason: Finish post
SmSpillaz is offline   Reply With Quote

Old 09-08-08, 10:39 AM   #9
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: nvidia-settings crashes X

Quote:
Originally Posted by SmSpillaz View Post
The problem lies here AFAIK:

Server 1.4
TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
Mask filter, GrabPtr grab)

Server 1.5.99999
TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents,
int count, Mask mask, Mask filter, GrabPtr grab)

The problem is that there are a) Too few arguments for the function and b) DeviceIntPtr and xEvent aren't compatible with each other =)

NVIDIA's fix:

Use XQueryInputVersion (XI2_Major, XI2_Minor); to find out which function to call:

My fix:
I guess I could remove DeviceIntPtr from TryClientEvents and use the xEvent itself through a patch, not so sure how well that would work.
You're right, this probably is the problem. Changing the signature of TryClientEvents is a major ABI change and it should either be reverted, or the video driver ABI version number should be bumped to 5.0. Thanks for the heads-up.
AaronP is offline   Reply With Quote
Old 09-11-08, 08:57 PM   #10
SmSpillaz
Registered User
 
Join Date: Jul 2008
Posts: 15
Default Re: nvidia-settings crashes X

Quote:
Originally Posted by AaronP View Post
You're right, this probably is the problem. Changing the signature of TryClientEvents is a major ABI change and it should either be reverted, or the video driver ABI version number should be bumped to 5.0. Thanks for the heads-up.
Just a quick note, I've figured out how to patch out this argument (It wasn't used for much anyways) and now the NVIDIA driver works again.

Any update on when the NVIDIA driver will work with ABI v5.0?
SmSpillaz is offline   Reply With Quote
Old 09-15-08, 10:05 PM   #11
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: nvidia-settings crashes X

Well, ABI 5.0 doesn't exist yet and it's up to the whims of the next X.Org release manager to decide when it will. That said, I plan to keep up-to-date experimental (i.e. requiring "-ignoreABI") support for the latest git master ABI in future driver releases, though I can't promise that I'll be able to keep up if sweeping changes get checked into git.
AaronP is offline   Reply With Quote
Old 09-16-08, 09:47 AM   #12
spectred
Registered User
 
Join Date: Jun 2008
Posts: 51
Default Re: nvidia-settings crashes X

Quote:
Originally Posted by AaronP View Post
Well, ABI 5.0 doesn't exist yet and it's up to the whims of the next X.Org release manager to decide when it will. That said, I plan to keep up-to-date experimental (i.e. requiring "-ignoreABI") support for the latest git master ABI in future driver releases, though I can't promise that I'll be able to keep up if sweeping changes get checked into git.
At least it works for xorg-server 1.5.0. For now that's enough for me.

The last time I tried the git version the driver refuses to start because of some ABI change. But maybe this was something else.
spectred is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
nvidia 9800gt, linux, and nvidia 295.xx crashes mattgen88 NVIDIA Linux 0 06-05-12 11:11 PM
Need Help Installing NVIDIA Tesla M2070Q in Linux RHEL5 Ferianto85 NVIDIA Linux 0 05-18-12 08:35 PM
Found Simpsons in NVIDIA registry settings! ShVen NVIDIA GeForce 7, 8, And 9 Series 6 10-06-02 09:26 PM

All times are GMT -5. The time now is 03:42 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.