[Nix-dev] Experiences with Nvidia Optimus?

Mathijs Kwik mathijs at bluescreen303.nl
Thu Jan 19 22:57:52 CET 2012


On Thu, Jan 19, 2012 at 9:52 PM, Arie Middelkoop <amiddelk at gmail.com> wrote:
> Hi Mathijs,
>
> Thanks for your reply. It resolved my confusion somewhat :)
>
>
>>> Although it is likely a separate issue, when using the intel driver, all
>>> KDE
>>> popdown menus have a graphical corruption (e.g. fully black), whereas
>>> e.g.
>>> popup menus in Chrome do not have any corruption. But this is an
>>> incentive
>>> to me to put in some effort to get it up and running properly :)
>>
>>
>> Yes, that issue is fixed in intel 2.15, patch here
>>
>> https://github.com/bluescreen303/nixpkgs/commit/a0f72db5786f9272735c5a797c4a1fb878de2587
>> I know 2.17 is available in nix repo, but it didn't compile (missing
>> deps). Officially 2.15+ should need newer xorg-server/mesa libs, but I
>> don't have issues.
>
>
> Version 2.15 is now apparently committed in nixpkgs. It solves the graphical
> corruptions indeed, although hardware acceleration even with only the intel
> driver does not seem to work yet ("aiglx error: calling driver entry point
> failed"). In fact, once in a while it does not notice that it fails and
> locks up the X server.

I submitted 2.15, but since today I'm having accelleration issues as
well. It has been running smoothly for over a month before.
I suspect the recent mesa & libdrm upgrades to interfere. I will try
to narrow it down this weekend.

>
> Maybe at some point I'll switch to more recent X server packages. I already
> did some preliminary testing with that a couple of days ago, but after that
> I cannot use most of the prebuild graphical packages anymore, so I'll only
> do that once I'm totally happy with my system configuration and can wait a
> full day for it to build everything.
>
> Conclusion for now: don't buy too new hardware in combination with linux...

The main issue is the fact that all the different xorg parts (server,
libs, mesa, drm, drivers) are quite tangled, without explicitly
stating/complaining about version numbers.
Back in the days of xfree86, the big monolithical releases were quite
stable, but it took ages for new features/drivers to be included.

Now X.org is a lot more modular but for best results, you stick to
full x.org releases (7.6 currently). Those complete releases however,
still move slowly, so to stay up to date with new hardware and
features, individual parts (mesa/xorg-server/drivers) can be upgraded,
but there are some inter-dependencies that aren't clear. Intel does a
perfect job of testing/documenting which combinations work best for
their hardware and try to do this every quarter of the year. See
http://intellinuxgraphics.org/index.html and check out their Q3/Q4
offerings. There you can see which combinations work best.

So your claim about new hardware isn't totally true. I think intel
does a nice job here and it's nixos who's lagging behind (that's not a
complaint though).
Ubuntu and Arch do stay up to date and bump on all these small
inter-module issues and find out the best dependencies. But they have
a far larger developer-base and userbase to report and test issues.
So for nix - as long as no-one has issues - it's easiest/safest to
stick to the "monolithic" xorg releases.

It appears people have started upgrading parts of xorg now though,
causing the issue with our 2.15 driver. As a result, I think we must
either downgrade mesa/libdrm, or upgrade other packages (like
xorg-server) too, so the stack is balanced again.
As you've noticed, trying out these things can be time-consuming, as
"lower" packages like X11 trigger rebuilds of every GUI application.

I'll see what I can come up with this weekend. For now, disabling
desktop effects (compositing) is enough to keep everything
smooth&stable.

Just out of interest (since you have a recent laptop as well): Does
the suspend functionality work when you close the lid? Mine doesn't by
default because of the USB3 driver, but I found a workaround which I
can submit to nixos if others need it.

Mathijs

>
> Arie


More information about the nix-dev mailing list