You are not logged in.

#1 2023-02-28 14:23:34

vidarr
Member
Registered: 2023-02-28
Posts: 9

[SOLVED] startx freezes on intel/nvidia optimus laptop

Hello, I'm setting up an arch system on an intel/nvidia optimus enabled laptop. I'm planning on using X with i3 as my window manager. Whenever I run startx, it simply hangs. I can't switch tty or anything, the only thing that works is a hard reboot using the physical shutdown button. My xinitrc only includes the standard merging of keymaps etc and exec i3. I've tried running it both with and without a xorg/nvidia config. My current one looks like this

Section "ServerLayout"    
    Identifier "layout"    
    Screen 0 "nvidia"    
    Inactive "intel"
EndSectionSection "Device"    

Identifier "nvidia"    
    Driver "nvidia"    
    BusID "PCI:1:0:0"    
    Option "RegistryDwords" "EnableBrightnessControl=1"
EndSectionSection 

"Screen"    
    Identifier "nvidia"    
    Device "nvidia"    
    Option "AllowEmptyInitialConfiguration"
EndSectionSection 

"Device"    
    Identifier "intel"    
    Driver "modesetting"
EndSectionSection 

"Screen"    
    Identifier "intel"    
    Device "intel"
EndSection

Here's my latest Xorg.0.log

Ideally, I'd want to run on intel in general, and use prime offloading for heavier applications.

Last edited by vidarr (2023-02-28 16:07:35)

Offline

#2 2023-02-28 14:32:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,374

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

Ideally, I'd want to run on intel in general, and use prime offloading for heavier applications.

That config is syntactically illegal and not the cause of

[   648.454] (==) ServerLayout "layout"
[   648.454] (**) |-->Screen "nvidia" (0)
[   648.454] (**) |   |-->Monitor "<default monitor>"
[   648.454] (**) |   |-->Device "nvidia"
[   648.454] (**) |   |-->GPUDevice "intel"
[   648.454] (==) No monitor specified for screen "nvidia".

Remove the bogus file you posted and post the output of

grep -riE '(intel|nvidia)' /{etc,usr/share}/X11/xorg.conf*

Any file that shows up in /etc/ is supicious, there're supposed to be some in /usr/share matching "nvidia"

Offline

#3 2023-02-28 14:39:35

vidarr
Member
Registered: 2023-02-28
Posts: 9

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

I've removed the config file I had. Running the grep command you posted, it doesn't find a config in either location.

Offline

#4 2023-02-28 14:44:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,255

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

But that it should. is nvidia-utils installed (... and valid

pacman -Qkk nvidia-utils

, did you do anything else other than generating that config and installing the nvidia driver (i.e. optimus-manager,bumblebee,envycontrol whatever?)

Last edited by V1del (2023-02-28 14:45:33)

Offline

#5 2023-02-28 14:49:28

vidarr
Member
Registered: 2023-02-28
Posts: 9

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

nvidia-utils is installed. I've not tried any of the other ways of using optimus. I did try running nvidia-xconfig at one point, but it only said that it was unable to locate/open the x config file.

Offline

#6 2023-02-28 14:54:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,374

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

V1del wrote:
pacman -Qkk nvidia-utils

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855

Edit:
also

ls -R /{etc,usr/share}/X11/xorg.conf*

Last edited by seth (2023-02-28 14:55:05)

Offline

#7 2023-02-28 14:54:43

vidarr
Member
Registered: 2023-02-28
Posts: 9

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

Ah wait, hold up, I missed the asterix at the end of the grep command! My bad, here's the output

Last edited by vidarr (2023-02-28 14:55:15)

Offline

#8 2023-02-28 14:55:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,374

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

/etc/X11/xorg.conf.d/optimus.conf.old:	Identifier "nvidia"
/etc/X11/xorg.conf.d/optimus.conf.old:	Driver "nvidia"

Remove that file.

Offline

#9 2023-02-28 14:58:26

vidarr
Member
Registered: 2023-02-28
Posts: 9

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

Ok, done. What next?

Offline

#10 2023-02-28 15:01:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,374

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

Try to start X11, in doubt post an updated log.

Offline

#11 2023-02-28 15:04:49

vidarr
Member
Registered: 2023-02-28
Posts: 9

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

Tried running, it was unable to connect to the x server, here's the log

Offline

#12 2023-02-28 15:21:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,374

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

[  3959.744] (EE) open /dev/dri/card0: No such file or directory
[  3959.744] (WW) Falling back to old probe method for modesetting
[  3959.744] (EE) open /dev/dri/card0: No such file or directory
[  3959.744] vesa: Refusing to run, Framebuffer or dri device present
[  3959.744] (EE) Screen 0 deleted because of no matching config section.

1. remove every xf86-video-* package you've installed
2. https://wiki.archlinux.org/title/NVIDIA … de_setting
3. Please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Offline

#13 2023-02-28 15:29:29

vidarr
Member
Registered: 2023-02-28
Posts: 9

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

Removed the xf86-video-intel package, added the nvidia_drm kernel parameter, rebooted, here's the log

Appreciate the help btw!

Offline

#14 2023-02-28 15:43:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,374

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

feb 28 17:26:29 vanheim (udev-worker)[423]: Error running install command '/usr/bin/false' for module i915: retcode 1

You blacklisted i915

Edit:

feb 28 17:26:29 vanheim kernel: traps: Missing ENDBR: _nv012309rm+0x0/0x10 [nvidia]

Also see https://wiki.archlinux.org/title/NVIDIA#Installation - specifically "ibt=off"

Last edited by seth (2023-02-28 15:44:24)

Offline

#15 2023-02-28 15:49:42

vidarr
Member
Registered: 2023-02-28
Posts: 9

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

I don't remember ever editing it, but yes indeed my /etc/modprobe.d/blacklist.conf looks like this

blacklist nouveau
install i915 /usr/bin/false
install intel_agp /usr/bin/false
install viafb /usr/bin/false
install radeon /usr/bin/false
install amdgpu /usr/bin/false

Is it just a matter of removing the i915 line from there? And is there any other line that should be removed?

Offline

#16 2023-02-28 15:52:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,374

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

w/o a specific reason, none of them should be there.
You'll probably also have to rebuild the initramfs.

Offline

#17 2023-02-28 15:58:31

vidarr
Member
Registered: 2023-02-28
Posts: 9

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

Removed all blacklisted items, added ibt=off to the kernel parameters, rebuilt the initramfs, rebooted, ran startx, and it works! Well, somewhat, I've got another issue now. Startx works and I can switch tty's, but the graphics are all broken.

Offline

#18 2023-02-28 16:02:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,374

Re: [SOLVED] startx freezes on intel/nvidia optimus laptop

Startx works and I can switch tty's, but the graphics are all broken.

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855

Open a new thread, post your xinitrc and link(! don't embed it) a screenshot to illustrate the situation.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB