Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nvidia Prime #33624

Closed
wants to merge 0 commits into from
Closed

Nvidia Prime #33624

wants to merge 0 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 8, 2018

Big sorry guys, but that was quite a big hack and maintaince burden with a bunch of rough edges. Better to wait for proper solution from Nvidia.

@ghost ghost changed the title Add secondary X server for Nvidia Optimus as alternative to Bumblebee Nvidia Prime (Bumblebee alternative) Jan 13, 2018
@ookhoi
Copy link
Contributor

ookhoi commented Jan 17, 2018

Does it make sense to test this with wayland?

I'm using way-cooler on a thinkpad p70 with an nvidia quadro m3000m gm204.

@lheckemann
Copy link
Member

I'll hopefully get around to trying this out this weekend.

It would be nice to have it documented in the manual as well, perhaps under the section on nvidia graphics.

@ookhoi
Copy link
Contributor

ookhoi commented Jan 18, 2018

cd /tmp/
git clone git://github.com/nixos/nixpkgs /tmp/nixpkgs
cd /tmp/nixpkgs
git fetch origin pull/33624/head:nvidia
git checkout nvidia
nixos-rebuild test
-{ config, pkgs, ... }:
+{ config, pkgs, options,... }:
 
[..]
 
+  # test nvidia optimus
+  nix.nixPath                                   = [ "nixpkgs=/tmp/nixpkgs" ] ++ options.nix.nixPath.default;
+  hardware.nvidiaOptimus.enable                 = true;
error: 
Failed assertions:
- Sessions (name: nvidia-optimus, session: none+i3), (name: display-manager, session: none+i3) are not in 
(use ‘--show-trace’ to show detailed location information)

I've tried several things, uncommenting session = "none+i3";, driver = [ "nvidia" ]; and services.xserver.displayManager.xdm.session = "none+i3"; but I keep getting the above error.

I'm sorry to say I don't really understand what it tries to tell me, or how to solve.

I do use Xwayland (for firefox and xterm (to be replaced with alacritty)) and would very much like to test your work on this setup. I do not have services.xserver.enable = false; (which defaults to true).

Can you give me a hint on how to proceed?

@ookhoi
Copy link
Contributor

ookhoi commented Jan 18, 2018

Doh you are right, I've included services.xserver.enable = true; and services.xserver.autorun = false; now.

And session = "none+i3"; + services.xserver.windowManager.i3.enable = true;.

There is no way to test Xwayland without the last two?

@ookhoi
Copy link
Contributor

ookhoi commented Jan 18, 2018

[ 4576.204475] nvidia-nvlink: Nvlink Core is being initialized, major device number 243
[ 4576.204647] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
[ 4576.204732] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  387.34  Tue Nov 21 03:09:00 PST 2017 (using threaded interrupts)
[ 4576.207078] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  387.34  Tue Nov 21 02:09:45 PST 2017
[ 4576.208402] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[ 4576.208404] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0
[ 4576.212375] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 242
[ 4577.267955] resource sanity check: requesting [mem 0x000a0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000a0000-0x000bffff window]
[ 4577.268053] caller _nv001193rm+0x166/0x1c0 [nvidia] mapping multiple BARs
[ 4577.876691] NVRM: RmInitAdapter failed! (0x26:0xffff:1115)
[ 4577.876796] NVRM: rm_init_adapter failed for device bearing minor number 0
[ 4583.723754] refused connection: IN=wlan0 OUT= MAC=a4:34:d9:6f:59:7d:d2:ce:1e:1c:68:88:86:dd SRC=2001:0981:9652:0001:d0ce:1eff:fe1c:6888 DST=2001:0981:9652:0001:a634:d9ff:fe6f:597d LEN=80 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=TCP SPT=41854 DPT=80 WINDOW=5728 RES=0x00 SYN URGP=0 
[ 4586.796713] refused connection: IN=wlan0 OUT= MAC=a4:34:d9:6f:59:7d:d2:ce:1e:1c:68:88:86:dd SRC=2001:0981:9652:0001:d0ce:1eff:fe1c:6888 DST=2001:0981:9652:0001:a634:d9ff:fe6f:597d LEN=80 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=TCP SPT=41854 DPT=80 WINDOW=5728 RES=0x00 SYN URGP=0 
[ 4592.735891] refused connection: IN=wlan0 OUT= MAC=a4:34:d9:6f:59:7d:d2:ce:1e:1c:68:88:86:dd SRC=2001:0981:9652:0001:d0ce:1eff:fe1c:6888 DST=2001:0981:9652:0001:a634:d9ff:fe6f:597d LEN=80 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=TCP SPT=41854 DPT=80 WINDOW=5728 RES=0x00 SYN URGP=0 
[ 4592.735905] refused connection: IN=wlan0 OUT= MAC=a4:34:d9:6f:59:7d:d2:ce:1e:1c:68:88:08:00 SRC=192.168.178.67 DST=192.168.178.24 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=10123 DF PROTO=TCP SPT=56884 DPT=80 WINDOW=5840 RES=0x00 SYN URGP=0 
[ 4593.042451] nvidia-uvm: Unloaded the UVM driver in 8 mode
[ 4593.052358] [drm] [nvidia-drm] [GPU ID 0x00000100] Unloading driver
[ 4593.065556] nvidia-modeset: Unloading
[ 4593.073479] nvidia-nvlink: Unregistered the Nvlink Core, major device number 243
[ 4593.087215] bbswitch: disabling discrete graphics
[ 4593.098587] pci 0000:01:00.0: Refused to change power state, currently in D0
● nvidia-optimus.service - X11 Server nvidia-optimus
   Loaded: loaded (/nix/store/nrilxmpn1hji9rz3sqvd95dvlvg1i0xy-unit-nvidia-optimus.service/nvidia-optimus.service; linked; vendor preset: enabled)
   Active: active (running) since Thu 2018-01-18 10:19:06 CET; 11s ago
  Process: 23495 ExecStopPost=/nix/store/nk5jx6d5svshfadgzp1kz63s57jqafq2-unit-script/bin/nvidia-optimus-post-stop (code=exited, status=0/SUCCESS)
  Process: 23532 ExecStartPre=/nix/store/ml1dvavf8n9n7d1s7qmr22dwq03v98r2-unit-script/bin/nvidia-optimus-pre-start (code=exited, status=0/SUCCESS)
 Main PID: 23571 (xdm)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/nvidia-optimus.service
           └─23571 /nix/store/i26y1hqs5ahq1ampyykc2g5i41cg862x-xdm-1.1.11/bin/xdm -nodaemon -resources /nix/store/jkb6f9qc35f98507gn2n7l9gprhvk5qw-Xresources -server :1 local /ni>

Jan 18 10:19:08 p70 nvidia-optimus[23571]: Fatal server error:
Jan 18 10:19:08 p70 nvidia-optimus[23571]: (EE) no screens found(EE)
Jan 18 10:19:08 p70 nvidia-optimus[23571]: (EE)
Jan 18 10:19:08 p70 nvidia-optimus[23571]: Please consult the The X.Org Foundation support
Jan 18 10:19:08 p70 nvidia-optimus[23571]:          at http://wiki.x.org
Jan 18 10:19:08 p70 nvidia-optimus[23571]:  for help.
Jan 18 10:19:08 p70 nvidia-optimus[23571]: (EE) Please also check the log file at "/dev/null" for additional information.
Jan 18 10:19:08 p70 nvidia-optimus[23571]: (EE)
Jan 18 10:19:08 p70 nvidia-optimus[23571]: (EE) Server terminated with error (1). Closing log file.
Jan 18 10:19:08 p70 nvidia-optimus[23571]: xdm error (pid 23571): server unexpectedly died

@ghost ghost changed the title Nvidia Prime (Bumblebee alternative) [WIP] Nvidia Prime (Bumblebee alternative) Jan 24, 2018
@ghost ghost closed this Jan 24, 2018
@ghost ghost deleted the nvidia branch January 24, 2018 03:51
@ghost ghost changed the title [WIP] Nvidia Prime (Bumblebee alternative) . Jan 24, 2018
@ghost ghost changed the title . Nvidia Prime Jan 25, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants