Summary: | gnome-base/gdm-3.16.1.1 does not execute scripts in /etc/gdm/Init | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | bwcknr <bwcknr> |
Component: | [OLD] GNOME | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | bwcknr |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugzilla.gnome.org/show_bug.cgi?id=751602 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
startup of gdm.service with debug logging enabled
script to be run from /etc/gdm/Init/Default |
Description
bwcknr
2015-06-27 22:14:35 UTC
Created attachment 405876 [details]
startup of gdm.service with debug logging enabled
Please attach the script that you wanted to run, and "ls -l" output showing where it is installed with what name/mode. Created attachment 405880 [details]
script to be run from /etc/gdm/Init/Default
ls -lah /etc/gdm/Init/Default
-rwxr-xr-x 1 root root 2,7K 28. Jun 00:03 /etc/gdm/Init/Default
(In reply to bwcknr from comment #3) > Created attachment 405880 [details] > script to be run from /etc/gdm/Init/Default > > ls -lah /etc/gdm/Init/Default > -rwxr-xr-x 1 root root 2,7K 28. Jun 00:03 /etc/gdm/Init/Default Thanks. There are two things going wrong here: 1) In general, Init/Default script seems to be ignored. (But PostLogin/Default and PreLogin/Default do run.) 2) Your Init/Default would fail even if gdm did not ignore it. Remember that "exec" means replace the current shell interpreter process with the specified command. So everything in the script file after "exec xrandr --setprovideroutputsource ..." will not run. Including the "xrandr --auto" that you probably need for optimus. The user who added those instructions in the wiki doesn't know shell syntax, we need to fix the page. It's a problem with wikis, people will sometimes add nonsense and since it's hosted on gentoo.org it looks official... Reported upstream at https://bugzilla.gnome.org/show_bug.cgi?id=751602 Here's a workaround to execute the xrandr commands required during gdm initialization to make it work with optimus. Create the file "/usr//share/gdm/greeter/autostart/optimus.desktop" containing: [Desktop Entry] Type=Application Name=Optimus Comment=Optimus Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto" X-GNOME-Autostart-Notify=true X-GNOME-AutoRestart=true With this gdm starts and you can enter your login/password, but after you hit enter you only get a black screen. There's another file to add to fix this. Create the file "/etc/X11/xinit/xinitrc.d/01-optimus" containing: #!/bin/sh xrandr --setprovideroutputsource modesetting NVIDIA-0 xrandr --auto Set this file executable: chmod +x /etc/X11/xinit/xinitrc.d/01-optimus With these two files I'm able to login successfully with gdm on my optimus system. Finally found time to evaluate the configuration and for me it's working. Upstream confirmed that scripts are documented and distributed, but are not effectively run. Furthermore there is planned to be support in Xserver for automatically configuration of Optimus systems. Closing. |