After install video-nvidia manjaro can't boot

Since optimus-manager wasn't there a moment ago, reboot it once more. Maybe this time it will click finally.

i try that not working. if removing optimus-manager and reinstall it maybe should work!
Edit:

[fla@fla-pc ~]$ ls /etc/optimus-manager/
xorg-intel.conf  xorg-nvidia.conf

i don't have

/etc/optimus-manager/optimus-manager.conf` (create it if it does not exist).

If you want to re-install optimus-manager you should do it in one session, reboot at the end, so do the cleanup of configs:

sudo optimus-manager --cleanup

then disable its process:

sudo systemctl stop optimus-manager.service
sudo systemctl disable optimus-manager.service

Then uninstall with its confs:

sudo pacman -Rn optimus-manager

Then install again:


sudo pacman -S optimus-manager

Then activate process again:


sudo systemctl start optimus-manager.service
sudo systemctl enable optimus-manager.service

Finally, reboot.

how can create this conf file? i don't have it

I don't have it either. It's not needed by default. You only need it if you want to change some default settings. So first check if the actual, default conf exists:

ls /usr/share/ | grep optimus

You should get the output:

optimus-manager.conf

If not, then something is wrong and that might be the reason that it's not working, then you need to reinstall the package as shown above.

If you do want to customize the original conf, just copy it to /etc/optimus-manager/ and then you can edit it:

sudo cp /usr/share/optimus-manager.conf /etc/optimus-manager/optimus-manager.conf

You can then edit it directly via graphical program (kate or kwrite) or use terminal:

sudo nano /etc/optimus-manager/optimus-manager.conf

2 Likes
[fla@fla-pc ~]$ ls /usr/share/ | grep optimus
optimus-manager.conf

whatever i'm going to re-install.

For the record, optimus manager is simply changing the content of one conf during the switch:

/etc/X11/xorg.conf.d/10-optimus-manager.conf

When I'm on intel it has intel configuration when I'm on invidia it has nvidia configuration. So if optimus-manager is not working it's because it's failing to set this one conf

Curently I'm on nvidia and the conf inside looks like that:

Section "Module"
	Load "modesetting"
EndSection

Section "Device"
	Identifier "nvidia"
	Driver "nvidia"
	BusID "01:00:0"
	Option "AllowEmptyInitialConfiguration"
	Option "Coolbits" "28"
	Option "DRI" "3"
EndSection

Your should be similar but beware, you may have different BusID and so using this conf above may not work for you and it would make your system unbootable. You have to get the right BusID from some command. I don't know it by heart, I would have to google it.

It is possible that optimus-manager cannot retrieve that BusID for nvidia and that is why it's not changing the conf. Your earlier post showed GPU card as unknown and that maybe the core reason. Somewhere you must set the correct BusID but for that you need someone more knowledgeable than me. Besides, optimus-manager logs should show an error when being unable to switch the conf and show the reason so I'm not sure that is the reason. So far all logs look correct, which is weird and unhelpful.

2 Likes

Strange
when i switch to nvidia i don't have a etc/X11/xorg.conf.d/10-optimus-manager.conf ! but when switch back to intel 10-optimus-manager.conf is there.

Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "00:02:0"
Option "DRI" "3"
EndSection

1 Like

OK, so that tells us, optimus-manager can create intel conf but fails to do so with nvidia one. The crucial question is why?

Is it a matter of setting properly other components that the script uses? Is this a bug in the script itself that is not handling your situation?

How are you handling tty? We can try out something manually but in case you should be able to revert changes in tty.

I'm thinking about making a backup of intel conf and manually change it to nvidia one, then reload session. However, it is possible that optimus-manager script will overwrite it to intel again. But if it doesn't happen, will at least check if nvidia setup works correctly and you will have at least manual method to switch it for now - a workaround till you won't solve it properly.

EDIT: Show me the inside of the /usr/share/optimus-manager.conf

cat /usr/share/optimus-manager.conf

I just want to be sure that the default conf is correct.


[fla@fla-pc ~]$ cat /usr/share/optimus-manager.conf
[optimus]

# Module used for power switching. Possible values : nouveau, bbswitch, none
# If you select "none", no power switching will be done at all (the Nvidia GPU will stay powered
# at all times).
# Also note that if you use bbswitch, you will not be able to use video outputs attached to
# your Nvidia GPU in Intel mode.
switching=nouveau

# Whether or not optimus-manager must restart your login manager when switching GPUs.
# If disabled, the GPU switch is not applied until you have restarted it manually.
login_manager_control=yes


[intel]

# Driver to use for the Intel GPU. Possible values : modesetting, intel
driver=modesetting

# Acceleration method (corresponds to AccelMethod in the Xorg configuration).
# Possible values : sna, xna
# Leave blank for the default (no option specified)
accel=

# Enable TearFree option
# Possible values : yes, no
# Leave blank for the default (no option specified)
tearfree=

# DRI version. Possible values : 2, 3
DRI=3

# Whether or not to enable modesetting for the nouveau driver.
# Does not affect modesetting for the Intel GPU driver !
# This option does not matter if you use bbswitch as switching backend.
modeset=yes

[nvidia]

# DRI version. Possible values : 2, 3
DRI=3

# Whether or not to enable modesetting. Required for PRIME Synchronization.
modeset=yes

# Whether or not to enable the NVreg_UsePageAttributeTable option in the Nvidia driver.
# Recommended, can cause poor CPU performance otherwise.
PAT=yes


# Comma-separated list of Nvidia-specific options to apply.
# Available options :
# - overclocking : enable CoolBits in the Xorg configuration and unlock clocking options
#   in the Nvidia control panel.
# - triple_buffer : enable triple buffering.
options=overclocking
[fla@fla-pc ~]$

Mostly it looks ok but weirdly you miss that part:

# DPI value. This will be set using the Xsetup script passed to your login manager.
# It will run the command
# xrandr --dpi <dpi value>
# Leave blank for the default.
DPI=

In theory, you shouldn't modify it but at this point, you can add that part after PAT=yes and before #Comma-seperated, so nvidia part should look like this:

[nvidia]

# DRI version. Possible values : 2, 3
DRI=3

# Whether or not to enable modesetting. Required for PRIME Synchronization.
modeset=yes

# Whether or not to enable the NVreg_UsePageAttributeTable option in the Nvidia driver.
# Recommended, can cause poor CPU performance otherwise.
PAT=yes

# DPI value. This will be set using the Xsetup script passed to your login manager.
# It will run the command
# xrandr --dpi <dpi value>
# Leave blank for the default.
DPI=


# Comma-separated list of Nvidia-specific options to apply.
# Available options :
# - overclocking : enable CoolBits in the Xorg configuration and unlock clocking options
#   in the Nvidia control panel.
# - triple_buffer : enable triple buffering.
options=overclocking

Then reboot. However, I don't think it will fix it but you can try.

1 Like

Check if you have bbswitch installed, for kernel 4.19 package is named linux419-bbswitch. For other kernels, they are named accordingly.

save and reboot, manjaro won't up (i have access to tty2)
Imgur
yes i have linux419-bbswitch I think it installed with driver.

Hmmm... in that case the package intelligently adjusted the conf for your system. So go again to the changed conf and reverse changes:

sudo nano /usr/share/optimus-manager.conf

EDIT: By the way I realized that when I'm on nvidia, nvidia-optimus changes also this file:


/usr/share/sddm/scripts/Xsetup

and adds there:


#!/bin/sh
# Xsetup - run as root before the login dialog appears
exec /usr/bin/optimus-manager_Xsetup

I'll switch to Intel and check if it changed.

Yeap, on intell it shows only:

#!/bin/sh
# Xsetup - run as root before the login dialog appears

Weirdly, now I don't have /etc/X11/xorg.conf.d/10-optimus-manager.conf on intel, so completely reverse as in your case. Although I would swear I saw one at some point...

Maybe.... It looks my default mode is Intel, when I reboot I get always Intel mode, even if I was previously on nvidia. Then probably I get the intel conf. When I switch to it, then it's gone, at least that is my theory now :stuck_out_tongue: .

As to your unbootable system, it may be that the modified conf is ok, but you modifed it with GUI program and they sometimes add some invisible lines that screw config. That is why it's often safer to edit them in the terminal through nano program.

So check if you don't have some extra lines on the beginning when editing:

sudo nano /usr/share/optimus-manager.conf

deleted that part and save now i'm back to desktop.
in

/usr/share/sddm/scripts/Xsetup

i have too

#!/bin/sh
# Xsetup - run as root before the login dialog appears

(even switch to nvidia, it's same)
you want I'm add this line on there?

exec /usr/bin/optimus-manager_Xsetup

Not yet. Since I know you can handle tty then let's do this experiment.

  1. Rename existing optimus-manager X11 conf and add intel at the end so you could bring it back easily if it went wrong:

sudo mv /etc/X11/xorg.conf.d/10-optimus-manager.conf /etc/X11/xorg.conf.d/10-optimus-manager.conf-intel

  1. Create new, nvidia conf based on mine and hopefully, it will fit:

sudo nano /etc/X11/xorg.conf.d/10-optimus-manager.conf

Section "Module"
	Load "modesetting"
EndSection

Section "Device"
	Identifier "nvidia"
	Driver "nvidia"
	BusID "01:00:0"
	Option "AllowEmptyInitialConfiguration"
	Option "Coolbits" "28"
	Option "DRI" "3"
EndSection
  1. Add this exec /usr/bin/optimus-manager_Xsetup line:

sudo nano /usr/share/sddm/scripts/Xsetup

#!/bin/sh
# Xsetup - run as root before the login dialog appears
exec /usr/bin/optimus-manager_Xsetup

After that is done, log out, log in and check

optimus-manager --print-mode

not work. still in intel. but in new etc/X11/xorg.conf.d/10-optimus-manager.conf
changed

Section "Device"
	Identifier "intel"
	Driver "modesetting"
	BusID "00:02:0"
	Option "DRI" "3"
EndSection

and

#!/bin/sh
# Xsetup - run as root before the login dialog appears

now re-installed and it's same not working. how can back to bumblebee?

Switching method is not bbswitch, if that matters.. (I have no experience with optimus-manager.. yet)

It doesn't matter. It defaults to bbswitch anyway without noveau.

I couldn't on my side but maybe you will have more luck.

  1. Cleanup:

sudo optimus-manager --cleanup

  1. Disable optimus-manager process:
sudo systemctl stop optimus-manager.service
sudo systemctl disable optimus-manager.service
  1. Restore normal confs that you backed up.
sudo mv /etc/X11/xorg.conf.d/90-mhwd.conf.bak /etc/X11/xorg.conf.d/90-mhwd.conf
sudo mv /etc/X11/mhwd.d/intel.conf.bak /etc/X11/mhwd.d/intel.conf
  1. Enable bumblebee:
sudo systemctl start bumblebeed
sudo systemctl enable bumblebeed
  1. Reboot

  2. Check if bumblebee is working correctly by running these commands:

sudo systemctl status bumblebeed

If it's active and shows now errors do this:

primusrun glxgears

It should open a window with spinning cogs and show fps in the terminal. If not, you will see error that may help troubleshooting further.

If this won't work, we can try to uninstall bumbleebe and drivers then install them again to load correct configuration with mhwd. But first, try what I gave above.

1 Like

Forum kindly sponsored by