I'm experiencing severe screen tearing when running in intel mode. When I switch to nvidia, there is no tearing, but I don't want to be in NVIDIA mode all the time.
I have proprietary NVIDIA driver installed via "Additional Drivers" menu.
I looked over the internet, searching for a solution.
I tried creating the file /etc/X11/xorg.conf.d/20-intel.conf, then adding the following to it:
This works for intel mode, but breaks nvidia mode. Programs that require graphics will output the follwing: Xlib: extension "NV-GLX" missing on display ":0"
I also tried enabling nvidia-drm, which did nothing.
So I'm thinking of enabling the /etc/X11/xorg.conf.d/20-intel.conf only in intel mode, but I have no idea how to do that.
Also, if you have better solutions, then please tell me.
How about a script to switch to Intel or Nvidia mode, which also adds that Intel config file when switching to intel and removes it when switching to nvidia?
It's probably not the most elegant solution, but worth a try.
#!/bin/bash
if [ $1 == "nvidia" ]
then
sudo prime-select nvidia
sudo rm /etc/X11/xorg.conf.d/20-intel.conf
fi
if [ $1 == "intel" ]
then
sudo prime-select intel
sudo cp ~/Desktop/20-intel.conf /etc/X11/xorg.conf.d/20-intel.conf
fi
Please advise me on where user-created scripts usually go in the Linux filesystem, so I can add the script there and add to path if necessary.
Also, should I mark it as solved even though it's kind of a work-around?
You can put it into /usr/local/bin/ .
I'd move the intel config from your desktop to a global location (/usr/local/share/ maybe).
Whether or not you mark this as solved is up to you.
I think until Wayland finally gets off the ground I'm afraid screen tearing issues and ugly workarounds are probably here to stay.
Removed the nvidia.drm-modeset=1, and now update-grub2 returns:
/usr/sbin/grub-mkconfig: 308: /usr/sbin/grub-mkconfig: gettext: Exec format error
/usr/sbin/grub-mkconfig: 260: /usr/sbin/grub-mkconfig: gettext: Exec format error
Here is my /etc/default/grub file
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
I don't see anything that would cause that error, here is my file for comparison (it does have some custom tweaks)
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
GRUB_GFXPAYLOAD_LINUX=1920x1200
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
Actually the output looks like the gettext program is somehow broken. What happens when you run just "gettext"?
If that gives the same error, mabye try reinstalling gettext-base.
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libsratom-0-0:amd64' is missing final newline
sh: 1: /usr/bin/gdbus: Exec format error
E: Sub-process /usr/bin/dpkg returned an error code (2)
Is reinstall only option?
Btw here is output of gettext: bash: /usr/bin/gettext: cannot execute binary file: Exec format error
Also noticed a lot of things broken, like keyring won't unlock for Evolution mail, and random files in my home direcotry like "=", "at!data", etc.
At the end it says passed, so I guess there is nothing wrong with the drive.
Is there a way to fix gettext or should I just reinstall the OS and hope I don't mess it up again?
Update: Reinstalled the OS and set it up again.
Using my script no problem.
I think I'll mark it as solved even though it's a workaround. I don't think there will be anything and end-user can do to fix this.
Btw, thanks maximuscore for helping me for 2-3 hours.