mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-03-26 03:17:52 -04:00
Try disabling webengine GPU acceleration unconditionally
It doesnt make any significant performance difference for ebooks and might fix crashes/blackscreen on some older Windows systems.
This commit is contained in:
parent
2096c0b7f3
commit
e5c811e8bb
@ -895,18 +895,6 @@ see which one is causing the issue. Basically, stop a program, run calibre,
|
||||
check for crashes. If they still happen, stop another program and repeat.
|
||||
|
||||
|
||||
The calibre E-book viewer and Edit book tools do not work on Windows?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
These two programs use hardware acceleration as they embed a version of the
|
||||
Chrome browser to render HTML. If they do not work it will be because of
|
||||
incompatibility with your system's GPU (graphics) drivers. Try updating these
|
||||
first, and reboot. If that does not fix it, you can set the
|
||||
``QTWEBENGINE_CHROMIUM_FLAGS`` environment variable to the value
|
||||
``--disable-gpu`` to turn off hardware acceleration. See
|
||||
`this page <https://doc.qt.io/qt-6/qtwebengine-debugging.html>`_ for details.
|
||||
|
||||
|
||||
Using the viewer or doing any conversions results in a permission denied error on Windows
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@ -1219,6 +1219,9 @@ class Application(QApplication):
|
||||
args.extend(('-platformpluginpath', plugins_loc, '-platform', os.environ.get('CALIBRE_HEADLESS_PLATFORM', 'headless')))
|
||||
else:
|
||||
args.extend(self.palette_manager.args_to_qt)
|
||||
# We disable GPU acceleration as it causes crashes/black screen in some Windows systems and
|
||||
# isnt really needed for performance for our use cases.
|
||||
args += ['--webEngineArgs', '--disable-gpu']
|
||||
self.headless = headless
|
||||
from calibre_extensions import progress_indicator
|
||||
self.pi = progress_indicator
|
||||
@ -1599,11 +1602,8 @@ def ensure_app(headless=True):
|
||||
has_headless = ismacos or islinux or isbsd
|
||||
if headless and has_headless:
|
||||
args += ['-platformpluginpath', plugins_loc, '-platform', os.environ.get('CALIBRE_HEADLESS_PLATFORM', 'headless')]
|
||||
if isbsd:
|
||||
val = os.environ.get('QTWEBENGINE_CHROMIUM_FLAGS', '')
|
||||
if val:
|
||||
val += ' '
|
||||
os.environ['QTWEBENGINE_CHROMIUM_FLAGS'] = f'{val}--disable-gpu'
|
||||
# WebEngine GPU not needed in headless mode
|
||||
args += ['--webEngineArgs', '--disable-gpu']
|
||||
if ismacos:
|
||||
os.environ['QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM'] = '1'
|
||||
if headless and iswindows:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user