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

Cannot switch mode without DM #504

Closed
kafkaGen opened this issue Jun 21, 2022 · 2 comments
Closed

Cannot switch mode without DM #504

kafkaGen opened this issue Jun 21, 2022 · 2 comments

Comments

@kafkaGen
Copy link

Describe the bug
I do not use any DM. I cannot switch to another mode. After command optimus-manager --switch MODE no X sessions quite happends and nothing change on reboot.

System info
Please include :

  • Your distribution
    Arch Linux x86_64
  • Your desktop manager (KDE, GNOME, Cinnamon...), if you have one
    Qtile
  • You display manager (SDDM, GDM, LightDM...), if you have one. If you do not know, you are probably using the one coming with your desktop manager.
    Noone
  • Your laptop model, if you think it could be related to the problem
    81SX Legion Y540-15IRH
  • The version of optimus-manager you are using : latest stable release (optimus-manager), or the latest Git version (optimus-manager-git)
    Optimus Manager (Client) version 1.4
  • Your custom optimus-manager configuration file at /etc/optimus-manager/optimus-manager.conf, if you made one

[amd]
DRI=3
driver=modesetting
tearfree=

[intel]
DRI=3
accel=
driver=modesetting
modeset=yes
tearfree=

[nvidia]
DPI=96
PAT=yes
allow_external_gpus=no
dynamic_power_management=no
ignore_abi=no
modeset=yes
options=overclocking

[optimus]
auto_logout=yes
pci_power_control=no
pci_remove=no
pci_reset=no
startup_auto_battery_mode=integrated
startup_auto_extpower_mode=hybrid
startup_mode=integrated
switching=bbswitch

Logs
Run optimus-manager --status in a console, and if an error message appears, post it here. The message should also point you to a log path, attach it here as well. If there is no error message but you are still experiencing issues, grab the most recent files in /var/log/optimus-manager/switch/ and /var/log/optimus-manager/daemon/.

~ » optimus-manager --status
Optimus Manager (Client) version 1.4

Current GPU mode : integrated
GPU mode requested for next login : no change
GPU at startup : integrated
Temporary config path: no

/var/log/optimus-manager/switch/switch-20220526T194523.log

[8] INFO: # Xorg pre-start hook
[8] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'integrated', 'current_mode': None}
[8] INFO: Requested mode is: integrated
[881] INFO: Available modules: ['nouveau', 'bbswitch', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[882] INFO: Unloading modules ['nvidia_drm', 'nvidia_modeset', 'nvidia_uvm', 'nvidia'] (if loaded)
[883] INFO: switching=none, nothing to do
[896] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[896] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20220526T194523', 'requested_mode': 'integrated'}
[896] INFO: Xorg pre-start hook completed successfully.
[6] INFO: # Xorg post-start hook
[21] INFO: Running /etc/optimus-manager/xsetup-integrated.sh
[27] INFO: Writing state {'type': 'done', 'switch_id': '20220526T194523', 'current_mode': 'integrated'}
[27] INFO: Xorg post-start hook completed successfully.

/var/log/optimus-manager/daemon/daemon-20220526T194522.log

[18] INFO: # Daemon pre-start hook
[18] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[19] INFO: Startup mode is: integrated
[19] INFO: Writing state {'type': 'pending_pre_xorg_start', 'requested_mode': 'integrated', 'current_mode': None}
[20] INFO: Daemon pre-start hook completed successfully.
[20] INFO: Calling Xorg pre-start hook.
[1] INFO: # Commands daemon
[1] INFO: Opening UNIX socket
[1] INFO: Awaiting commands
[121512] INFO: Received command : {
"args": {
"content": "[amd]\nDRI=3\ndriver=modesetting\ntearfree=\n\n[intel]\nDRI=3\naccel=\ndriver=modesetting\nmodeset=yes\ntearfree=\n\n[nvidia]\nDPI=96\nPAT=yes\nallow_external_gpus=no\ndynamic_power_management=no\nignore_abi=no\nmodeset=yes\noptions=overclocking\n\n[optimus]\nauto_logout=yes\npci_power_control=no\npci_remove=no\npci_reset=no\nstartup_auto_battery_mode=integrated\nstartup_auto_extpower_mode=nvidia\nstartup_mode=integrated\nswitching=bbswitch\n"
},
"type": "user_config"
}

[121512] INFO: Replacing user config at /etc/optimus-manager/optimus-manager.conf with provided content
[121513] INFO: Received command : {
"args": {
"path": ""
},
"type": "temp_config"
}

[121513] INFO: Removing temporary config file path
[130320] INFO: Received command : {
"args": {
"mode": "nvidia"
},
"type": "switch"
}

[130320] INFO: Writing requested GPU mode nvidia
[130320] INFO: Writing state {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'integrated'}
[142241] INFO: Received command : {
"args": {
"mode": "nvidia"
},
"type": "switch"
}

[142241] INFO: Writing requested GPU mode nvidia
[142241] INFO: Writing state {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'integrated'}
[192905] INFO: Received command : {"type": "switch", "args": {"mode": "nvidia"}}
[192906] INFO: Writing requested GPU mode nvidia
[192906] INFO: Writing state {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'integrated'}
[225698] INFO: Received command : {
"args": {
"content": "[amd]\nDRI=3\ndriver=modesetting\ntearfree=\n\n[intel]\nDRI=3\naccel=\ndriver=modesetting\nmodeset=yes\ntearfree=\n\n[nvidia]\nDPI=96\nPAT=yes\nallow_external_gpus=no\ndynamic_power_management=no\nignore_abi=no\nmodeset=yes\noptions=overclocking\n\n[optimus]\nauto_logout=yes\npci_power_control=no\npci_remove=no\npci_reset=no\nstartup_auto_battery_mode=integrated\nstartup_auto_extpower_mode=nvidia\nstartup_mode=auto\nswitching=bbswitch\n"
},
"type": "user_config"
}

[225699] INFO: Replacing user config at /etc/optimus-manager/optimus-manager.conf with provided content
[225699] INFO: Received command : {
"args": {
"path": ""
},
"type": "temp_config"
}

[225699] INFO: Removing temporary config file path
[236495] INFO: Process stop requested
[236495] INFO: Closing and removing the socket...
[236496] INFO: Goodbye !

my .xinitrc

if [[ -f /usr/bin/prime-offload ]]; then
/usr/bin/prime-offload
fi

exec qtile start

if [[ -f /usr/bin/prime-switch ]]; then
sudo /usr/bin/prime-switch
fi

~ » optimus-manager --switch hybrid

ERROR : cannot get current display manager name : No display-manager.service file found
You are about to switch GPUs. This will forcibly close all graphical sessions and all your applications WILL CLOSE.
(you can pass the --no-confirm option to disable this warning)
Continue ? (y/N)

y
Switching to mode : hybrid
/bin/sh: line 1: i3-msg: command not found
/bin/sh: line 1: openbox: command not found
/bin/sh: line 1: awesome-client: command not found
/bin/sh: line 1: bspc: command not found
/bin/sh: line 1: qtile-cmd: command not found

! About last line, i check that qtile do not use qtile-cmd anymore and qtile -cmd-obj instead.

@postadelmaga
Copy link

postadelmaga commented Jan 15, 2023

See this solution, it worked for me
#356 (comment)

Run this command before optimus-manager:
prime-offload

@nwildner
Copy link
Collaborator

nwildner commented Jul 1, 2024

Hello @kafkaGen .

Use the optimus-manager-git package since the current sessions.py from the master branch is using qtile cmd-obj -o cmd -f shutdown and not qtile-cmd.

This issue isn't active for the last year or so and a lot has changed in many aspects of multiple software, please keep track of optimus-manager.

Have a nice week ahead.

@nwildner nwildner closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants