[Patch] compiz & nvidia-settings

Bug #215876 reported by ®om
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
nvidia-settings (Ubuntu)
Fix Released
Wishlist
Alberto Milone
Nominated for Karmic by Mike Pelley

Bug Description

To apply nvidia-settings settings (!!), we need to call "nvidia-settings -l" (if we have a nvidia) before launching compiz.
I added it at the very beginning of /usr/bin/compiz, but I think it should be enabled by default.

Without this call, the settings such as antialiasing, etc... are not used by compiz.

I use Ubuntu Hardy beta (but there was the same problem on gutsy)
[lspci]
00:00.0 Host bridge [0600]: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub [8086:2a00] (rev 03)
     Subsystem: ASUSTeK Computer Inc. Device [1043:14e7]
01:00.0 VGA compatible controller [0300]: nVidia Corporation GeForce 8600M GS [10de:0425] (rev a1)
     Subsystem: ASUSTeK Computer Inc. Device [1043:1514]

Revision history for this message
®om (rom1v) wrote :

Problem not resolved in intrepid beta.

I have to add at the very beginning of /usr/bin/compiz :
nvidia-settings -l

Revision history for this message
®om (rom1v) wrote :

I think that installing nvidia-setting package should add "nvidia-settings -l" to execute during boot time, but I don't know where.

Revision history for this message
®om (rom1v) wrote :

In /usr/bin/gnome-wm lines 49 to 66 (ubuntu intrepid beta):

----
# special case handling for dapper upgrades (this runs only once after the upgrade)
if [ -z "$DEFWM" ] && [ -f /var/lib/gnome-session/dapper-upgrade ]; then
    gconftool-2 -s /desktop/gnome/applications/window_manager/default /usr/bin/metacity --type string
    DEFWM=/usr/bin/metacity
fi

# If not exist, set to compiz (if available)
if [ ! -x "$DEFWM" ]; then
    if [ -x "/usr/bin/compiz" ]; then
 gconftool-2 -s /desktop/gnome/applications/window_manager/default /usr/bin/compiz --type string
 DEFWM=/usr/bin/compiz
    elif [ -x "/usr/bin/metacity" ]; then
 gconftool-2 -s /desktop/gnome/applications/window_manager/default /usr/bin/metacity --type string
 DEFWM=/usr/bin/metacity
    else
 unset DEFWM
    fi
fi
----

To my mind, the special case handling for dapper upgrade should be removed (impossible to upgrade directly from dapper to intrepid). But doesn't matter.

The important thing is to call "nvidia-settings -l" :

----
# If not exist, set to compiz (if available)
if [ ! -x "$DEFWM" ]; then
    if [ -x "/usr/bin/compiz" ]; then
 gconftool-2 -s /desktop/gnome/applications/window_manager/default /usr/bin/compiz --type string
 DEFWM=/usr/bin/compiz
 if [ -x "/usr/bin/nvidia-settings" ]; then
  /usr/bin/nvidia-settings -l
 fi
    elif [ -x "/usr/bin/metacity" ]; then
 gconftool-2 -s /desktop/gnome/applications/window_manager/default /usr/bin/metacity --type string
 DEFWM=/usr/bin/metacity
    else
 unset DEFWM
    fi
fi
----

Maybe nvidia-settings -l should be called in another place, please tell me if you find a better place.

This fix is important, because users don't understand why compiz has a such bad quality, while they configure vsync and/or anisotropic and/or antialiasing in nvidia-settings.

Revision history for this message
®om (rom1v) wrote :

A better fix would be to do that at the end of the file. I provide a patch that I tested, it works.

Revision history for this message
s0ullight (s0ullight) wrote :

the patch definitly works ;)

Revision history for this message
®om (rom1v) wrote :

A better solution may be to add a file : /etc/X11/Xsession.d/56nvidia-settings

----
# This file is sourced by Xsession(5), not executed.

# loads nvidia-settings config
if [ -x /usr/bin/nvidia-settings ]; then
  /usr/bin/nvidia-settings -l
fi
----

(thanks to mvo)

(tested)

Revision history for this message
®om (rom1v) wrote :

Another solution is provided on bug 108060.

Revision history for this message
®om (rom1v) wrote :

Any chance that a patch will be included in intrepid?

Revision history for this message
Bryce Harrington (bryce) wrote :

Hi rom1v,

Thanks for including the attached files. Could you also include your /var/log/Xorg.0.log?

Changed in nvidia-settings:
status: New → Incomplete
Revision history for this message
®om (rom1v) wrote :

I don't understand why, but I attach it.

Changed in nvidia-settings:
status: Incomplete → New
Revision history for this message
Bryce Harrington (bryce) wrote :

[This is an automated message]

Hi rom1v,

Please attach the output of `lspci -vvnn` too.

Changed in nvidia-settings:
status: New → Incomplete
Revision history for this message
®om (rom1v) wrote :
Bryce Harrington (bryce)
Changed in nvidia-settings:
importance: Undecided → Wishlist
status: Incomplete → Triaged
Bryce Harrington (bryce)
description: updated
Revision history for this message
®om (rom1v) wrote :

Will the problem be corrected in jaunty?

Changed in nvidia-settings (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Alberto Milone (albertomilone) wrote :

I'm closing this bug report as now, in Ubuntu Lucid, we call nvidia-settings with "--load-config-only" when the session starts

Changed in nvidia-settings (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.