Re: [Nix-dev] nvidia proprietary / i7 notebook - does not start

2017-05-12 Thread Cillian de RĂ³iste
Sorry for replying off-list (I suggested trying bumblebee).

Just to check, did you enable intel (alone) in the videoDrivers (I think
that's necessary, please correct me if I'm wrong). Do you have BIOS/EFI
options to use only the nvidia GPU? Is using nouveau an option for you? You
could also try nouveau as the bumblebee driver.

I'd love to know what ubuntu does.

2017-05-10 21:50 GMT+02:00 Marc Weber :

> The Ubuntu disk doesn't habe bumblbee installed.
> Activating it on nixos makes X fail with no devices found even though I
> added BusID. Stopping BumblBee starting X manually I get the same
> results 8x8 size ..
>
> So I wonder whether I need it at all
>
> Marc Weber
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nvidia proprietary / i7 notebook - does not start

2017-05-11 Thread Arseniy Seroka
I think it should detect such things. Can you create a patch please?

On 11 May 2017 14:10, "Marc Weber"  wrote:

>
> This worked, almost:
>
> ({config, pkgs, ...}: {
>   hardware.bumblebee.enable = true;
>   hardware.bumblebee.connectDisplay = true;
>   hardware.bumblebee.driver = "nvidia";
>   hardware.bumblebee.group = "users";
>
>   hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
>   services.xserver.videoDrivers = ["intel nvidia"];
>   services.xserver.deviceSection = ''
> BusID "PCI:3:0:0"
> BoardName "GeForce 940MX"
>   '';
> })
>
>   (Thanks to github.com/yamafaktory/nixos-configuration)
>
>
> After applying the GDM patch (.66 nivdia driver), I can start X with the
> configuratino above, and glxgears -info shows 79 and 780
> fpms/sec depending on whether optirun was used. nvidia shows intel or
> nvidia.
>
>
> nix-shell -p python36Packages.tensorflowWithCuda
> then optirun python on
>
>   import tensorflow as tf
>   # Creates a graph.
>   a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
>   b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
>   c = tf.matmul(a, b)
>   # Creates a session with log_device_placement set to True.
>   sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
>   # Runs the op.
>   print(sess.run(c))
>
> still shows CPU. The nix-shell command worked on a desktop, the test
> script worked on ububntu on the same machine. So there is still a small
> thing left to explore, but I do no longer have to reboot :)
>
> Thank you very much for helping me.
>
> Should a nixos-hardware-scan be able to detect such cases and write a
> configuration like above? Then a nixos-rebuild boot/switch could
> 'regenerate' the config and warn if your system doesn't match what nixos
> expected. Then you can review changes and things just work ?
> If there are preferences to be choosen such as nvidia vs nouveau such
> choice could be remembered ?
>
> Marc Weber
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> https://mailman.science.uu.nl/mailman/listinfo/nix-dev
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nvidia proprietary / i7 notebook - does not start

2017-05-11 Thread Marc Weber

This worked, almost:

({config, pkgs, ...}: { 
  hardware.bumblebee.enable = true;
  hardware.bumblebee.connectDisplay = true;
  hardware.bumblebee.driver = "nvidia";
  hardware.bumblebee.group = "users";

  hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
  services.xserver.videoDrivers = ["intel nvidia"]; 
  services.xserver.deviceSection = ''
BusID "PCI:3:0:0"
BoardName "GeForce 940MX"
  '';
})

  (Thanks to github.com/yamafaktory/nixos-configuration)


After applying the GDM patch (.66 nivdia driver), I can start X with the
configuratino above, and glxgears -info shows 79 and 780
fpms/sec depending on whether optirun was used. nvidia shows intel or
nvidia.


nix-shell -p python36Packages.tensorflowWithCuda
then optirun python on

  import tensorflow as tf
  # Creates a graph.
  a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
  b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
  c = tf.matmul(a, b)
  # Creates a session with log_device_placement set to True.
  sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
  # Runs the op.
  print(sess.run(c))

still shows CPU. The nix-shell command worked on a desktop, the test
script worked on ububntu on the same machine. So there is still a small
thing left to explore, but I do no longer have to reboot :)

Thank you very much for helping me.

Should a nixos-hardware-scan be able to detect such cases and write a
configuration like above? Then a nixos-rebuild boot/switch could
'regenerate' the config and warn if your system doesn't match what nixos
expected. Then you can review changes and things just work ?
If there are preferences to be choosen such as nvidia vs nouveau such
choice could be remembered ?

Marc Weber
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nvidia proprietary / i7 notebook - does not start

2017-05-11 Thread zimbatm
Writing from the phone so I don't have all the references at hand.

There are currently two issues with NixOS that might affect you:
* Nvidia Not creating the device driver properly
* GDM tty allocation issue, this leads in GDM repeatedly crashing and
making the console unusable because of the interruptions.

There is a PR pending that fixes both issues but needs testing.

On Wed, 10 May 2017, 13:34 Marc Weber,  wrote:

> This works (ubuntu installation), slightly different x versions
>   http://mawercer.de/tmp/xorg-ubuntu.conf
>   http://mawercer.de/tmp/ubuntu.log
>
> Taking xorg config from Ubuntu but using paths from nixos:
>   http://mawercer.de/tmp/xserver-ubuntu-plain.conf
>   http://mawercer.de/tmp/xserver-ubuntu-plain.conf.log
>
> # Trynig to set BusID keeping most of nixos's config:
>   http://mawercer.de/tmp/xorg-nixos.conf
>   http://mawercer.de/tmp/xorg-nixos.conf.log
>
> Best I got is being able to connect to blank screen by setting DISPLAY and
> running xrandr:
>   Screen 0: minimum 8 x 8, current 8 x 8, maximum 16384 x 16384
>   but HDMI is missing and sizes are missing
>   manually setting a size -s 800x600 -> no windows appear.
>
> Yes, I tried
>   xrandr --setprovideroutputsource modesetting NVIDIA-0
>   xrandr --auto
>
> Yes I tried blacklisting nouveau (doesn't change anything)
>
> xrandr output (runnig nouveau):
>
>   eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis
> y axis) 344mm x 194mm
>  1920x1080 60.01*+
>  1400x1050 59.98
>  1280x1024 60.02
>  1280x960  60.00
>  1024x768  60.0460.00
>  960x720   60.00
>  928x696   60.05
>  896x672   60.01
>  800x600   60.0060.3256.25
>  700x525   59.98
>  640x512   60.02
>  640x480   60.0059.94
>  512x384   60.00
>  400x300   60.3256.34
>  320x240   60.05
>   HDMI-1 connected (normal left inverted right x axis y axis)
>  1600x1200 60.00 +
>  1280x1024 75.0260.02
>  1280x960  60.00
>  1152x864  75.00
>  1024x768  75.0370.0760.00
>  832x624   74.55
>  800x600   72.1975.0060.3256.25
>  640x480   75.0072.8166.6759.94
>  720x400   70.08
>
> Marc Weber
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> https://mailman.science.uu.nl/mailman/listinfo/nix-dev
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nvidia proprietary / i7 notebook - does not start

2017-05-09 Thread Ruben Astudillo
On 09/05/17 20:29, Marc Weber wrote:
> Desktop: Everything is fine, the way it should
> 
> Laptop: 
>   lspci: 03:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940MX] 
> (rev a2)
>   => Ubuntu -> fine
>   => Nixos -> black -> then blinking cursor, no (EE) lines in X log

I know own a graphics card nor a NVIDIA chipset, but you will have to at
least post the logs on the journald/xsession.errors/dmesg . Probably a
module isn't being loaded by the kernel ?

-- 
-- Ruben
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] nvidia proprietary / i7 notebook - does not start

2017-05-09 Thread Marc Weber
Desktop: Everything is fine, the way it should

Laptop: 
  lspci: 03:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940MX] (rev 
a2)
  => Ubuntu -> fine
  => Nixos -> black -> then blinking cursor, no (EE) lines in X log

I tried copying the relevant part from X.org defining drivers, screens,
monitors from Ubuntus config to no avail. Also setting BusID
AllowEmptyConfig and such didn't seem to work.

Has anybody experienced the same issue/ maybe even solved it?

Marc Weber
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev