NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.34k stars 13.58k forks source link

Plasma5 or Gnome3 or XFCE4 with GDM do not recognize the builtin screen of my laptop after logged in. #95299

Open astrojhgu opened 4 years ago

astrojhgu commented 4 years ago

Describe the bug I have a ThinkPad P52, with a Quadro P2000 Mobile+Intel Corporation Device 3e94 video card. Originally I choose SDDM as the display manager.

The config about the video card is

services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.optimus_prime.enable = true;
hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:1:0:0";
hardware.nvidia.optimus_prime.intelBusId = "PCI:0:2:0";
#hardware.nvidia.modesetting.enable = true;  # this is commented out, so that its value is false by default.

I attempted to switch my display-manager from SDDM to GDM last night. After reboot, the login dialog where I am asked to input the password appeared normally. After I entered the password, the builtin (eDP-1-1) screen blacked out, while the external monitor (HDMI-0) displays the desktop.

Running xrandr the eDP-1-1 is how shown, other outputs are normally shown.

No matter which desktop-manager (among Gnome3, Plasma5, Xfce4) is chosen, the above problem always exists.

Switching to another user does not solve this problem, which means it is not caused by my per-user config files.

Unplug the external monitor does not solve this problem, as the builtin screen will still blacked out. I'm able to switch termainal with alt+ctrl+F? and switch back. When I do this the login screen appears again.

Then the only thing what I can do is switching back to SDDM, and the builtin screen came back again.

To Reproduce Steps to reproduce the behavior: My origin working config about SDDM is

 services.xserver.displayManager.sddm.enable = true;
  services.xserver.displayManager.sddm.enableHidpi = true;
  services.xserver.displayManager.sddm.autoNumlock = true;
  services.xserver.displayManager.sddm.extraConfig = ''
  [X11]
  ServerArguments=-nolisten tcp -dpi 180  
'';

What I did was comment out above configs and add

services.xserver.displayManager.gdm.enable = true;

Expected behavior One of the Gnome3, Plasma5, Xfce4 sessions should run normally after logged in on both the builtin and external screens.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here. lspci.txt dmidecode.txt

Notify maintainers

Metadata Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

- system: `"x86_64-linux"`
 - host os: `Linux 5.4.58, NixOS, 20.03.2778.20904118004 (Markhor)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.6`
 - channels(root): `"nixos-20.03.2778.20904118004"`
 - channels(astrojhgu): `"nixos-20.03.2454.41aa2272feb"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

attribute:
services.xserver.displayManager.gdm.enable
stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info